0s autopkgtest [07:41:44]: starting date and time: 2025-02-16 07:41:44+0000 0s autopkgtest [07:41:44]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [07:41:44]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.wjcuf7f_/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc,src:iproute2,src:php-twig,src:postgresql-17,src:postgresql-common,src:roundcube --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu1 iproute2/6.13.0-1ubuntu1 php-twig/3.19.0-1 postgresql-17/17.3-2 postgresql-common/273 roundcube/1.6.10+dfsg-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-arm64-4.secgroup --name adt-plucky-arm64-octave-statistics-20250216-074144-juju-7f2275-prod-proposed-migration-environment-20-54cdb314-51cf-4298-832d-c856a09d6587 --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 164s autopkgtest [07:44:28]: testbed dpkg architecture: arm64 165s autopkgtest [07:44:29]: testbed apt version: 2.9.28 165s autopkgtest [07:44:29]: @@@@@@@@@@@@@@@@@@@@ test bed setup 165s autopkgtest [07:44:29]: testbed release detected to be: None 166s autopkgtest [07:44:30]: updating testbed package index (apt update) 166s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 166s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 166s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 167s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 167s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [3120 B] 167s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [13.1 kB] 167s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [74.8 kB] 167s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [812 kB] 167s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [167 kB] 167s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 Packages [7960 B] 167s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [921 kB] 167s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [10.0 kB] 167s Fetched 2119 kB in 1s (1801 kB/s) 168s Reading package lists... 169s Reading package lists... 169s Building dependency tree... 169s Reading state information... 169s Calculating upgrade... 170s The following packages will be upgraded: 170s pci.ids 170s 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 170s Need to get 284 kB of archives. 170s After this operation, 1024 B of additional disk space will be used. 170s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 pci.ids all 0.0~2025.02.12-1 [284 kB] 171s Fetched 284 kB in 0s (706 kB/s) 171s (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 ... 116609 files and directories currently installed.) 171s Preparing to unpack .../pci.ids_0.0~2025.02.12-1_all.deb ... 171s Unpacking pci.ids (0.0~2025.02.12-1) over (0.0~2025.02.05-1) ... 171s Setting up pci.ids (0.0~2025.02.12-1) ... 171s Reading package lists... 172s Building dependency tree... 172s Reading state information... 172s 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. 172s autopkgtest [07:44:36]: upgrading testbed (apt dist-upgrade and autopurge) 172s Reading package lists... 173s Building dependency tree... 173s Reading state information... 173s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 173s Starting 2 pkgProblemResolver with broken count: 0 173s Done 174s Entering ResolveByKeep 174s 175s The following packages will be upgraded: 175s iproute2 libc-bin libc-dev-bin libc6 libc6-dev locales 175s 6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 175s Need to get 10.7 MB of archives. 175s After this operation, 358 kB of additional disk space will be used. 175s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu1 [24.0 kB] 175s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu1 [1750 kB] 176s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu1 [4246 kB] 176s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu1 [2910 kB] 177s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu1 [600 kB] 177s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 iproute2 arm64 6.13.0-1ubuntu1 [1158 kB] 177s Preconfiguring packages ... 177s Fetched 10.7 MB in 2s (5784 kB/s) 177s (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 ... 116609 files and directories currently installed.) 177s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu1_arm64.deb ... 177s Unpacking libc-dev-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 177s Preparing to unpack .../libc6-dev_2.41-1ubuntu1_arm64.deb ... 177s Unpacking libc6-dev:arm64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 177s Preparing to unpack .../locales_2.41-1ubuntu1_all.deb ... 177s Unpacking locales (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 178s Preparing to unpack .../libc6_2.41-1ubuntu1_arm64.deb ... 178s Checking for services that may need to be restarted... 178s Checking init scripts... 178s Checking for services that may need to be restarted... 178s Checking init scripts... 178s Stopping some services possibly affected by the upgrade (will be restarted later): 178s cron: stopping...done. 178s 178s Unpacking libc6:arm64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 178s Setting up libc6:arm64 (2.41-1ubuntu1) ... 178s Checking for services that may need to be restarted... 178s Checking init scripts... 178s Restarting services possibly affected by the upgrade: 178s cron: restarting...done. 178s 178s Services restarted successfully. 178s (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 ... 116610 files and directories currently installed.) 178s Preparing to unpack .../libc-bin_2.41-1ubuntu1_arm64.deb ... 178s Unpacking libc-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 178s Setting up libc-bin (2.41-1ubuntu1) ... 179s (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 ... 116610 files and directories currently installed.) 179s Preparing to unpack .../iproute2_6.13.0-1ubuntu1_arm64.deb ... 179s Unpacking iproute2 (6.13.0-1ubuntu1) over (6.10.0-2ubuntu1) ... 179s Setting up iproute2 (6.13.0-1ubuntu1) ... 179s Setting up locales (2.41-1ubuntu1) ... 179s Installing new version of config file /etc/locale.alias ... 180s Generating locales (this might take a while)... 182s en_US.UTF-8... done 182s Generation complete. 182s Setting up libc-dev-bin (2.41-1ubuntu1) ... 182s Setting up libc6-dev:arm64 (2.41-1ubuntu1) ... 182s Processing triggers for man-db (2.13.0-1) ... 183s Processing triggers for systemd (257.2-3ubuntu1) ... 184s Reading package lists... 184s Building dependency tree... 184s Reading state information... 185s Starting pkgProblemResolver with broken count: 0 185s Starting 2 pkgProblemResolver with broken count: 0 185s Done 185s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 188s autopkgtest [07:44:52]: testbed running kernel: Linux 6.12.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 4 15:49:33 UTC 2025 188s autopkgtest [07:44:52]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 190s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (dsc) [2436 B] 190s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (tar) [1296 kB] 190s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (diff) [10.9 kB] 190s gpgv: Signature made Thu Feb 6 05:39:34 2025 UTC 190s gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 190s gpgv: issuer "rafael@debian.org" 190s gpgv: Can't check signature: No public key 190s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.2-1.dsc: no acceptable signature found 191s autopkgtest [07:44:55]: testing package octave-statistics version 1.7.2-1 191s autopkgtest [07:44:55]: build not needed 192s autopkgtest [07:44:56]: test command1: preparing testbed 192s Reading package lists... 192s Building dependency tree... 192s Reading state information... 193s Starting pkgProblemResolver with broken count: 0 193s Starting 2 pkgProblemResolver with broken count: 0 193s Done 194s The following NEW packages will be installed: 194s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 194s cpp-14 cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper debugedit 194s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 194s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 194s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-aarch64-linux-gnu 194s g++-aarch64-linux-gnu gcc gcc-14 gcc-14-aarch64-linux-gnu 194s gcc-aarch64-linux-gnu gettext gfortran gfortran-14 194s gfortran-14-aarch64-linux-gnu gfortran-aarch64-linux-gnu gnuplot-data 194s gnuplot-nox hdf5-helpers intltool-debian krb5-multidev libaec-dev libaec0 194s libalgorithm-c3-perl libaliased-perl libamd3 libaom3 libapp-cmd-perl 194s libappstream5 libapt-pkg-perl libarchive-zip-perl libarpack2t64 194s libarray-intspan-perl libasan8 libasound2-data libasound2t64 194s libavahi-client3 libavahi-common-data libavahi-common3 194s libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 194s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 194s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 194s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 194s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 194s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 194s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 194s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 194s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 194s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 194s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 194s libdata-validate-domain-perl libdata-validate-ip-perl 194s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 194s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 194s libdevel-stacktrace-perl libdouble-conversion3 libdrm-radeon1 libduktape207 194s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 194s libencode-locale-perl liberror-perl libevent-2.1-7t64 194s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 194s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 194s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 194s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 194s libfile-which-perl libflac12t64 libfltk-gl1.3t64 libfltk1.3t64 194s libfont-ttf-perl libfontconfig1 libfontenc1 libgbm1 libgcc-14-dev libgd3 194s libgetopt-long-descriptive-perl libgfortran-14-dev libgfortran5 libgl-dev 194s libgl1 libgl1-mesa-dri libgl2ps1.4 libglapi-mesa libglpk40 libglu1-mesa 194s libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl 194s libgnutls-dane0t64 libgnutls-openssl27t64 libgnutls28-dev libgomp1 194s libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 libgraphite2-3 194s libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 libhdf5-cpp-310 194s libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 194s libhdf5-hl-fortran-310 libheif-plugin-aomdec libheif-plugin-libde265 194s libheif1 libhtml-form-perl libhtml-html5-entities-perl libhtml-parser-perl 194s libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl 194s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 194s libhttp-negotiate-perl libhwasan0 libhwy1t64 libice6 libidn2-dev 194s libimagequant0 libimport-into-perl libindirect-perl libinput-bin libinput10 194s libio-html-perl libio-interactive-perl libio-socket-ssl-perl 194s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 194s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 194s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 194s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 194s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 194s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 194s liblist-compare-perl liblist-moreutils-perl liblist-moreutils-xs-perl 194s liblist-someutils-perl liblist-utilsby-perl liblog-any-adapter-screen-perl 194s liblog-any-perl liblog-log4perl-perl liblsan0 libltdl7 liblua5.4-0 194s liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl 194s libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 194s libmodule-implementation-perl libmodule-pluggable-perl 194s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 194s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 194s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 194s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 194s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 194s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 194s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 194s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 194s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 194s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 194s libpath-iterator-rule-perl libpath-tiny-perl libpcre2-16-0 194s libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 libpkgconf3 194s libpod-constants-perl libpod-parser-perl libpod-pom-perl libportaudio2 194s libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 libqrupdate1 194s libqscintilla2-qt6-15 libqscintilla2-qt6-l10n libqt6core5compat6 194s libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 libqt6network6 194s libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 libqt6sql6 194s libqt6widgets6 libqt6xml6 libraqm0 libreadline-dev libregexp-common-perl 194s libregexp-pattern-license-perl libregexp-pattern-perl 194s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 194s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 194s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 194s libsoftware-license-perl libsoftware-licensemoreutils-perl 194s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 194s libstemmer0d libstrictures-perl libstring-copyright-perl 194s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 194s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 194s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 194s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 194s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 194s libtext-glob-perl libtext-levenshtein-damerau-perl 194s libtext-levenshteinxs-perl libtext-markdown-discount-perl 194s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 194s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 194s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 194s libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 libunbound8 194s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 194s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 194s libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 194s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 194s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 194s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 194s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 194s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 194s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 194s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 194s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 194s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 194s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 194s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 194s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 194s octave-common octave-dev octave-io octave-statistics 194s octave-statistics-common patchutils perl-openssl-defaults pkgconf 194s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 194s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 194s xtrans-dev xvfb zlib1g-dev 194s 0 upgraded, 475 newly installed, 0 to remove and 0 not upgraded. 194s Need to get 183 MB of archives. 194s After this operation, 665 MB of additional disk space will be used. 194s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 libstemmer0d arm64 2.2.0-4build1 [160 kB] 194s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libappstream5 arm64 1.0.4-1 [239 kB] 194s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 appstream arm64 1.0.4-1 [72.3 kB] 194s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 m4 arm64 1.4.19-5 [244 kB] 194s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 autoconf all 2.72-3 [382 kB] 194s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 autotools-dev all 20220109.1 [44.9 kB] 194s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 automake all 1:1.17-3 [572 kB] 194s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 autopoint all 0.23.1-1 [619 kB] 194s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libcapture-tiny-perl all 0.50-1 [20.7 kB] 194s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libparams-util-perl arm64 1.102-3build1 [20.6 kB] 194s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-install-perl all 0.929-1 [9764 B] 194s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-optlist-perl all 0.114-1 [9708 B] 194s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libb-hooks-op-check-perl arm64 0.22-3build2 [9348 B] 194s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 194s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-callchecker-perl arm64 0.009-1build1 [14.0 kB] 194s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libparams-classify-perl arm64 0.015-2build6 [19.8 kB] 194s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 194s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 libtry-tiny-perl all 0.32-1 [21.2 kB] 194s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libmodule-implementation-perl all 0.09-2 [12.0 kB] 194s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libpackage-stash-perl all 0.40-1 [19.5 kB] 194s Get:21 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclass-load-perl all 0.25-2 [12.7 kB] 194s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-stringy-perl all 2.113-2 [45.3 kB] 194s Get:23 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparams-validate-perl arm64 1.31-2build4 [52.1 kB] 194s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-exporter-perl all 0.990-1 [49.0 kB] 194s Get:25 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 194s Get:26 http://ftpmaster.internal/ubuntu plucky/universe arm64 libio-tiecombine-perl all 1.005-3 [9464 B] 194s Get:27 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmodule-pluggable-perl all 5.2-5 [19.5 kB] 194s Get:28 http://ftpmaster.internal/ubuntu plucky/universe arm64 libstring-rewriteprefix-perl all 0.009-1 [6310 B] 194s Get:29 http://ftpmaster.internal/ubuntu plucky/universe arm64 libapp-cmd-perl all 0.337-2 [58.3 kB] 194s Get:30 http://ftpmaster.internal/ubuntu plucky/universe arm64 libboolean-perl all 0.46-3 [8430 B] 194s Get:31 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsub-uplevel-perl all 0.2800-3 [11.6 kB] 194s Get:32 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtest-exception-perl all 0.43-3 [13.4 kB] 194s Get:33 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 194s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-which-perl all 1.27-2 [12.5 kB] 195s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-homedir-perl all 1.006-2 [37.0 kB] 195s Get:36 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclone-choose-perl all 0.010-2 [7738 B] 195s Get:37 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhash-merge-perl all 0.302-1 [13.0 kB] 195s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libjson-perl all 4.10000-1 [81.9 kB] 195s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libexporter-tiny-perl all 1.006002-1 [36.8 kB] 195s Get:40 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblist-moreutils-xs-perl arm64 0.430-4build1 [39.9 kB] 195s Get:41 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblist-moreutils-perl all 0.430-2 [38.2 kB] 195s Get:42 http://ftpmaster.internal/ubuntu plucky/universe arm64 liblog-log4perl-perl all 1.57-1 [345 kB] 195s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 libmouse-perl arm64 2.5.11-1build1 [133 kB] 195s Get:44 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 195s Get:45 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmousex-strictconstructor-perl all 0.02-3 [4582 B] 195s Get:46 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 195s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libpath-tiny-perl all 0.146-1 [47.5 kB] 195s Get:48 http://ftpmaster.internal/ubuntu plucky/universe arm64 libpod-pom-perl all 2.01-4 [61.3 kB] 195s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-common-perl all 2024080801-1 [162 kB] 195s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 libyaml-tiny-perl all 1.76-1 [24.2 kB] 195s Get:51 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-perl all 2.155-1 [356 kB] 195s Get:52 http://ftpmaster.internal/ubuntu plucky/universe arm64 libyaml-pp-perl all 0.38.1-2 [107 kB] 195s Get:53 http://ftpmaster.internal/ubuntu plucky/universe arm64 cme all 1.041-1 [65.4 kB] 195s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 libisl23 arm64 0.27-1 [676 kB] 195s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpc3 arm64 1.3.1-1build2 [56.8 kB] 195s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu1 [10.6 MB] 196s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14 arm64 14.2.0-17ubuntu1 [1032 B] 196s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [5558 B] 196s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp arm64 4:14.2.0-1ubuntu1 [22.4 kB] 196s Get:60 http://ftpmaster.internal/ubuntu plucky/main arm64 libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 196s Get:61 http://ftpmaster.internal/ubuntu plucky/main arm64 libcc1-0 arm64 14.2.0-17ubuntu1 [49.6 kB] 196s Get:62 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 14.2.0-17ubuntu1 [145 kB] 196s Get:63 http://ftpmaster.internal/ubuntu plucky/main arm64 libitm1 arm64 14.2.0-17ubuntu1 [27.8 kB] 196s Get:64 http://ftpmaster.internal/ubuntu plucky/main arm64 libasan8 arm64 14.2.0-17ubuntu1 [2892 kB] 196s Get:65 http://ftpmaster.internal/ubuntu plucky/main arm64 liblsan0 arm64 14.2.0-17ubuntu1 [1283 kB] 196s Get:66 http://ftpmaster.internal/ubuntu plucky/main arm64 libtsan2 arm64 14.2.0-17ubuntu1 [2686 kB] 196s Get:67 http://ftpmaster.internal/ubuntu plucky/main arm64 libubsan1 arm64 14.2.0-17ubuntu1 [1152 kB] 196s Get:68 http://ftpmaster.internal/ubuntu plucky/main arm64 libhwasan0 arm64 14.2.0-17ubuntu1 [1599 kB] 196s Get:69 http://ftpmaster.internal/ubuntu plucky/main arm64 libgcc-14-dev arm64 14.2.0-17ubuntu1 [2593 kB] 196s Get:70 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu1 [20.9 MB] 197s Get:71 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14 arm64 14.2.0-17ubuntu1 [526 kB] 197s Get:72 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1200 B] 197s Get:73 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc arm64 4:14.2.0-1ubuntu1 [4998 B] 197s Get:74 http://ftpmaster.internal/ubuntu plucky/main arm64 libtool all 2.5.4-3build1 [168 kB] 197s Get:75 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-autoreconf all 20 [16.1 kB] 197s Get:76 http://ftpmaster.internal/ubuntu plucky/main arm64 libarchive-zip-perl all 1.68-1 [90.2 kB] 197s Get:77 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 197s Get:78 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-strip-nondeterminism all 1.14.1-2 [5064 B] 197s Get:79 http://ftpmaster.internal/ubuntu plucky/main arm64 debugedit arm64 1:5.1-2 [46.1 kB] 197s Get:80 http://ftpmaster.internal/ubuntu plucky/main arm64 dwz arm64 0.15-1build6 [113 kB] 197s Get:81 http://ftpmaster.internal/ubuntu plucky/main arm64 gettext arm64 0.23.1-1 [998 kB] 197s Get:82 http://ftpmaster.internal/ubuntu plucky/main arm64 intltool-debian all 0.35.0+20060710.6 [23.2 kB] 197s Get:83 http://ftpmaster.internal/ubuntu plucky/main arm64 po-debconf all 1.0.21+nmu1 [233 kB] 197s Get:84 http://ftpmaster.internal/ubuntu plucky/main arm64 debhelper all 13.24.1ubuntu2 [895 kB] 198s Get:85 http://ftpmaster.internal/ubuntu plucky/universe arm64 aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 198s Get:86 http://ftpmaster.internal/ubuntu plucky/universe arm64 gnuplot-data all 6.0.0+dfsg1-1ubuntu3 [75.3 kB] 198s Get:87 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 198s Get:88 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 198s Get:89 http://ftpmaster.internal/ubuntu plucky/universe arm64 fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 198s Get:90 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-1.1ubuntu2 [37.4 kB] 198s Get:91 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-1.1ubuntu2 [142 kB] 198s Get:92 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 198s Get:93 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 198s Get:94 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 198s Get:95 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 198s Get:96 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 198s Get:97 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 198s Get:98 http://ftpmaster.internal/ubuntu plucky/main arm64 libaom3 arm64 3.12.0-1 [1828 kB] 198s Get:99 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif-plugin-aomdec arm64 1.19.5-1build1 [11.4 kB] 198s Get:100 http://ftpmaster.internal/ubuntu plucky/main arm64 libde265-0 arm64 1.0.15-1build4 [146 kB] 198s Get:101 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif-plugin-libde265 arm64 1.19.5-1build1 [8902 B] 198s Get:102 http://ftpmaster.internal/ubuntu plucky/main arm64 libheif1 arm64 1.19.5-1build1 [369 kB] 198s Get:103 http://ftpmaster.internal/ubuntu plucky/main arm64 libimagequant0 arm64 2.18.0-1build1 [37.1 kB] 198s Get:104 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 198s Get:105 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 198s Get:106 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 198s Get:107 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 199s Get:108 http://ftpmaster.internal/ubuntu plucky/main arm64 libraqm0 arm64 0.10.2-1 [14.9 kB] 199s Get:109 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 199s Get:110 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 199s Get:111 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 199s Get:112 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 199s Get:113 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 199s Get:114 http://ftpmaster.internal/ubuntu plucky/main arm64 libxpm4 arm64 1:3.5.17-1build2 [35.1 kB] 199s Get:115 http://ftpmaster.internal/ubuntu plucky/main arm64 libgd3 arm64 2.3.3-12ubuntu3 [122 kB] 199s Get:116 http://ftpmaster.internal/ubuntu plucky/main arm64 liblua5.4-0 arm64 5.4.7-1 [158 kB] 199s Get:117 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-1.1ubuntu2 [190 kB] 199s Get:118 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 199s Get:119 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 199s Get:120 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 199s Get:121 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.1-1 [238 kB] 199s Get:122 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.1-1 [49.6 kB] 199s Get:123 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.1-1 [27.6 kB] 199s Get:124 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebpmux3 arm64 1.5.0-0.1 [25.4 kB] 199s Get:125 http://ftpmaster.internal/ubuntu plucky/universe arm64 gnuplot-nox arm64 6.0.0+dfsg1-1ubuntu3 [956 kB] 199s Get:126 http://ftpmaster.internal/ubuntu plucky/universe arm64 dh-octave-autopkgtest all 1.8.0 [10.1 kB] 199s Get:127 http://ftpmaster.internal/ubuntu plucky/main arm64 libapt-pkg-perl arm64 0.1.40build8 [67.3 kB] 199s Get:128 http://ftpmaster.internal/ubuntu plucky/main arm64 libarray-intspan-perl all 2.004-2 [25.0 kB] 199s Get:129 http://ftpmaster.internal/ubuntu plucky/main arm64 libyaml-libyaml-perl arm64 0.903.0+ds-1 [30.4 kB] 199s Get:130 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 199s Get:131 http://ftpmaster.internal/ubuntu plucky/universe arm64 libexporter-lite-perl all 0.09-2 [9748 B] 199s Get:132 http://ftpmaster.internal/ubuntu plucky/main arm64 libencode-locale-perl all 1.05-3 [11.6 kB] 199s Get:133 http://ftpmaster.internal/ubuntu plucky/main arm64 libtimedate-perl all 2.3300-2 [34.0 kB] 199s Get:134 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-date-perl all 6.06-1 [10.2 kB] 199s Get:135 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-listing-perl all 6.16-1 [11.3 kB] 199s Get:136 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 199s Get:137 http://ftpmaster.internal/ubuntu plucky/main arm64 liburi-perl all 5.30-1 [94.4 kB] 199s Get:138 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-parser-perl arm64 3.83-1build1 [85.3 kB] 199s Get:139 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tree-perl all 5.07-3 [200 kB] 199s Get:140 http://ftpmaster.internal/ubuntu plucky/main arm64 libclone-perl arm64 0.47-1 [10.4 kB] 199s Get:141 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-html-perl all 1.004-3 [15.9 kB] 199s Get:142 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 199s Get:143 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 199s Get:144 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 199s Get:145 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 199s Get:146 http://ftpmaster.internal/ubuntu plucky/main arm64 perl-openssl-defaults arm64 7build3 [6628 B] 199s Get:147 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-ssleay-perl arm64 1.94-2 [307 kB] 199s Get:148 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-socket-ssl-perl all 2.089-1 [200 kB] 199s Get:149 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-http-perl all 6.23-1 [22.3 kB] 199s Get:150 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 199s Get:151 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 199s Get:152 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-perl all 6.77-1 [138 kB] 199s Get:153 http://ftpmaster.internal/ubuntu plucky/main arm64 liberror-perl all 0.17029-2 [25.6 kB] 199s Get:154 http://ftpmaster.internal/ubuntu plucky/universe arm64 libparse-debcontrol-perl all 2.005-6 [20.4 kB] 199s Get:155 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-copyright-perl all 0.012-2 [17.4 kB] 199s Get:156 http://ftpmaster.internal/ubuntu plucky/universe arm64 libalgorithm-c3-perl all 0.11-2 [10.2 kB] 199s Get:157 http://ftpmaster.internal/ubuntu plucky/universe arm64 libclass-c3-perl all 0.35-2 [18.4 kB] 199s Get:158 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmro-compat-perl all 0.15-2 [10.1 kB] 199s Get:159 http://ftpmaster.internal/ubuntu plucky/universe arm64 libdata-section-perl all 0.200008-1 [11.6 kB] 199s Get:160 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-template-perl all 1.61-1 [48.5 kB] 199s Get:161 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-license-perl all 0.104006-1 [117 kB] 199s Get:162 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 199s Get:163 http://ftpmaster.internal/ubuntu plucky/main arm64 libsort-versions-perl all 1.62-3 [7378 B] 199s Get:164 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-reform-perl all 1.20-5 [35.4 kB] 199s Get:165 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-autoformat-perl all 1.750000-2 [29.8 kB] 199s Get:166 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 199s Get:167 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtoml-tiny-perl all 0.18-1 [21.6 kB] 199s Get:168 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-inspector-perl all 1.36-3 [15.4 kB] 199s Get:169 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-sharedir-perl all 1.118-3 [14.0 kB] 199s Get:170 http://ftpmaster.internal/ubuntu plucky/main arm64 libindirect-perl arm64 0.39-2build5 [21.7 kB] 199s Get:171 http://ftpmaster.internal/ubuntu plucky/main arm64 libxs-parse-keyword-perl arm64 0.48-2 [61.4 kB] 199s Get:172 http://ftpmaster.internal/ubuntu plucky/main arm64 libxs-parse-sublike-perl arm64 0.36-1 [41.7 kB] 199s Get:173 http://ftpmaster.internal/ubuntu plucky/main arm64 libobject-pad-perl arm64 0.819-1 [127 kB] 199s Get:174 http://ftpmaster.internal/ubuntu plucky/main arm64 libsyntax-keyword-try-perl arm64 0.30-1 [24.2 kB] 199s Get:175 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-interactive-perl all 1.026-1 [10.8 kB] 199s Get:176 http://ftpmaster.internal/ubuntu plucky/main arm64 liblog-any-perl all 1.717-1 [73.2 kB] 199s Get:177 http://ftpmaster.internal/ubuntu plucky/main arm64 liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 199s Get:178 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 199s Get:179 http://ftpmaster.internal/ubuntu plucky/main arm64 libvariable-magic-perl arm64 0.64-1build1 [35.3 kB] 199s Get:180 http://ftpmaster.internal/ubuntu plucky/main arm64 libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 199s Get:181 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-identify-perl arm64 0.14-3build4 [9762 B] 200s Get:182 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-name-perl arm64 0.28-1 [10.5 kB] 200s Get:183 http://ftpmaster.internal/ubuntu plucky/main arm64 libnamespace-clean-perl all 0.27-2 [14.0 kB] 200s Get:184 http://ftpmaster.internal/ubuntu plucky/main arm64 libnumber-compare-perl all 0.03-3 [5974 B] 200s Get:185 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-glob-perl all 0.11-3 [6780 B] 200s Get:186 http://ftpmaster.internal/ubuntu plucky/main arm64 libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 200s Get:187 http://ftpmaster.internal/ubuntu plucky/main arm64 libpod-parser-perl all 1.67-1 [80.6 kB] 200s Get:188 http://ftpmaster.internal/ubuntu plucky/main arm64 libpod-constants-perl all 0.19-2 [16.3 kB] 200s Get:189 http://ftpmaster.internal/ubuntu plucky/main arm64 libset-intspan-perl all 1.19-3 [24.8 kB] 200s Get:190 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-copyright-perl all 0.003014-1 [20.5 kB] 200s Get:191 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-escape-perl all 2010.002-3 [16.1 kB] 200s Get:192 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 200s Get:193 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 200s Get:194 http://ftpmaster.internal/ubuntu plucky/main arm64 libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 200s Get:195 http://ftpmaster.internal/ubuntu plucky/main arm64 licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 200s Get:196 http://ftpmaster.internal/ubuntu plucky/main arm64 diffstat arm64 1.67-1 [29.1 kB] 200s Get:197 http://ftpmaster.internal/ubuntu plucky/main arm64 libberkeleydb-perl arm64 0.66-1 [117 kB] 200s Get:198 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-xsaccessor-perl arm64 1.19-4build5 [32.7 kB] 200s Get:199 http://ftpmaster.internal/ubuntu plucky/main arm64 libconfig-tiny-perl all 2.30-1 [14.7 kB] 200s Get:200 http://ftpmaster.internal/ubuntu plucky/main arm64 libconst-fast-perl all 0.014-2 [8034 B] 200s Get:201 http://ftpmaster.internal/ubuntu plucky/main arm64 libcpanel-json-xs-perl arm64 4.39-1 [114 kB] 200s Get:202 http://ftpmaster.internal/ubuntu plucky/main arm64 libaliased-perl all 0.34-3 [12.8 kB] 200s Get:203 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-data-inheritable-perl all 0.10-1 [8038 B] 200s Get:204 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 200s Get:205 http://ftpmaster.internal/ubuntu plucky/main arm64 libexception-class-perl all 1.45-1 [28.6 kB] 200s Get:206 http://ftpmaster.internal/ubuntu plucky/main arm64 libiterator-perl all 0.03+ds1-2 [18.8 kB] 200s Get:207 http://ftpmaster.internal/ubuntu plucky/main arm64 libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 200s Get:208 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-dpath-perl all 0.60-1 [37.3 kB] 200s Get:209 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-domain-tld-perl all 1.75-4 [29.0 kB] 200s Get:210 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-domain-perl all 0.15-1 [10.4 kB] 200s Get:211 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 200s Get:212 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-netmask-perl all 2.0002-2 [24.8 kB] 200s Get:213 http://ftpmaster.internal/ubuntu plucky/main arm64 libnetaddr-ip-perl arm64 4.079+dfsg-2build5 [79.9 kB] 200s Get:214 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-ip-perl all 0.31-1 [17.2 kB] 200s Get:215 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-validate-uri-perl all 0.07-3 [10.8 kB] 200s Get:216 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-size-perl arm64 0.84-1build1 [19.1 kB] 200s Get:217 http://ftpmaster.internal/ubuntu plucky/main arm64 libemail-address-xs-perl arm64 1.05-1build5 [29.0 kB] 200s Get:218 http://ftpmaster.internal/ubuntu plucky/main arm64 libipc-system-simple-perl all 1.30-2 [22.3 kB] 200s Get:219 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-basedir-perl all 0.09-2 [14.4 kB] 200s Get:220 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-find-rule-perl all 0.34-3 [24.4 kB] 200s Get:221 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-string-perl all 1.08-4 [11.1 kB] 200s Get:222 http://ftpmaster.internal/ubuntu plucky/main arm64 libfont-ttf-perl all 1.06-2 [323 kB] 200s Get:223 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 200s Get:224 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 200s Get:225 http://ftpmaster.internal/ubuntu plucky/main arm64 libipc-run3-perl all 0.049-1 [28.8 kB] 200s Get:226 http://ftpmaster.internal/ubuntu plucky/main arm64 libjson-maybexs-perl all 1.004008-1 [11.1 kB] 200s Get:227 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-compare-perl all 0.55-2 [62.9 kB] 200s Get:228 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-someutils-perl all 0.59-1 [30.4 kB] 200s Get:229 http://ftpmaster.internal/ubuntu plucky/main arm64 liblist-utilsby-perl all 0.12-2 [14.9 kB] 200s Get:230 http://ftpmaster.internal/ubuntu plucky/main arm64 libmldbm-perl all 2.05-4 [16.0 kB] 200s Get:231 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 200s Get:232 http://ftpmaster.internal/ubuntu plucky/main arm64 libimport-into-perl all 1.002005-2 [10.7 kB] 201s Get:233 http://ftpmaster.internal/ubuntu plucky/main arm64 librole-tiny-perl all 2.002004-1 [16.3 kB] 201s Get:234 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 201s Get:235 http://ftpmaster.internal/ubuntu plucky/main arm64 libmoo-perl all 2.005005-1 [47.4 kB] 201s Get:236 http://ftpmaster.internal/ubuntu plucky/main arm64 libstrictures-perl all 2.000006-1 [16.3 kB] 201s Get:237 http://ftpmaster.internal/ubuntu plucky/main arm64 libmoox-aliases-perl all 0.001006-2 [6796 B] 201s Get:238 http://ftpmaster.internal/ubuntu plucky/main arm64 libperlio-gzip-perl arm64 0.20-1build5 [14.6 kB] 201s Get:239 http://ftpmaster.internal/ubuntu plucky/main arm64 libperlio-utf8-strict-perl arm64 0.010-1build4 [11.1 kB] 201s Get:240 http://ftpmaster.internal/ubuntu plucky/main arm64 libproc-processtable-perl arm64 0.636-1build4 [35.5 kB] 201s Get:241 http://ftpmaster.internal/ubuntu plucky/main arm64 libregexp-wildcards-perl all 1.05-3 [12.9 kB] 201s Get:242 http://ftpmaster.internal/ubuntu plucky/main arm64 libsereal-decoder-perl arm64 5.004+ds-1build4 [101 kB] 201s Get:243 http://ftpmaster.internal/ubuntu plucky/main arm64 libsereal-encoder-perl arm64 5.004+ds-1build4 [104 kB] 201s Get:244 http://ftpmaster.internal/ubuntu plucky/main arm64 libterm-readkey-perl arm64 2.38-2build5 [23.2 kB] 201s Get:245 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-levenshteinxs-perl arm64 0.03-5build5 [8052 B] 201s Get:246 http://ftpmaster.internal/ubuntu plucky/main arm64 libmarkdown2 arm64 2.2.7-2ubuntu1 [37.1 kB] 201s Get:247 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-markdown-discount-perl arm64 0.18-1 [12.4 kB] 201s Get:248 http://ftpmaster.internal/ubuntu plucky/main arm64 libdata-messagepack-perl arm64 1.02-1build5 [30.1 kB] 201s Get:249 http://ftpmaster.internal/ubuntu plucky/main arm64 libtext-xslate-perl arm64 3.5.9-2build1 [161 kB] 201s Get:250 http://ftpmaster.internal/ubuntu plucky/main arm64 libtime-duration-perl all 1.21-2 [12.3 kB] 201s Get:251 http://ftpmaster.internal/ubuntu plucky/main arm64 libtime-moment-perl arm64 0.44-2build5 [72.1 kB] 201s Get:252 http://ftpmaster.internal/ubuntu plucky/main arm64 libunicode-utf8-perl arm64 0.62-2build4 [17.9 kB] 201s Get:253 http://ftpmaster.internal/ubuntu plucky/main arm64 libcgi-pm-perl all 4.67-1 [185 kB] 201s Get:254 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-form-perl all 6.12-1 [31.1 kB] 201s Get:255 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-mechanize-perl all 2.18-1ubuntu1 [93.1 kB] 201s Get:256 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 201s Get:257 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-sax-base-perl all 1.09-3 [18.9 kB] 201s Get:258 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 201s Get:259 http://ftpmaster.internal/ubuntu plucky/main arm64 libxml-libxml-perl arm64 2.0207+dfsg+really+2.0134-5build1 [297 kB] 201s Get:260 http://ftpmaster.internal/ubuntu plucky/main arm64 lzip arm64 1.25-1 [83.5 kB] 201s Get:261 http://ftpmaster.internal/ubuntu plucky/main arm64 lzop arm64 1.04-2build3 [82.8 kB] 201s Get:262 http://ftpmaster.internal/ubuntu plucky/main arm64 patchutils arm64 0.4.2-1build3 [75.3 kB] 201s Get:263 http://ftpmaster.internal/ubuntu plucky/main arm64 t1utils arm64 1.41-4build3 [61.0 kB] 201s Get:264 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 201s Get:265 http://ftpmaster.internal/ubuntu plucky/main arm64 lintian all 2.121.1ubuntu1 [1073 kB] 201s Get:266 http://ftpmaster.internal/ubuntu plucky/universe arm64 libconfig-model-dpkg-perl all 3.010 [176 kB] 201s Get:267 http://ftpmaster.internal/ubuntu plucky/main arm64 libconvert-binhex-perl all 1.125-3 [27.1 kB] 201s Get:268 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-smtp-ssl-perl all 1.04-2 [6218 B] 201s Get:269 http://ftpmaster.internal/ubuntu plucky/main arm64 libmailtools-perl all 2.22-1 [77.1 kB] 201s Get:270 http://ftpmaster.internal/ubuntu plucky/main arm64 libmime-tools-perl all 5.515-1 [187 kB] 201s Get:271 http://ftpmaster.internal/ubuntu plucky/main arm64 libsuitesparseconfig7 arm64 1:7.8.3+dfsg-3 [13.2 kB] 201s Get:272 http://ftpmaster.internal/ubuntu plucky/universe arm64 libamd3 arm64 1:7.8.3+dfsg-3 [26.1 kB] 201s Get:273 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 201s Get:274 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 14.2.0-17ubuntu1 [437 kB] 201s Get:275 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 201s Get:276 http://ftpmaster.internal/ubuntu plucky/universe arm64 libarpack2t64 arm64 3.9.1-4 [94.4 kB] 201s Get:277 http://ftpmaster.internal/ubuntu plucky/universe arm64 libccolamd3 arm64 1:7.8.3+dfsg-3 [25.5 kB] 201s Get:278 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcamd3 arm64 1:7.8.3+dfsg-3 [22.6 kB] 201s Get:279 http://ftpmaster.internal/ubuntu plucky/main arm64 libcolamd3 arm64 1:7.8.3+dfsg-3 [18.3 kB] 201s Get:280 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcholmod5 arm64 1:7.8.3+dfsg-3 [614 kB] 201s Get:281 http://ftpmaster.internal/ubuntu plucky/universe arm64 libcxsparse4 arm64 1:7.8.3+dfsg-3 [68.7 kB] 201s Get:282 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-double3 arm64 3.3.10-2fakesync1build1 [392 kB] 201s Get:283 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-single3 arm64 3.3.10-2fakesync1build1 [604 kB] 201s Get:284 http://ftpmaster.internal/ubuntu plucky/main arm64 libxfixes3 arm64 1:6.0.0-2build1 [11.2 kB] 201s Get:285 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcursor1 arm64 1:1.2.3-1 [22.2 kB] 201s Get:286 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 201s Get:287 http://ftpmaster.internal/ubuntu plucky/main arm64 libxinerama1 arm64 2:1.1.4-3build1 [6394 B] 201s Get:288 http://ftpmaster.internal/ubuntu plucky/universe arm64 libfltk1.3t64 arm64 1.3.8-6.1build2 [597 kB] 201s Get:289 http://ftpmaster.internal/ubuntu plucky/main arm64 libglvnd0 arm64 1.7.0-1build1 [60.6 kB] 201s Get:290 http://ftpmaster.internal/ubuntu plucky/main arm64 libglapi-mesa arm64 24.3.4-3ubuntu1 [59.5 kB] 201s Get:291 http://ftpmaster.internal/ubuntu plucky/main arm64 libx11-xcb1 arm64 2:1.8.10-2 [8020 B] 201s Get:292 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-dri3-0 arm64 1.17.0-2 [7606 B] 201s Get:293 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-glx0 arm64 1.17.0-2 [25.5 kB] 201s Get:294 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-present0 arm64 1.17.0-2 [6224 B] 201s Get:295 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xfixes0 arm64 1.17.0-2 [10.6 kB] 201s Get:296 http://ftpmaster.internal/ubuntu plucky/main arm64 libxxf86vm1 arm64 1:1.1.4-1build4 [9130 B] 201s Get:297 http://ftpmaster.internal/ubuntu plucky/main arm64 libdrm-radeon1 arm64 2.4.123-1 [20.8 kB] 201s Get:298 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-randr0 arm64 1.17.0-2 [18.5 kB] 201s Get:299 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-sync1 arm64 1.17.0-2 [9688 B] 201s Get:300 http://ftpmaster.internal/ubuntu plucky/main arm64 libxshmfence1 arm64 1.3-1build5 [4938 B] 201s Get:301 http://ftpmaster.internal/ubuntu plucky/main arm64 mesa-libgallium arm64 24.3.4-3ubuntu1 [9301 kB] 202s Get:302 http://ftpmaster.internal/ubuntu plucky/main arm64 libwayland-server0 arm64 1.23.1-1 [35.9 kB] 202s Get:303 http://ftpmaster.internal/ubuntu plucky/main arm64 libgbm1 arm64 24.3.4-3ubuntu1 [33.6 kB] 202s Get:304 http://ftpmaster.internal/ubuntu plucky/main arm64 libvulkan1 arm64 1.4.304.0-1 [158 kB] 202s Get:305 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl1-mesa-dri arm64 24.3.4-3ubuntu1 [35.3 kB] 202s Get:306 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx-mesa0 arm64 24.3.4-3ubuntu1 [151 kB] 202s Get:307 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx0 arm64 1.7.0-1build1 [33.2 kB] 202s Get:308 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl1 arm64 1.7.0-1build1 [106 kB] 202s Get:309 http://ftpmaster.internal/ubuntu plucky/universe arm64 libfltk-gl1.3t64 arm64 1.3.8-6.1build2 [42.1 kB] 202s Get:310 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgl2ps1.4 arm64 1.4.2+dfsg1-2build1 [40.6 kB] 202s Get:311 http://ftpmaster.internal/ubuntu plucky/main arm64 libltdl7 arm64 2.5.4-3build1 [43.0 kB] 202s Get:312 http://ftpmaster.internal/ubuntu plucky/universe arm64 libglpk40 arm64 5.0-1build2 [337 kB] 202s Get:313 http://ftpmaster.internal/ubuntu plucky/main arm64 libopengl0 arm64 1.7.0-1build1 [35.1 kB] 202s Get:314 http://ftpmaster.internal/ubuntu plucky/main arm64 libglu1-mesa arm64 9.0.2-1.1build1 [139 kB] 202s Get:315 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhwy1t64 arm64 1.2.0-3ubuntu3 [605 kB] 202s Get:316 http://ftpmaster.internal/ubuntu plucky/main arm64 liblcms2-2 arm64 2.16-2 [170 kB] 202s Get:317 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjxl0.11 arm64 0.11.1-1 [937 kB] 203s Get:318 http://ftpmaster.internal/ubuntu plucky/main arm64 libwmflite-0.2-7 arm64 0.2.13-1.1build3 [68.6 kB] 203s Get:319 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgraphicsmagick-q16-3t64 arm64 1.4+really1.3.45-1build2 [1227 kB] 203s Get:320 http://ftpmaster.internal/ubuntu plucky/universe arm64 libgraphicsmagick++-q16-12t64 arm64 1.4+really1.3.45-1build2 [111 kB] 203s Get:321 http://ftpmaster.internal/ubuntu plucky/universe arm64 libaec0 arm64 1.1.3-1 [22.0 kB] 203s Get:322 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsz2 arm64 1.1.3-1 [5254 B] 203s Get:323 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-310 arm64 1.14.5+repack-3 [1331 kB] 203s Get:324 http://ftpmaster.internal/ubuntu plucky/main arm64 libasound2-data all 1.2.13-1build1 [21.1 kB] 203s Get:325 http://ftpmaster.internal/ubuntu plucky/main arm64 libasound2t64 arm64 1.2.13-1build1 [390 kB] 203s Get:326 http://ftpmaster.internal/ubuntu plucky/main arm64 libopus0 arm64 1.5.2-2 [2891 kB] 203s Get:327 http://ftpmaster.internal/ubuntu plucky/main arm64 libsamplerate0 arm64 0.2.2-4build1 [1343 kB] 203s Get:328 http://ftpmaster.internal/ubuntu plucky/main arm64 libjack-jackd2-0 arm64 1.9.22~dfsg-4 [286 kB] 203s Get:329 http://ftpmaster.internal/ubuntu plucky/universe arm64 libportaudio2 arm64 19.6.0-1.2build3 [65.4 kB] 203s Get:330 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqhull-r8.0 arm64 2020.2-6build1 [189 kB] 203s Get:331 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqrupdate1 arm64 1.1.5-1 [38.6 kB] 203s Get:332 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 203s Get:333 http://ftpmaster.internal/ubuntu plucky/universe arm64 libb2-1 arm64 0.98.1-1.1build1 [17.1 kB] 203s Get:334 http://ftpmaster.internal/ubuntu plucky/universe arm64 libdouble-conversion3 arm64 3.3.0-1build1 [38.0 kB] 203s Get:335 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-16-0 arm64 10.42-4ubuntu3 [200 kB] 203s Get:336 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6core6t64 arm64 6.8.1+dfsg-0ubuntu4 [1938 kB] 203s Get:337 http://ftpmaster.internal/ubuntu plucky/main arm64 libwayland-client0 arm64 1.23.1-1 [26.8 kB] 203s Get:338 http://ftpmaster.internal/ubuntu plucky/main arm64 libegl-mesa0 arm64 24.3.4-3ubuntu1 [123 kB] 203s Get:339 http://ftpmaster.internal/ubuntu plucky/main arm64 libegl1 arm64 1.7.0-1build1 [29.5 kB] 203s Get:340 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 203s Get:341 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 203s Get:342 http://ftpmaster.internal/ubuntu plucky/main arm64 libmtdev1t64 arm64 1.1.7-1 [14.6 kB] 203s Get:343 http://ftpmaster.internal/ubuntu plucky/main arm64 libwacom-common all 2.14.0-1 [103 kB] 203s Get:344 http://ftpmaster.internal/ubuntu plucky/main arm64 libwacom9 arm64 2.14.0-1 [26.7 kB] 203s Get:345 http://ftpmaster.internal/ubuntu plucky/main arm64 libinput-bin arm64 1.27.1-1 [23.5 kB] 203s Get:346 http://ftpmaster.internal/ubuntu plucky/main arm64 libinput10 arm64 1.27.1-1 [136 kB] 203s Get:347 http://ftpmaster.internal/ubuntu plucky/universe arm64 libmd4c0 arm64 0.5.2-2 [42.4 kB] 203s Get:348 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6dbus6 arm64 6.8.1+dfsg-0ubuntu4 [273 kB] 203s Get:349 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 203s Get:350 http://ftpmaster.internal/ubuntu plucky/universe arm64 libts0t64 arm64 1.22-1.1build1 [63.9 kB] 203s Get:351 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-util1 arm64 0.4.1-1 [10.9 kB] 203s Get:352 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-image0 arm64 0.4.0-2build1 [10.8 kB] 203s Get:353 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render-util0 arm64 0.3.10-1 [10.5 kB] 203s Get:354 http://ftpmaster.internal/ubuntu plucky/universe arm64 libxcb-cursor0 arm64 0.1.5-1 [10.6 kB] 203s Get:355 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-icccm4 arm64 0.4.2-1 [10.9 kB] 203s Get:356 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-keysyms1 arm64 0.4.1-1 [8802 B] 203s Get:357 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shape0 arm64 1.17.0-2 [6246 B] 203s Get:358 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xinput0 arm64 1.17.0-2 [34.2 kB] 203s Get:359 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-xkb1 arm64 1.17.0-2 [32.5 kB] 203s Get:360 http://ftpmaster.internal/ubuntu plucky/main arm64 libxkbcommon-x11-0 arm64 1.7.0-2 [13.8 kB] 203s Get:361 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6gui6 arm64 6.8.1+dfsg-0ubuntu4 [3272 kB] 203s Get:362 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-common-data arm64 0.8-14ubuntu1 [30.5 kB] 203s Get:363 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-common3 arm64 0.8-14ubuntu1 [23.1 kB] 203s Get:364 http://ftpmaster.internal/ubuntu plucky/main arm64 libavahi-client3 arm64 0.8-14ubuntu1 [27.3 kB] 203s Get:365 http://ftpmaster.internal/ubuntu plucky/main arm64 libcups2t64 arm64 2.4.11-0ubuntu2 [274 kB] 203s Get:366 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6widgets6 arm64 6.8.1+dfsg-0ubuntu4 [2785 kB] 204s Get:367 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6printsupport6 arm64 6.8.1+dfsg-0ubuntu4 [222 kB] 204s Get:368 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqscintilla2-qt6-15 arm64 2.14.1+dfsg-1build4 [1137 kB] 204s Get:369 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6core5compat6 arm64 6.8.1-0ubuntu2 [145 kB] 204s Get:370 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6sql6 arm64 6.8.1+dfsg-0ubuntu4 [143 kB] 204s Get:371 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6help6 arm64 6.8.1-0ubuntu1 [194 kB] 204s Get:372 http://ftpmaster.internal/ubuntu plucky/main arm64 libduktape207 arm64 2.7.0+tests-0ubuntu3 [144 kB] 204s Get:373 http://ftpmaster.internal/ubuntu plucky/main arm64 libproxy1v5 arm64 0.5.9-1 [27.2 kB] 204s Get:374 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6network6 arm64 6.8.1+dfsg-0ubuntu4 [846 kB] 204s Get:375 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6opengl6 arm64 6.8.1+dfsg-0ubuntu4 [432 kB] 204s Get:376 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6openglwidgets6 arm64 6.8.1+dfsg-0ubuntu4 [43.6 kB] 204s Get:377 http://ftpmaster.internal/ubuntu plucky/universe arm64 libqt6xml6 arm64 6.8.1+dfsg-0ubuntu4 [81.8 kB] 204s Get:378 http://ftpmaster.internal/ubuntu plucky/main arm64 libogg0 arm64 1.3.5-3build1 [22.6 kB] 204s Get:379 http://ftpmaster.internal/ubuntu plucky/main arm64 libflac12t64 arm64 1.4.3+ds-4 [168 kB] 204s Get:380 http://ftpmaster.internal/ubuntu plucky/main arm64 libmp3lame0 arm64 3.100-6build1 [141 kB] 204s Get:381 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpg123-0t64 arm64 1.32.10-1 [173 kB] 204s Get:382 http://ftpmaster.internal/ubuntu plucky/main arm64 libvorbis0a arm64 1.3.7-2 [95.0 kB] 204s Get:383 http://ftpmaster.internal/ubuntu plucky/main arm64 libvorbisenc2 arm64 1.3.7-2 [80.0 kB] 204s Get:384 http://ftpmaster.internal/ubuntu plucky/main arm64 libsndfile1 arm64 1.2.2-2 [209 kB] 204s Get:385 http://ftpmaster.internal/ubuntu plucky/universe arm64 libspqr4 arm64 1:7.8.3+dfsg-3 [130 kB] 204s Get:386 http://ftpmaster.internal/ubuntu plucky/universe arm64 libumfpack6 arm64 1:7.8.3+dfsg-3 [249 kB] 204s Get:387 http://ftpmaster.internal/ubuntu plucky/universe arm64 libtext-unidecode-perl all 1.30-3 [105 kB] 204s Get:388 http://ftpmaster.internal/ubuntu plucky/universe arm64 texinfo-lib arm64 7.1.1-1 [134 kB] 204s Get:389 http://ftpmaster.internal/ubuntu plucky/universe arm64 tex-common all 6.18 [32.8 kB] 204s Get:390 http://ftpmaster.internal/ubuntu plucky/universe arm64 texinfo all 7.1.1-1 [1272 kB] 204s Get:391 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-common all 9.4.0-1 [6087 kB] 204s Get:392 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave arm64 9.4.0-1 [9031 kB] 204s Get:393 http://ftpmaster.internal/ubuntu plucky/main arm64 libncurses-dev arm64 6.5+20250125-2 [388 kB] 204s Get:394 http://ftpmaster.internal/ubuntu plucky/main arm64 libreadline-dev arm64 8.2-6 [179 kB] 204s Get:395 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-fortran-310 arm64 1.14.5+repack-3 [109 kB] 204s Get:396 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-310 arm64 1.14.5+repack-3 [59.8 kB] 204s Get:397 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-fortran-310 arm64 1.14.5+repack-3 [31.8 kB] 204s Get:398 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-cpp-310 arm64 1.14.5+repack-3 [117 kB] 204s Get:399 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-hl-cpp-310 arm64 1.14.5+repack-3 [11.6 kB] 204s Get:400 http://ftpmaster.internal/ubuntu plucky/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1ubuntu1 [894 kB] 204s Get:401 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8-dev arm64 2.1.5-3ubuntu2 [306 kB] 204s Get:402 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 204s Get:403 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 204s Get:404 http://ftpmaster.internal/ubuntu plucky/universe arm64 libaec-dev arm64 1.1.3-1 [19.3 kB] 205s Get:405 http://ftpmaster.internal/ubuntu plucky/main arm64 libbrotli-dev arm64 1.1.0-2build3 [359 kB] 205s Get:406 http://ftpmaster.internal/ubuntu plucky/main arm64 libidn2-dev arm64 2.3.7-2build2 [120 kB] 205s Get:407 http://ftpmaster.internal/ubuntu plucky/main arm64 comerr-dev arm64 2.1-1.47.2-1ubuntu1 [45.1 kB] 205s Get:408 http://ftpmaster.internal/ubuntu plucky/main arm64 libgssrpc4t64 arm64 1.21.3-4ubuntu1 [58.5 kB] 205s Get:409 http://ftpmaster.internal/ubuntu plucky/main arm64 libkadm5clnt-mit12 arm64 1.21.3-4ubuntu1 [40.3 kB] 205s Get:410 http://ftpmaster.internal/ubuntu plucky/main arm64 libkdb5-10t64 arm64 1.21.3-4ubuntu1 [40.8 kB] 205s Get:411 http://ftpmaster.internal/ubuntu plucky/main arm64 libkadm5srv-mit12 arm64 1.21.3-4ubuntu1 [53.8 kB] 205s Get:412 http://ftpmaster.internal/ubuntu plucky/main arm64 krb5-multidev arm64 1.21.3-4ubuntu1 [125 kB] 205s Get:413 http://ftpmaster.internal/ubuntu plucky/main arm64 libkrb5-dev arm64 1.21.3-4ubuntu1 [11.9 kB] 205s Get:414 http://ftpmaster.internal/ubuntu plucky/main arm64 libldap-dev arm64 2.6.9+dfsg-1~exp2ubuntu1 [318 kB] 205s Get:415 http://ftpmaster.internal/ubuntu plucky/main arm64 libpkgconf3 arm64 1.8.1-4 [31.4 kB] 205s Get:416 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf-bin arm64 1.8.1-4 [20.9 kB] 205s Get:417 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf arm64 1.8.1-4 [16.7 kB] 205s Get:418 http://ftpmaster.internal/ubuntu plucky/main arm64 libnghttp2-dev arm64 1.64.0-1 [120 kB] 205s Get:419 http://ftpmaster.internal/ubuntu plucky/main arm64 libpsl-dev arm64 0.21.2-1.1build1 [77.2 kB] 205s Get:420 http://ftpmaster.internal/ubuntu plucky/main arm64 libgmpxx4ldbl arm64 2:6.3.0+dfsg-2ubuntu7 [10.1 kB] 205s Get:421 http://ftpmaster.internal/ubuntu plucky/main arm64 libgmp-dev arm64 2:6.3.0+dfsg-2ubuntu7 [335 kB] 205s Get:422 http://ftpmaster.internal/ubuntu plucky/main arm64 libevent-2.1-7t64 arm64 2.1.12-stable-10 [140 kB] 205s Get:423 http://ftpmaster.internal/ubuntu plucky/main arm64 libunbound8 arm64 1.22.0-1ubuntu1 [437 kB] 205s Get:424 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls-dane0t64 arm64 3.8.9-2ubuntu1 [24.4 kB] 205s Get:425 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls-openssl27t64 arm64 3.8.9-2ubuntu1 [24.4 kB] 205s Get:426 http://ftpmaster.internal/ubuntu plucky/main arm64 libp11-kit-dev arm64 0.25.5-2ubuntu2 [23.5 kB] 205s Get:427 http://ftpmaster.internal/ubuntu plucky/main arm64 libtasn1-6-dev arm64 4.20.0-2 [91.1 kB] 205s Get:428 http://ftpmaster.internal/ubuntu plucky/main arm64 nettle-dev arm64 3.10-1 [1189 kB] 205s Get:429 http://ftpmaster.internal/ubuntu plucky/main arm64 libgnutls28-dev arm64 3.8.9-2ubuntu1 [1143 kB] 205s Get:430 http://ftpmaster.internal/ubuntu plucky/main arm64 librtmp-dev arm64 2.4+20151223.gitfa8646d.1-2build7 [69.4 kB] 205s Get:431 http://ftpmaster.internal/ubuntu plucky/main arm64 libssl-dev arm64 3.4.0-1ubuntu2 [3284 kB] 205s Get:432 http://ftpmaster.internal/ubuntu plucky/main arm64 libssh2-1-dev arm64 1.11.1-1 [286 kB] 205s Get:433 http://ftpmaster.internal/ubuntu plucky/main arm64 libzstd-dev arm64 1.5.6+dfsg-2 [353 kB] 205s Get:434 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl4-openssl-dev arm64 8.12.0+git20250209.89ed161+ds-1ubuntu1 [506 kB] 205s Get:435 http://ftpmaster.internal/ubuntu plucky/universe arm64 hdf5-helpers arm64 1.14.5+repack-3 [17.0 kB] 205s Get:436 http://ftpmaster.internal/ubuntu plucky/universe arm64 libhdf5-dev arm64 1.14.5+repack-3 [3581 kB] 206s Get:437 http://ftpmaster.internal/ubuntu plucky/main arm64 xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 206s Get:438 http://ftpmaster.internal/ubuntu plucky/main arm64 x11proto-dev all 2024.1-1 [606 kB] 206s Get:439 http://ftpmaster.internal/ubuntu plucky/main arm64 libxau-dev arm64 1:1.0.11-1 [10.2 kB] 206s Get:440 http://ftpmaster.internal/ubuntu plucky/main arm64 libxdmcp-dev arm64 1:1.1.5-1 [26.4 kB] 206s Get:441 http://ftpmaster.internal/ubuntu plucky/main arm64 xtrans-dev all 1.4.0-1 [68.9 kB] 206s Get:442 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb1-dev arm64 1.17.0-2 [91.7 kB] 206s Get:443 http://ftpmaster.internal/ubuntu plucky/main arm64 libx11-dev arm64 2:1.8.10-2 [746 kB] 206s Get:444 http://ftpmaster.internal/ubuntu plucky/main arm64 libglx-dev arm64 1.7.0-1build1 [14.2 kB] 206s Get:445 http://ftpmaster.internal/ubuntu plucky/main arm64 libgl-dev arm64 1.7.0-1build1 [102 kB] 206s Get:446 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas-dev arm64 3.12.1-2 [126 kB] 206s Get:447 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack-dev arm64 3.12.1-2 [4439 kB] 206s Get:448 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-long3 arm64 3.3.10-2fakesync1build1 [653 kB] 206s Get:449 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-bin arm64 3.3.10-2fakesync1build1 [34.1 kB] 206s Get:450 http://ftpmaster.internal/ubuntu plucky/main arm64 libfftw3-dev arm64 3.3.10-2fakesync1build1 [1523 kB] 206s Get:451 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran-14-dev arm64 14.2.0-17ubuntu1 [498 kB] 206s Get:452 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu1 [11.4 MB] 207s Get:453 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14 arm64 14.2.0-17ubuntu1 [13.6 kB] 207s Get:454 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1022 B] 207s Get:455 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran arm64 4:14.2.0-1ubuntu1 [1166 B] 207s Get:456 http://ftpmaster.internal/ubuntu plucky/main arm64 libstdc++-14-dev arm64 14.2.0-17ubuntu1 [2499 kB] 207s Get:457 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu1 [12.1 MB] 208s Get:458 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14 arm64 14.2.0-17ubuntu1 [21.8 kB] 208s Get:459 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [956 B] 208s Get:460 http://ftpmaster.internal/ubuntu plucky/main arm64 g++ arm64 4:14.2.0-1ubuntu1 [1080 B] 208s Get:461 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-dev arm64 9.4.0-1 [459 kB] 208s Get:462 http://ftpmaster.internal/ubuntu plucky/universe arm64 dh-octave all 1.8.0 [19.7 kB] 208s Get:463 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontenc1 arm64 1:1.1.8-1build1 [13.9 kB] 208s Get:464 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 208s Get:465 http://ftpmaster.internal/ubuntu plucky/main arm64 libxmu6 arm64 2:1.1.3-3build2 [47.5 kB] 208s Get:466 http://ftpmaster.internal/ubuntu plucky/main arm64 libxaw7 arm64 2:1.0.16-1 [184 kB] 208s Get:467 http://ftpmaster.internal/ubuntu plucky/main arm64 libxfont2 arm64 1:2.0.6-1build1 [88.7 kB] 208s Get:468 http://ftpmaster.internal/ubuntu plucky/main arm64 libxkbfile1 arm64 1:1.1.0-1build4 [69.4 kB] 208s Get:469 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrandr2 arm64 2:1.5.4-1 [19.6 kB] 208s Get:470 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-io arm64 2.6.4-3build2 [222 kB] 208s Get:471 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-statistics-common all 1.7.2-1 [926 kB] 208s Get:472 http://ftpmaster.internal/ubuntu plucky/universe arm64 octave-statistics arm64 1.7.2-1 [164 kB] 208s Get:473 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-xkb-utils arm64 7.7+9 [165 kB] 208s Get:474 http://ftpmaster.internal/ubuntu plucky/main arm64 xserver-common all 2:21.1.14-2ubuntu1 [33.7 kB] 208s Get:475 http://ftpmaster.internal/ubuntu plucky/universe arm64 xvfb arm64 2:21.1.14-2ubuntu1 [868 kB] 209s Fetched 183 MB in 14s (12.9 MB/s) 209s Selecting previously unselected package libstemmer0d:arm64. 209s (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 ... 116611 files and directories currently installed.) 209s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_arm64.deb ... 209s Unpacking libstemmer0d:arm64 (2.2.0-4build1) ... 209s Selecting previously unselected package libappstream5:arm64. 209s Preparing to unpack .../001-libappstream5_1.0.4-1_arm64.deb ... 209s Unpacking libappstream5:arm64 (1.0.4-1) ... 209s Selecting previously unselected package appstream. 209s Preparing to unpack .../002-appstream_1.0.4-1_arm64.deb ... 209s Unpacking appstream (1.0.4-1) ... 209s Selecting previously unselected package m4. 209s Preparing to unpack .../003-m4_1.4.19-5_arm64.deb ... 209s Unpacking m4 (1.4.19-5) ... 209s Selecting previously unselected package autoconf. 209s Preparing to unpack .../004-autoconf_2.72-3_all.deb ... 209s Unpacking autoconf (2.72-3) ... 209s Selecting previously unselected package autotools-dev. 209s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 209s Unpacking autotools-dev (20220109.1) ... 209s Selecting previously unselected package automake. 209s Preparing to unpack .../006-automake_1%3a1.17-3_all.deb ... 209s Unpacking automake (1:1.17-3) ... 209s Selecting previously unselected package autopoint. 210s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 210s Unpacking autopoint (0.23.1-1) ... 210s Selecting previously unselected package libcapture-tiny-perl. 210s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 210s Unpacking libcapture-tiny-perl (0.50-1) ... 210s Selecting previously unselected package libparams-util-perl. 210s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_arm64.deb ... 210s Unpacking libparams-util-perl (1.102-3build1) ... 210s Selecting previously unselected package libsub-install-perl. 210s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 210s Unpacking libsub-install-perl (0.929-1) ... 210s Selecting previously unselected package libdata-optlist-perl. 210s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 210s Unpacking libdata-optlist-perl (0.114-1) ... 210s Selecting previously unselected package libb-hooks-op-check-perl:arm64. 210s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_arm64.deb ... 210s Unpacking libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 210s Selecting previously unselected package libdynaloader-functions-perl. 210s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 210s Unpacking libdynaloader-functions-perl (0.004-1) ... 210s Selecting previously unselected package libdevel-callchecker-perl:arm64. 210s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_arm64.deb ... 210s Unpacking libdevel-callchecker-perl:arm64 (0.009-1build1) ... 210s Selecting previously unselected package libparams-classify-perl:arm64. 210s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_arm64.deb ... 210s Unpacking libparams-classify-perl:arm64 (0.015-2build6) ... 210s Selecting previously unselected package libmodule-runtime-perl. 210s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 210s Unpacking libmodule-runtime-perl (0.016-2) ... 210s Selecting previously unselected package libtry-tiny-perl. 210s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 210s Unpacking libtry-tiny-perl (0.32-1) ... 210s Selecting previously unselected package libmodule-implementation-perl. 210s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 210s Unpacking libmodule-implementation-perl (0.09-2) ... 210s Selecting previously unselected package libpackage-stash-perl. 210s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 210s Unpacking libpackage-stash-perl (0.40-1) ... 210s Selecting previously unselected package libclass-load-perl. 210s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 210s Unpacking libclass-load-perl (0.25-2) ... 210s Selecting previously unselected package libio-stringy-perl. 210s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 210s Unpacking libio-stringy-perl (2.113-2) ... 210s Selecting previously unselected package libparams-validate-perl:arm64. 210s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_arm64.deb ... 210s Unpacking libparams-validate-perl:arm64 (1.31-2build4) ... 210s Selecting previously unselected package libsub-exporter-perl. 210s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 210s Unpacking libsub-exporter-perl (0.990-1) ... 210s Selecting previously unselected package libgetopt-long-descriptive-perl. 210s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 210s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 210s Selecting previously unselected package libio-tiecombine-perl. 211s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 211s Unpacking libio-tiecombine-perl (1.005-3) ... 211s Selecting previously unselected package libmodule-pluggable-perl. 211s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 211s Unpacking libmodule-pluggable-perl (5.2-5) ... 211s Selecting previously unselected package libstring-rewriteprefix-perl. 211s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 211s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 211s Selecting previously unselected package libapp-cmd-perl. 211s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 211s Unpacking libapp-cmd-perl (0.337-2) ... 211s Selecting previously unselected package libboolean-perl. 211s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 211s Unpacking libboolean-perl (0.46-3) ... 211s Selecting previously unselected package libsub-uplevel-perl. 211s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 211s Unpacking libsub-uplevel-perl (0.2800-3) ... 211s Selecting previously unselected package libtest-exception-perl. 211s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 211s Unpacking libtest-exception-perl (0.43-3) ... 211s Selecting previously unselected package libcarp-assert-more-perl. 211s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 211s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 211s Selecting previously unselected package libfile-which-perl. 211s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 211s Unpacking libfile-which-perl (1.27-2) ... 211s Selecting previously unselected package libfile-homedir-perl. 211s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 211s Unpacking libfile-homedir-perl (1.006-2) ... 211s Selecting previously unselected package libclone-choose-perl. 211s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 211s Unpacking libclone-choose-perl (0.010-2) ... 211s Selecting previously unselected package libhash-merge-perl. 211s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 211s Unpacking libhash-merge-perl (0.302-1) ... 211s Selecting previously unselected package libjson-perl. 211s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 211s Unpacking libjson-perl (4.10000-1) ... 211s Selecting previously unselected package libexporter-tiny-perl. 211s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 211s Unpacking libexporter-tiny-perl (1.006002-1) ... 211s Selecting previously unselected package liblist-moreutils-xs-perl. 211s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_arm64.deb ... 211s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 211s Selecting previously unselected package liblist-moreutils-perl. 211s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 211s Unpacking liblist-moreutils-perl (0.430-2) ... 211s Selecting previously unselected package liblog-log4perl-perl. 211s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 211s Unpacking liblog-log4perl-perl (1.57-1) ... 212s Selecting previously unselected package libmouse-perl:arm64. 212s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_arm64.deb ... 212s Unpacking libmouse-perl:arm64 (2.5.11-1build1) ... 212s Selecting previously unselected package libmousex-nativetraits-perl. 212s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 212s Unpacking libmousex-nativetraits-perl (1.09-3) ... 212s Selecting previously unselected package libmousex-strictconstructor-perl. 212s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 212s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 212s Selecting previously unselected package libparse-recdescent-perl. 212s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 212s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 212s Selecting previously unselected package libpath-tiny-perl. 212s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 212s Unpacking libpath-tiny-perl (0.146-1) ... 212s Selecting previously unselected package libpod-pom-perl. 212s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 212s Unpacking libpod-pom-perl (2.01-4) ... 212s Selecting previously unselected package libregexp-common-perl. 212s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 212s Unpacking libregexp-common-perl (2024080801-1) ... 212s Selecting previously unselected package libyaml-tiny-perl. 212s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 212s Unpacking libyaml-tiny-perl (1.76-1) ... 212s Selecting previously unselected package libconfig-model-perl. 212s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 212s Unpacking libconfig-model-perl (2.155-1) ... 212s Selecting previously unselected package libyaml-pp-perl. 212s Preparing to unpack .../051-libyaml-pp-perl_0.38.1-2_all.deb ... 212s Unpacking libyaml-pp-perl (0.38.1-2) ... 212s Selecting previously unselected package cme. 212s Preparing to unpack .../052-cme_1.041-1_all.deb ... 212s Unpacking cme (1.041-1) ... 212s Selecting previously unselected package libisl23:arm64. 212s Preparing to unpack .../053-libisl23_0.27-1_arm64.deb ... 212s Unpacking libisl23:arm64 (0.27-1) ... 212s Selecting previously unselected package libmpc3:arm64. 212s Preparing to unpack .../054-libmpc3_1.3.1-1build2_arm64.deb ... 212s Unpacking libmpc3:arm64 (1.3.1-1build2) ... 212s Selecting previously unselected package cpp-14-aarch64-linux-gnu. 212s Preparing to unpack .../055-cpp-14-aarch64-linux-gnu_14.2.0-17ubuntu1_arm64.deb ... 212s Unpacking cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 212s Selecting previously unselected package cpp-14. 212s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu1_arm64.deb ... 212s Unpacking cpp-14 (14.2.0-17ubuntu1) ... 212s Selecting previously unselected package cpp-aarch64-linux-gnu. 213s Preparing to unpack .../057-cpp-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 213s Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 213s Selecting previously unselected package cpp. 213s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_arm64.deb ... 213s Unpacking cpp (4:14.2.0-1ubuntu1) ... 213s Selecting previously unselected package libdebhelper-perl. 213s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 213s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 213s Selecting previously unselected package libcc1-0:arm64. 213s Preparing to unpack .../060-libcc1-0_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libcc1-0:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libgomp1:arm64. 213s Preparing to unpack .../061-libgomp1_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libgomp1:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libitm1:arm64. 213s Preparing to unpack .../062-libitm1_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libitm1:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libasan8:arm64. 213s Preparing to unpack .../063-libasan8_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libasan8:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package liblsan0:arm64. 213s Preparing to unpack .../064-liblsan0_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking liblsan0:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libtsan2:arm64. 213s Preparing to unpack .../065-libtsan2_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libtsan2:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libubsan1:arm64. 213s Preparing to unpack .../066-libubsan1_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libubsan1:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libhwasan0:arm64. 213s Preparing to unpack .../067-libhwasan0_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libhwasan0:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package libgcc-14-dev:arm64. 213s Preparing to unpack .../068-libgcc-14-dev_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking libgcc-14-dev:arm64 (14.2.0-17ubuntu1) ... 213s Selecting previously unselected package gcc-14-aarch64-linux-gnu. 213s Preparing to unpack .../069-gcc-14-aarch64-linux-gnu_14.2.0-17ubuntu1_arm64.deb ... 213s Unpacking gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 214s Selecting previously unselected package gcc-14. 214s Preparing to unpack .../070-gcc-14_14.2.0-17ubuntu1_arm64.deb ... 214s Unpacking gcc-14 (14.2.0-17ubuntu1) ... 214s Selecting previously unselected package gcc-aarch64-linux-gnu. 214s Preparing to unpack .../071-gcc-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 214s Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 214s Selecting previously unselected package gcc. 214s Preparing to unpack .../072-gcc_4%3a14.2.0-1ubuntu1_arm64.deb ... 214s Unpacking gcc (4:14.2.0-1ubuntu1) ... 214s Selecting previously unselected package libtool. 214s Preparing to unpack .../073-libtool_2.5.4-3build1_all.deb ... 214s Unpacking libtool (2.5.4-3build1) ... 214s Selecting previously unselected package dh-autoreconf. 214s Preparing to unpack .../074-dh-autoreconf_20_all.deb ... 214s Unpacking dh-autoreconf (20) ... 214s Selecting previously unselected package libarchive-zip-perl. 214s Preparing to unpack .../075-libarchive-zip-perl_1.68-1_all.deb ... 214s Unpacking libarchive-zip-perl (1.68-1) ... 214s Selecting previously unselected package libfile-stripnondeterminism-perl. 214s Preparing to unpack .../076-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 214s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 214s Selecting previously unselected package dh-strip-nondeterminism. 214s Preparing to unpack .../077-dh-strip-nondeterminism_1.14.1-2_all.deb ... 214s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 214s Selecting previously unselected package debugedit. 214s Preparing to unpack .../078-debugedit_1%3a5.1-2_arm64.deb ... 214s Unpacking debugedit (1:5.1-2) ... 214s Selecting previously unselected package dwz. 214s Preparing to unpack .../079-dwz_0.15-1build6_arm64.deb ... 214s Unpacking dwz (0.15-1build6) ... 214s Selecting previously unselected package gettext. 214s Preparing to unpack .../080-gettext_0.23.1-1_arm64.deb ... 214s Unpacking gettext (0.23.1-1) ... 214s Selecting previously unselected package intltool-debian. 214s Preparing to unpack .../081-intltool-debian_0.35.0+20060710.6_all.deb ... 214s Unpacking intltool-debian (0.35.0+20060710.6) ... 214s Selecting previously unselected package po-debconf. 214s Preparing to unpack .../082-po-debconf_1.0.21+nmu1_all.deb ... 214s Unpacking po-debconf (1.0.21+nmu1) ... 214s Selecting previously unselected package debhelper. 214s Preparing to unpack .../083-debhelper_13.24.1ubuntu2_all.deb ... 214s Unpacking debhelper (13.24.1ubuntu2) ... 214s Selecting previously unselected package aglfn. 215s Preparing to unpack .../084-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 215s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 215s Selecting previously unselected package gnuplot-data. 215s Preparing to unpack .../085-gnuplot-data_6.0.0+dfsg1-1ubuntu3_all.deb ... 215s Unpacking gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 215s Selecting previously unselected package fonts-dejavu-mono. 215s Preparing to unpack .../086-fonts-dejavu-mono_2.37-8_all.deb ... 215s Unpacking fonts-dejavu-mono (2.37-8) ... 215s Selecting previously unselected package fonts-dejavu-core. 215s Preparing to unpack .../087-fonts-dejavu-core_2.37-8_all.deb ... 215s Unpacking fonts-dejavu-core (2.37-8) ... 215s Selecting previously unselected package fonts-freefont-otf. 215s Preparing to unpack .../088-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 215s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 215s Selecting previously unselected package fontconfig-config. 215s Preparing to unpack .../089-fontconfig-config_2.15.0-1.1ubuntu2_arm64.deb ... 215s Unpacking fontconfig-config (2.15.0-1.1ubuntu2) ... 215s Selecting previously unselected package libfontconfig1:arm64. 215s Preparing to unpack .../090-libfontconfig1_2.15.0-1.1ubuntu2_arm64.deb ... 215s Unpacking libfontconfig1:arm64 (2.15.0-1.1ubuntu2) ... 215s Selecting previously unselected package libpixman-1-0:arm64. 215s Preparing to unpack .../091-libpixman-1-0_0.44.0-3_arm64.deb ... 215s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 215s Selecting previously unselected package libxcb-render0:arm64. 215s Preparing to unpack .../092-libxcb-render0_1.17.0-2_arm64.deb ... 215s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 215s Selecting previously unselected package libxcb-shm0:arm64. 215s Preparing to unpack .../093-libxcb-shm0_1.17.0-2_arm64.deb ... 215s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 215s Selecting previously unselected package libxrender1:arm64. 215s Preparing to unpack .../094-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 215s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 215s Selecting previously unselected package libcairo2:arm64. 215s Preparing to unpack .../095-libcairo2_1.18.2-2_arm64.deb ... 215s Unpacking libcairo2:arm64 (1.18.2-2) ... 215s Selecting previously unselected package libsharpyuv0:arm64. 215s Preparing to unpack .../096-libsharpyuv0_1.5.0-0.1_arm64.deb ... 215s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 215s Selecting previously unselected package libaom3:arm64. 215s Preparing to unpack .../097-libaom3_3.12.0-1_arm64.deb ... 215s Unpacking libaom3:arm64 (3.12.0-1) ... 215s Selecting previously unselected package libheif-plugin-aomdec:arm64. 215s Preparing to unpack .../098-libheif-plugin-aomdec_1.19.5-1build1_arm64.deb ... 215s Unpacking libheif-plugin-aomdec:arm64 (1.19.5-1build1) ... 216s Selecting previously unselected package libde265-0:arm64. 216s Preparing to unpack .../099-libde265-0_1.0.15-1build4_arm64.deb ... 216s Unpacking libde265-0:arm64 (1.0.15-1build4) ... 216s Selecting previously unselected package libheif-plugin-libde265:arm64. 216s Preparing to unpack .../100-libheif-plugin-libde265_1.19.5-1build1_arm64.deb ... 216s Unpacking libheif-plugin-libde265:arm64 (1.19.5-1build1) ... 216s Selecting previously unselected package libheif1:arm64. 216s Preparing to unpack .../101-libheif1_1.19.5-1build1_arm64.deb ... 216s Unpacking libheif1:arm64 (1.19.5-1build1) ... 216s Selecting previously unselected package libimagequant0:arm64. 216s Preparing to unpack .../102-libimagequant0_2.18.0-1build1_arm64.deb ... 216s Unpacking libimagequant0:arm64 (2.18.0-1build1) ... 216s Selecting previously unselected package libjpeg-turbo8:arm64. 216s Preparing to unpack .../103-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 216s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 216s Selecting previously unselected package libjpeg8:arm64. 216s Preparing to unpack .../104-libjpeg8_8c-2ubuntu11_arm64.deb ... 216s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 216s Selecting previously unselected package libgraphite2-3:arm64. 216s Preparing to unpack .../105-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 216s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 216s Selecting previously unselected package libharfbuzz0b:arm64. 216s Preparing to unpack .../106-libharfbuzz0b_10.2.0-1_arm64.deb ... 216s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 216s Selecting previously unselected package libraqm0:arm64. 216s Preparing to unpack .../107-libraqm0_0.10.2-1_arm64.deb ... 216s Unpacking libraqm0:arm64 (0.10.2-1) ... 216s Selecting previously unselected package libdeflate0:arm64. 216s Preparing to unpack .../108-libdeflate0_1.23-1_arm64.deb ... 216s Unpacking libdeflate0:arm64 (1.23-1) ... 216s Selecting previously unselected package libjbig0:arm64. 216s Preparing to unpack .../109-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 216s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 216s Selecting previously unselected package liblerc4:arm64. 216s Preparing to unpack .../110-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 216s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 216s Selecting previously unselected package libwebp7:arm64. 216s Preparing to unpack .../111-libwebp7_1.5.0-0.1_arm64.deb ... 216s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 216s Selecting previously unselected package libtiff6:arm64. 216s Preparing to unpack .../112-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 216s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 216s Selecting previously unselected package libxpm4:arm64. 216s Preparing to unpack .../113-libxpm4_1%3a3.5.17-1build2_arm64.deb ... 216s Unpacking libxpm4:arm64 (1:3.5.17-1build2) ... 216s Selecting previously unselected package libgd3:arm64. 216s Preparing to unpack .../114-libgd3_2.3.3-12ubuntu3_arm64.deb ... 216s Unpacking libgd3:arm64 (2.3.3-12ubuntu3) ... 216s Selecting previously unselected package liblua5.4-0:arm64. 216s Preparing to unpack .../115-liblua5.4-0_5.4.7-1_arm64.deb ... 216s Unpacking liblua5.4-0:arm64 (5.4.7-1) ... 216s Selecting previously unselected package fontconfig. 216s Preparing to unpack .../116-fontconfig_2.15.0-1.1ubuntu2_arm64.deb ... 216s Unpacking fontconfig (2.15.0-1.1ubuntu2) ... 216s Selecting previously unselected package libthai-data. 216s Preparing to unpack .../117-libthai-data_0.1.29-2build1_all.deb ... 216s Unpacking libthai-data (0.1.29-2build1) ... 216s Selecting previously unselected package libdatrie1:arm64. 216s Preparing to unpack .../118-libdatrie1_0.2.13-3build1_arm64.deb ... 216s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 217s Selecting previously unselected package libthai0:arm64. 217s Preparing to unpack .../119-libthai0_0.1.29-2build1_arm64.deb ... 217s Unpacking libthai0:arm64 (0.1.29-2build1) ... 217s Selecting previously unselected package libpango-1.0-0:arm64. 217s Preparing to unpack .../120-libpango-1.0-0_1.56.1-1_arm64.deb ... 217s Unpacking libpango-1.0-0:arm64 (1.56.1-1) ... 217s Selecting previously unselected package libpangoft2-1.0-0:arm64. 217s Preparing to unpack .../121-libpangoft2-1.0-0_1.56.1-1_arm64.deb ... 217s Unpacking libpangoft2-1.0-0:arm64 (1.56.1-1) ... 217s Selecting previously unselected package libpangocairo-1.0-0:arm64. 217s Preparing to unpack .../122-libpangocairo-1.0-0_1.56.1-1_arm64.deb ... 217s Unpacking libpangocairo-1.0-0:arm64 (1.56.1-1) ... 217s Selecting previously unselected package libwebpmux3:arm64. 217s Preparing to unpack .../123-libwebpmux3_1.5.0-0.1_arm64.deb ... 217s Unpacking libwebpmux3:arm64 (1.5.0-0.1) ... 217s Selecting previously unselected package gnuplot-nox. 217s Preparing to unpack .../124-gnuplot-nox_6.0.0+dfsg1-1ubuntu3_arm64.deb ... 217s Unpacking gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 217s Selecting previously unselected package dh-octave-autopkgtest. 217s Preparing to unpack .../125-dh-octave-autopkgtest_1.8.0_all.deb ... 217s Unpacking dh-octave-autopkgtest (1.8.0) ... 217s Selecting previously unselected package libapt-pkg-perl. 217s Preparing to unpack .../126-libapt-pkg-perl_0.1.40build8_arm64.deb ... 217s Unpacking libapt-pkg-perl (0.1.40build8) ... 217s Selecting previously unselected package libarray-intspan-perl. 217s Preparing to unpack .../127-libarray-intspan-perl_2.004-2_all.deb ... 217s Unpacking libarray-intspan-perl (2.004-2) ... 217s Selecting previously unselected package libyaml-libyaml-perl. 217s Preparing to unpack .../128-libyaml-libyaml-perl_0.903.0+ds-1_arm64.deb ... 217s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 217s Selecting previously unselected package libconfig-model-backend-yaml-perl. 217s Preparing to unpack .../129-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 217s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 217s Selecting previously unselected package libexporter-lite-perl. 217s Preparing to unpack .../130-libexporter-lite-perl_0.09-2_all.deb ... 217s Unpacking libexporter-lite-perl (0.09-2) ... 217s Selecting previously unselected package libencode-locale-perl. 217s Preparing to unpack .../131-libencode-locale-perl_1.05-3_all.deb ... 217s Unpacking libencode-locale-perl (1.05-3) ... 217s Selecting previously unselected package libtimedate-perl. 217s Preparing to unpack .../132-libtimedate-perl_2.3300-2_all.deb ... 217s Unpacking libtimedate-perl (2.3300-2) ... 217s Selecting previously unselected package libhttp-date-perl. 217s Preparing to unpack .../133-libhttp-date-perl_6.06-1_all.deb ... 217s Unpacking libhttp-date-perl (6.06-1) ... 217s Selecting previously unselected package libfile-listing-perl. 217s Preparing to unpack .../134-libfile-listing-perl_6.16-1_all.deb ... 217s Unpacking libfile-listing-perl (6.16-1) ... 217s Selecting previously unselected package libhtml-tagset-perl. 217s Preparing to unpack .../135-libhtml-tagset-perl_3.24-1_all.deb ... 217s Unpacking libhtml-tagset-perl (3.24-1) ... 217s Selecting previously unselected package liburi-perl. 217s Preparing to unpack .../136-liburi-perl_5.30-1_all.deb ... 217s Unpacking liburi-perl (5.30-1) ... 217s Selecting previously unselected package libhtml-parser-perl:arm64. 217s Preparing to unpack .../137-libhtml-parser-perl_3.83-1build1_arm64.deb ... 217s Unpacking libhtml-parser-perl:arm64 (3.83-1build1) ... 217s Selecting previously unselected package libhtml-tree-perl. 217s Preparing to unpack .../138-libhtml-tree-perl_5.07-3_all.deb ... 217s Unpacking libhtml-tree-perl (5.07-3) ... 217s Selecting previously unselected package libclone-perl:arm64. 217s Preparing to unpack .../139-libclone-perl_0.47-1_arm64.deb ... 217s Unpacking libclone-perl:arm64 (0.47-1) ... 218s Selecting previously unselected package libio-html-perl. 218s Preparing to unpack .../140-libio-html-perl_1.004-3_all.deb ... 218s Unpacking libio-html-perl (1.004-3) ... 218s Selecting previously unselected package liblwp-mediatypes-perl. 218s Preparing to unpack .../141-liblwp-mediatypes-perl_6.04-2_all.deb ... 218s Unpacking liblwp-mediatypes-perl (6.04-2) ... 218s Selecting previously unselected package libhttp-message-perl. 218s Preparing to unpack .../142-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 218s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 218s Selecting previously unselected package libhttp-cookies-perl. 218s Preparing to unpack .../143-libhttp-cookies-perl_6.11-1_all.deb ... 218s Unpacking libhttp-cookies-perl (6.11-1) ... 218s Selecting previously unselected package libhttp-negotiate-perl. 218s Preparing to unpack .../144-libhttp-negotiate-perl_6.01-2_all.deb ... 218s Unpacking libhttp-negotiate-perl (6.01-2) ... 218s Selecting previously unselected package perl-openssl-defaults:arm64. 218s Preparing to unpack .../145-perl-openssl-defaults_7build3_arm64.deb ... 218s Unpacking perl-openssl-defaults:arm64 (7build3) ... 218s Selecting previously unselected package libnet-ssleay-perl:arm64. 218s Preparing to unpack .../146-libnet-ssleay-perl_1.94-2_arm64.deb ... 218s Unpacking libnet-ssleay-perl:arm64 (1.94-2) ... 218s Selecting previously unselected package libio-socket-ssl-perl. 218s Preparing to unpack .../147-libio-socket-ssl-perl_2.089-1_all.deb ... 218s Unpacking libio-socket-ssl-perl (2.089-1) ... 218s Selecting previously unselected package libnet-http-perl. 218s Preparing to unpack .../148-libnet-http-perl_6.23-1_all.deb ... 218s Unpacking libnet-http-perl (6.23-1) ... 218s Selecting previously unselected package liblwp-protocol-https-perl. 218s Preparing to unpack .../149-liblwp-protocol-https-perl_6.14-1_all.deb ... 218s Unpacking liblwp-protocol-https-perl (6.14-1) ... 218s Selecting previously unselected package libwww-robotrules-perl. 218s Preparing to unpack .../150-libwww-robotrules-perl_6.02-1_all.deb ... 218s Unpacking libwww-robotrules-perl (6.02-1) ... 218s Selecting previously unselected package libwww-perl. 218s Preparing to unpack .../151-libwww-perl_6.77-1_all.deb ... 218s Unpacking libwww-perl (6.77-1) ... 218s Selecting previously unselected package liberror-perl. 218s Preparing to unpack .../152-liberror-perl_0.17029-2_all.deb ... 218s Unpacking liberror-perl (0.17029-2) ... 218s Selecting previously unselected package libparse-debcontrol-perl. 218s Preparing to unpack .../153-libparse-debcontrol-perl_2.005-6_all.deb ... 218s Unpacking libparse-debcontrol-perl (2.005-6) ... 218s Selecting previously unselected package libsoftware-copyright-perl. 218s Preparing to unpack .../154-libsoftware-copyright-perl_0.012-2_all.deb ... 218s Unpacking libsoftware-copyright-perl (0.012-2) ... 218s Selecting previously unselected package libalgorithm-c3-perl. 218s Preparing to unpack .../155-libalgorithm-c3-perl_0.11-2_all.deb ... 218s Unpacking libalgorithm-c3-perl (0.11-2) ... 218s Selecting previously unselected package libclass-c3-perl. 218s Preparing to unpack .../156-libclass-c3-perl_0.35-2_all.deb ... 218s Unpacking libclass-c3-perl (0.35-2) ... 218s Selecting previously unselected package libmro-compat-perl. 218s Preparing to unpack .../157-libmro-compat-perl_0.15-2_all.deb ... 218s Unpacking libmro-compat-perl (0.15-2) ... 218s Selecting previously unselected package libdata-section-perl. 218s Preparing to unpack .../158-libdata-section-perl_0.200008-1_all.deb ... 218s Unpacking libdata-section-perl (0.200008-1) ... 218s Selecting previously unselected package libtext-template-perl. 218s Preparing to unpack .../159-libtext-template-perl_1.61-1_all.deb ... 218s Unpacking libtext-template-perl (1.61-1) ... 218s Selecting previously unselected package libsoftware-license-perl. 218s Preparing to unpack .../160-libsoftware-license-perl_0.104006-1_all.deb ... 218s Unpacking libsoftware-license-perl (0.104006-1) ... 219s Selecting previously unselected package libsoftware-licensemoreutils-perl. 219s Preparing to unpack .../161-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 219s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 219s Selecting previously unselected package libsort-versions-perl. 219s Preparing to unpack .../162-libsort-versions-perl_1.62-3_all.deb ... 219s Unpacking libsort-versions-perl (1.62-3) ... 219s Selecting previously unselected package libtext-reform-perl. 219s Preparing to unpack .../163-libtext-reform-perl_1.20-5_all.deb ... 219s Unpacking libtext-reform-perl (1.20-5) ... 219s Selecting previously unselected package libtext-autoformat-perl. 219s Preparing to unpack .../164-libtext-autoformat-perl_1.750000-2_all.deb ... 219s Unpacking libtext-autoformat-perl (1.750000-2) ... 219s Selecting previously unselected package libtext-levenshtein-damerau-perl. 219s Preparing to unpack .../165-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 219s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 219s Selecting previously unselected package libtoml-tiny-perl. 219s Preparing to unpack .../166-libtoml-tiny-perl_0.18-1_all.deb ... 219s Unpacking libtoml-tiny-perl (0.18-1) ... 219s Selecting previously unselected package libclass-inspector-perl. 219s Preparing to unpack .../167-libclass-inspector-perl_1.36-3_all.deb ... 219s Unpacking libclass-inspector-perl (1.36-3) ... 219s Selecting previously unselected package libfile-sharedir-perl. 219s Preparing to unpack .../168-libfile-sharedir-perl_1.118-3_all.deb ... 219s Unpacking libfile-sharedir-perl (1.118-3) ... 219s Selecting previously unselected package libindirect-perl. 219s Preparing to unpack .../169-libindirect-perl_0.39-2build5_arm64.deb ... 219s Unpacking libindirect-perl (0.39-2build5) ... 219s Selecting previously unselected package libxs-parse-keyword-perl. 219s Preparing to unpack .../170-libxs-parse-keyword-perl_0.48-2_arm64.deb ... 219s Unpacking libxs-parse-keyword-perl (0.48-2) ... 219s Selecting previously unselected package libxs-parse-sublike-perl:arm64. 219s Preparing to unpack .../171-libxs-parse-sublike-perl_0.36-1_arm64.deb ... 219s Unpacking libxs-parse-sublike-perl:arm64 (0.36-1) ... 219s Selecting previously unselected package libobject-pad-perl. 219s Preparing to unpack .../172-libobject-pad-perl_0.819-1_arm64.deb ... 219s Unpacking libobject-pad-perl (0.819-1) ... 219s Selecting previously unselected package libsyntax-keyword-try-perl. 219s Preparing to unpack .../173-libsyntax-keyword-try-perl_0.30-1_arm64.deb ... 219s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 219s Selecting previously unselected package libio-interactive-perl. 219s Preparing to unpack .../174-libio-interactive-perl_1.026-1_all.deb ... 219s Unpacking libio-interactive-perl (1.026-1) ... 219s Selecting previously unselected package liblog-any-perl. 219s Preparing to unpack .../175-liblog-any-perl_1.717-1_all.deb ... 219s Unpacking liblog-any-perl (1.717-1) ... 219s Selecting previously unselected package liblog-any-adapter-screen-perl. 219s Preparing to unpack .../176-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 219s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 219s Selecting previously unselected package libsub-exporter-progressive-perl. 219s Preparing to unpack .../177-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 219s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 219s Selecting previously unselected package libvariable-magic-perl. 219s Preparing to unpack .../178-libvariable-magic-perl_0.64-1build1_arm64.deb ... 219s Unpacking libvariable-magic-perl (0.64-1build1) ... 219s Selecting previously unselected package libb-hooks-endofscope-perl. 219s Preparing to unpack .../179-libb-hooks-endofscope-perl_0.28-1_all.deb ... 219s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 219s Selecting previously unselected package libsub-identify-perl. 219s Preparing to unpack .../180-libsub-identify-perl_0.14-3build4_arm64.deb ... 219s Unpacking libsub-identify-perl (0.14-3build4) ... 219s Selecting previously unselected package libsub-name-perl:arm64. 219s Preparing to unpack .../181-libsub-name-perl_0.28-1_arm64.deb ... 219s Unpacking libsub-name-perl:arm64 (0.28-1) ... 219s Selecting previously unselected package libnamespace-clean-perl. 220s Preparing to unpack .../182-libnamespace-clean-perl_0.27-2_all.deb ... 220s Unpacking libnamespace-clean-perl (0.27-2) ... 220s Selecting previously unselected package libnumber-compare-perl. 220s Preparing to unpack .../183-libnumber-compare-perl_0.03-3_all.deb ... 220s Unpacking libnumber-compare-perl (0.03-3) ... 220s Selecting previously unselected package libtext-glob-perl. 220s Preparing to unpack .../184-libtext-glob-perl_0.11-3_all.deb ... 220s Unpacking libtext-glob-perl (0.11-3) ... 220s Selecting previously unselected package libpath-iterator-rule-perl. 220s Preparing to unpack .../185-libpath-iterator-rule-perl_1.015-2_all.deb ... 220s Unpacking libpath-iterator-rule-perl (1.015-2) ... 220s Selecting previously unselected package libpod-parser-perl. 220s Preparing to unpack .../186-libpod-parser-perl_1.67-1_all.deb ... 220s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 220s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 220s Unpacking libpod-parser-perl (1.67-1) ... 220s Selecting previously unselected package libpod-constants-perl. 220s Preparing to unpack .../187-libpod-constants-perl_0.19-2_all.deb ... 220s Unpacking libpod-constants-perl (0.19-2) ... 220s Selecting previously unselected package libset-intspan-perl. 220s Preparing to unpack .../188-libset-intspan-perl_1.19-3_all.deb ... 220s Unpacking libset-intspan-perl (1.19-3) ... 220s Selecting previously unselected package libstring-copyright-perl. 220s Preparing to unpack .../189-libstring-copyright-perl_0.003014-1_all.deb ... 220s Unpacking libstring-copyright-perl (0.003014-1) ... 220s Selecting previously unselected package libstring-escape-perl. 220s Preparing to unpack .../190-libstring-escape-perl_2010.002-3_all.deb ... 220s Unpacking libstring-escape-perl (2010.002-3) ... 220s Selecting previously unselected package libregexp-pattern-license-perl. 220s Preparing to unpack .../191-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 220s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 220s Selecting previously unselected package libregexp-pattern-perl. 220s Preparing to unpack .../192-libregexp-pattern-perl_0.2.14-2_all.deb ... 220s Unpacking libregexp-pattern-perl (0.2.14-2) ... 220s Selecting previously unselected package libstring-license-perl. 220s Preparing to unpack .../193-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 220s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 220s Selecting previously unselected package licensecheck. 220s Preparing to unpack .../194-licensecheck_3.3.9-1ubuntu1_all.deb ... 220s Unpacking licensecheck (3.3.9-1ubuntu1) ... 220s Selecting previously unselected package diffstat. 220s Preparing to unpack .../195-diffstat_1.67-1_arm64.deb ... 220s Unpacking diffstat (1.67-1) ... 220s Selecting previously unselected package libberkeleydb-perl:arm64. 220s Preparing to unpack .../196-libberkeleydb-perl_0.66-1_arm64.deb ... 220s Unpacking libberkeleydb-perl:arm64 (0.66-1) ... 220s Selecting previously unselected package libclass-xsaccessor-perl. 220s Preparing to unpack .../197-libclass-xsaccessor-perl_1.19-4build5_arm64.deb ... 220s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 220s Selecting previously unselected package libconfig-tiny-perl. 220s Preparing to unpack .../198-libconfig-tiny-perl_2.30-1_all.deb ... 220s Unpacking libconfig-tiny-perl (2.30-1) ... 220s Selecting previously unselected package libconst-fast-perl. 220s Preparing to unpack .../199-libconst-fast-perl_0.014-2_all.deb ... 220s Unpacking libconst-fast-perl (0.014-2) ... 220s Selecting previously unselected package libcpanel-json-xs-perl:arm64. 220s Preparing to unpack .../200-libcpanel-json-xs-perl_4.39-1_arm64.deb ... 220s Unpacking libcpanel-json-xs-perl:arm64 (4.39-1) ... 220s Selecting previously unselected package libaliased-perl. 220s Preparing to unpack .../201-libaliased-perl_0.34-3_all.deb ... 220s Unpacking libaliased-perl (0.34-3) ... 220s Selecting previously unselected package libclass-data-inheritable-perl. 220s Preparing to unpack .../202-libclass-data-inheritable-perl_0.10-1_all.deb ... 220s Unpacking libclass-data-inheritable-perl (0.10-1) ... 220s Selecting previously unselected package libdevel-stacktrace-perl. 220s Preparing to unpack .../203-libdevel-stacktrace-perl_2.0500-1_all.deb ... 220s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 221s Selecting previously unselected package libexception-class-perl. 221s Preparing to unpack .../204-libexception-class-perl_1.45-1_all.deb ... 221s Unpacking libexception-class-perl (1.45-1) ... 221s Selecting previously unselected package libiterator-perl. 221s Preparing to unpack .../205-libiterator-perl_0.03+ds1-2_all.deb ... 221s Unpacking libiterator-perl (0.03+ds1-2) ... 221s Selecting previously unselected package libiterator-util-perl. 221s Preparing to unpack .../206-libiterator-util-perl_0.02+ds1-2_all.deb ... 221s Unpacking libiterator-util-perl (0.02+ds1-2) ... 221s Selecting previously unselected package libdata-dpath-perl. 221s Preparing to unpack .../207-libdata-dpath-perl_0.60-1_all.deb ... 221s Unpacking libdata-dpath-perl (0.60-1) ... 221s Selecting previously unselected package libnet-domain-tld-perl. 221s Preparing to unpack .../208-libnet-domain-tld-perl_1.75-4_all.deb ... 221s Unpacking libnet-domain-tld-perl (1.75-4) ... 221s Selecting previously unselected package libdata-validate-domain-perl. 221s Preparing to unpack .../209-libdata-validate-domain-perl_0.15-1_all.deb ... 221s Unpacking libdata-validate-domain-perl (0.15-1) ... 221s Selecting previously unselected package libnet-ipv6addr-perl. 221s Preparing to unpack .../210-libnet-ipv6addr-perl_1.02-1_all.deb ... 221s Unpacking libnet-ipv6addr-perl (1.02-1) ... 221s Selecting previously unselected package libnet-netmask-perl. 221s Preparing to unpack .../211-libnet-netmask-perl_2.0002-2_all.deb ... 221s Unpacking libnet-netmask-perl (2.0002-2) ... 221s Selecting previously unselected package libnetaddr-ip-perl. 221s Preparing to unpack .../212-libnetaddr-ip-perl_4.079+dfsg-2build5_arm64.deb ... 221s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 221s Selecting previously unselected package libdata-validate-ip-perl. 221s Preparing to unpack .../213-libdata-validate-ip-perl_0.31-1_all.deb ... 221s Unpacking libdata-validate-ip-perl (0.31-1) ... 221s Selecting previously unselected package libdata-validate-uri-perl. 221s Preparing to unpack .../214-libdata-validate-uri-perl_0.07-3_all.deb ... 221s Unpacking libdata-validate-uri-perl (0.07-3) ... 221s Selecting previously unselected package libdevel-size-perl. 221s Preparing to unpack .../215-libdevel-size-perl_0.84-1build1_arm64.deb ... 221s Unpacking libdevel-size-perl (0.84-1build1) ... 221s Selecting previously unselected package libemail-address-xs-perl. 221s Preparing to unpack .../216-libemail-address-xs-perl_1.05-1build5_arm64.deb ... 221s Unpacking libemail-address-xs-perl (1.05-1build5) ... 221s Selecting previously unselected package libipc-system-simple-perl. 221s Preparing to unpack .../217-libipc-system-simple-perl_1.30-2_all.deb ... 221s Unpacking libipc-system-simple-perl (1.30-2) ... 221s Selecting previously unselected package libfile-basedir-perl. 221s Preparing to unpack .../218-libfile-basedir-perl_0.09-2_all.deb ... 221s Unpacking libfile-basedir-perl (0.09-2) ... 221s Selecting previously unselected package libfile-find-rule-perl. 221s Preparing to unpack .../219-libfile-find-rule-perl_0.34-3_all.deb ... 221s Unpacking libfile-find-rule-perl (0.34-3) ... 221s Selecting previously unselected package libio-string-perl. 221s Preparing to unpack .../220-libio-string-perl_1.08-4_all.deb ... 221s Unpacking libio-string-perl (1.08-4) ... 221s Selecting previously unselected package libfont-ttf-perl. 221s Preparing to unpack .../221-libfont-ttf-perl_1.06-2_all.deb ... 221s Unpacking libfont-ttf-perl (1.06-2) ... 221s Selecting previously unselected package libhtml-html5-entities-perl. 221s Preparing to unpack .../222-libhtml-html5-entities-perl_0.004-3_all.deb ... 221s Unpacking libhtml-html5-entities-perl (0.004-3) ... 221s Selecting previously unselected package libhtml-tokeparser-simple-perl. 221s Preparing to unpack .../223-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 221s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 221s Selecting previously unselected package libipc-run3-perl. 221s Preparing to unpack .../224-libipc-run3-perl_0.049-1_all.deb ... 221s Unpacking libipc-run3-perl (0.049-1) ... 222s Selecting previously unselected package libjson-maybexs-perl. 222s Preparing to unpack .../225-libjson-maybexs-perl_1.004008-1_all.deb ... 222s Unpacking libjson-maybexs-perl (1.004008-1) ... 222s Selecting previously unselected package liblist-compare-perl. 222s Preparing to unpack .../226-liblist-compare-perl_0.55-2_all.deb ... 222s Unpacking liblist-compare-perl (0.55-2) ... 222s Selecting previously unselected package liblist-someutils-perl. 222s Preparing to unpack .../227-liblist-someutils-perl_0.59-1_all.deb ... 222s Unpacking liblist-someutils-perl (0.59-1) ... 222s Selecting previously unselected package liblist-utilsby-perl. 222s Preparing to unpack .../228-liblist-utilsby-perl_0.12-2_all.deb ... 222s Unpacking liblist-utilsby-perl (0.12-2) ... 222s Selecting previously unselected package libmldbm-perl. 222s Preparing to unpack .../229-libmldbm-perl_2.05-4_all.deb ... 222s Unpacking libmldbm-perl (2.05-4) ... 222s Selecting previously unselected package libclass-method-modifiers-perl. 222s Preparing to unpack .../230-libclass-method-modifiers-perl_2.15-1_all.deb ... 222s Unpacking libclass-method-modifiers-perl (2.15-1) ... 222s Selecting previously unselected package libimport-into-perl. 222s Preparing to unpack .../231-libimport-into-perl_1.002005-2_all.deb ... 222s Unpacking libimport-into-perl (1.002005-2) ... 222s Selecting previously unselected package librole-tiny-perl. 222s Preparing to unpack .../232-librole-tiny-perl_2.002004-1_all.deb ... 222s Unpacking librole-tiny-perl (2.002004-1) ... 222s Selecting previously unselected package libsub-quote-perl. 222s Preparing to unpack .../233-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 222s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 222s Selecting previously unselected package libmoo-perl. 222s Preparing to unpack .../234-libmoo-perl_2.005005-1_all.deb ... 222s Unpacking libmoo-perl (2.005005-1) ... 222s Selecting previously unselected package libstrictures-perl. 222s Preparing to unpack .../235-libstrictures-perl_2.000006-1_all.deb ... 222s Unpacking libstrictures-perl (2.000006-1) ... 222s Selecting previously unselected package libmoox-aliases-perl. 222s Preparing to unpack .../236-libmoox-aliases-perl_0.001006-2_all.deb ... 222s Unpacking libmoox-aliases-perl (0.001006-2) ... 222s Selecting previously unselected package libperlio-gzip-perl. 222s Preparing to unpack .../237-libperlio-gzip-perl_0.20-1build5_arm64.deb ... 222s Unpacking libperlio-gzip-perl (0.20-1build5) ... 222s Selecting previously unselected package libperlio-utf8-strict-perl. 222s Preparing to unpack .../238-libperlio-utf8-strict-perl_0.010-1build4_arm64.deb ... 222s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 222s Selecting previously unselected package libproc-processtable-perl:arm64. 222s Preparing to unpack .../239-libproc-processtable-perl_0.636-1build4_arm64.deb ... 222s Unpacking libproc-processtable-perl:arm64 (0.636-1build4) ... 222s Selecting previously unselected package libregexp-wildcards-perl. 222s Preparing to unpack .../240-libregexp-wildcards-perl_1.05-3_all.deb ... 222s Unpacking libregexp-wildcards-perl (1.05-3) ... 222s Selecting previously unselected package libsereal-decoder-perl. 222s Preparing to unpack .../241-libsereal-decoder-perl_5.004+ds-1build4_arm64.deb ... 222s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 222s Selecting previously unselected package libsereal-encoder-perl. 222s Preparing to unpack .../242-libsereal-encoder-perl_5.004+ds-1build4_arm64.deb ... 222s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 222s Selecting previously unselected package libterm-readkey-perl. 222s Preparing to unpack .../243-libterm-readkey-perl_2.38-2build5_arm64.deb ... 222s Unpacking libterm-readkey-perl (2.38-2build5) ... 222s Selecting previously unselected package libtext-levenshteinxs-perl. 222s Preparing to unpack .../244-libtext-levenshteinxs-perl_0.03-5build5_arm64.deb ... 222s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 222s Selecting previously unselected package libmarkdown2:arm64. 222s Preparing to unpack .../245-libmarkdown2_2.2.7-2ubuntu1_arm64.deb ... 222s Unpacking libmarkdown2:arm64 (2.2.7-2ubuntu1) ... 222s Selecting previously unselected package libtext-markdown-discount-perl. 223s Preparing to unpack .../246-libtext-markdown-discount-perl_0.18-1_arm64.deb ... 223s Unpacking libtext-markdown-discount-perl (0.18-1) ... 223s Selecting previously unselected package libdata-messagepack-perl. 223s Preparing to unpack .../247-libdata-messagepack-perl_1.02-1build5_arm64.deb ... 223s Unpacking libdata-messagepack-perl (1.02-1build5) ... 223s Selecting previously unselected package libtext-xslate-perl:arm64. 223s Preparing to unpack .../248-libtext-xslate-perl_3.5.9-2build1_arm64.deb ... 223s Unpacking libtext-xslate-perl:arm64 (3.5.9-2build1) ... 223s Selecting previously unselected package libtime-duration-perl. 223s Preparing to unpack .../249-libtime-duration-perl_1.21-2_all.deb ... 223s Unpacking libtime-duration-perl (1.21-2) ... 223s Selecting previously unselected package libtime-moment-perl. 223s Preparing to unpack .../250-libtime-moment-perl_0.44-2build5_arm64.deb ... 223s Unpacking libtime-moment-perl (0.44-2build5) ... 223s Selecting previously unselected package libunicode-utf8-perl. 223s Preparing to unpack .../251-libunicode-utf8-perl_0.62-2build4_arm64.deb ... 223s Unpacking libunicode-utf8-perl (0.62-2build4) ... 223s Selecting previously unselected package libcgi-pm-perl. 223s Preparing to unpack .../252-libcgi-pm-perl_4.67-1_all.deb ... 223s Unpacking libcgi-pm-perl (4.67-1) ... 223s Selecting previously unselected package libhtml-form-perl. 223s Preparing to unpack .../253-libhtml-form-perl_6.12-1_all.deb ... 223s Unpacking libhtml-form-perl (6.12-1) ... 223s Selecting previously unselected package libwww-mechanize-perl. 223s Preparing to unpack .../254-libwww-mechanize-perl_2.18-1ubuntu1_all.deb ... 223s Unpacking libwww-mechanize-perl (2.18-1ubuntu1) ... 223s Selecting previously unselected package libxml-namespacesupport-perl. 223s Preparing to unpack .../255-libxml-namespacesupport-perl_1.12-2_all.deb ... 223s Unpacking libxml-namespacesupport-perl (1.12-2) ... 223s Selecting previously unselected package libxml-sax-base-perl. 223s Preparing to unpack .../256-libxml-sax-base-perl_1.09-3_all.deb ... 223s Unpacking libxml-sax-base-perl (1.09-3) ... 223s Selecting previously unselected package libxml-sax-perl. 223s Preparing to unpack .../257-libxml-sax-perl_1.02+dfsg-4_all.deb ... 223s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 223s Selecting previously unselected package libxml-libxml-perl. 223s Preparing to unpack .../258-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_arm64.deb ... 223s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 223s Selecting previously unselected package lzip. 223s Preparing to unpack .../259-lzip_1.25-1_arm64.deb ... 223s Unpacking lzip (1.25-1) ... 223s Selecting previously unselected package lzop. 223s Preparing to unpack .../260-lzop_1.04-2build3_arm64.deb ... 223s Unpacking lzop (1.04-2build3) ... 223s Selecting previously unselected package patchutils. 223s Preparing to unpack .../261-patchutils_0.4.2-1build3_arm64.deb ... 223s Unpacking patchutils (0.4.2-1build3) ... 223s Selecting previously unselected package t1utils. 223s Preparing to unpack .../262-t1utils_1.41-4build3_arm64.deb ... 223s Unpacking t1utils (1.41-4build3) ... 223s Selecting previously unselected package unzip. 223s Preparing to unpack .../263-unzip_6.0-28ubuntu6_arm64.deb ... 223s Unpacking unzip (6.0-28ubuntu6) ... 223s Selecting previously unselected package lintian. 223s Preparing to unpack .../264-lintian_2.121.1ubuntu1_all.deb ... 223s Unpacking lintian (2.121.1ubuntu1) ... 224s Selecting previously unselected package libconfig-model-dpkg-perl. 224s Preparing to unpack .../265-libconfig-model-dpkg-perl_3.010_all.deb ... 224s Unpacking libconfig-model-dpkg-perl (3.010) ... 224s Selecting previously unselected package libconvert-binhex-perl. 224s Preparing to unpack .../266-libconvert-binhex-perl_1.125-3_all.deb ... 224s Unpacking libconvert-binhex-perl (1.125-3) ... 224s Selecting previously unselected package libnet-smtp-ssl-perl. 224s Preparing to unpack .../267-libnet-smtp-ssl-perl_1.04-2_all.deb ... 224s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 224s Selecting previously unselected package libmailtools-perl. 224s Preparing to unpack .../268-libmailtools-perl_2.22-1_all.deb ... 224s Unpacking libmailtools-perl (2.22-1) ... 224s Selecting previously unselected package libmime-tools-perl. 224s Preparing to unpack .../269-libmime-tools-perl_5.515-1_all.deb ... 224s Unpacking libmime-tools-perl (5.515-1) ... 224s Selecting previously unselected package libsuitesparseconfig7:arm64. 224s Preparing to unpack .../270-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libsuitesparseconfig7:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libamd3:arm64. 224s Preparing to unpack .../271-libamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libamd3:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libblas3:arm64. 224s Preparing to unpack .../272-libblas3_3.12.1-2_arm64.deb ... 224s Unpacking libblas3:arm64 (3.12.1-2) ... 224s Selecting previously unselected package libgfortran5:arm64. 224s Preparing to unpack .../273-libgfortran5_14.2.0-17ubuntu1_arm64.deb ... 224s Unpacking libgfortran5:arm64 (14.2.0-17ubuntu1) ... 224s Selecting previously unselected package liblapack3:arm64. 224s Preparing to unpack .../274-liblapack3_3.12.1-2_arm64.deb ... 224s Unpacking liblapack3:arm64 (3.12.1-2) ... 224s Selecting previously unselected package libarpack2t64:arm64. 224s Preparing to unpack .../275-libarpack2t64_3.9.1-4_arm64.deb ... 224s Unpacking libarpack2t64:arm64 (3.9.1-4) ... 224s Selecting previously unselected package libccolamd3:arm64. 224s Preparing to unpack .../276-libccolamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libccolamd3:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libcamd3:arm64. 224s Preparing to unpack .../277-libcamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libcamd3:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libcolamd3:arm64. 224s Preparing to unpack .../278-libcolamd3_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libcolamd3:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libcholmod5:arm64. 224s Preparing to unpack .../279-libcholmod5_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libcholmod5:arm64 (1:7.8.3+dfsg-3) ... 224s Selecting previously unselected package libcxsparse4:arm64. 224s Preparing to unpack .../280-libcxsparse4_1%3a7.8.3+dfsg-3_arm64.deb ... 224s Unpacking libcxsparse4:arm64 (1:7.8.3+dfsg-3) ... 225s Selecting previously unselected package libfftw3-double3:arm64. 225s Preparing to unpack .../281-libfftw3-double3_3.3.10-2fakesync1build1_arm64.deb ... 225s Unpacking libfftw3-double3:arm64 (3.3.10-2fakesync1build1) ... 225s Selecting previously unselected package libfftw3-single3:arm64. 225s Preparing to unpack .../282-libfftw3-single3_3.3.10-2fakesync1build1_arm64.deb ... 225s Unpacking libfftw3-single3:arm64 (3.3.10-2fakesync1build1) ... 225s Selecting previously unselected package libxfixes3:arm64. 225s Preparing to unpack .../283-libxfixes3_1%3a6.0.0-2build1_arm64.deb ... 225s Unpacking libxfixes3:arm64 (1:6.0.0-2build1) ... 225s Selecting previously unselected package libxcursor1:arm64. 225s Preparing to unpack .../284-libxcursor1_1%3a1.2.3-1_arm64.deb ... 225s Unpacking libxcursor1:arm64 (1:1.2.3-1) ... 225s Selecting previously unselected package libxft2:arm64. 225s Preparing to unpack .../285-libxft2_2.3.6-1build1_arm64.deb ... 225s Unpacking libxft2:arm64 (2.3.6-1build1) ... 225s Selecting previously unselected package libxinerama1:arm64. 225s Preparing to unpack .../286-libxinerama1_2%3a1.1.4-3build1_arm64.deb ... 225s Unpacking libxinerama1:arm64 (2:1.1.4-3build1) ... 225s Selecting previously unselected package libfltk1.3t64:arm64. 225s Preparing to unpack .../287-libfltk1.3t64_1.3.8-6.1build2_arm64.deb ... 225s Unpacking libfltk1.3t64:arm64 (1.3.8-6.1build2) ... 225s Selecting previously unselected package libglvnd0:arm64. 225s Preparing to unpack .../288-libglvnd0_1.7.0-1build1_arm64.deb ... 225s Unpacking libglvnd0:arm64 (1.7.0-1build1) ... 225s Selecting previously unselected package libglapi-mesa:arm64. 225s Preparing to unpack .../289-libglapi-mesa_24.3.4-3ubuntu1_arm64.deb ... 225s Unpacking libglapi-mesa:arm64 (24.3.4-3ubuntu1) ... 225s Selecting previously unselected package libx11-xcb1:arm64. 225s Preparing to unpack .../290-libx11-xcb1_2%3a1.8.10-2_arm64.deb ... 225s Unpacking libx11-xcb1:arm64 (2:1.8.10-2) ... 225s Selecting previously unselected package libxcb-dri3-0:arm64. 225s Preparing to unpack .../291-libxcb-dri3-0_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-dri3-0:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxcb-glx0:arm64. 225s Preparing to unpack .../292-libxcb-glx0_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-glx0:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxcb-present0:arm64. 225s Preparing to unpack .../293-libxcb-present0_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-present0:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxcb-xfixes0:arm64. 225s Preparing to unpack .../294-libxcb-xfixes0_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-xfixes0:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxxf86vm1:arm64. 225s Preparing to unpack .../295-libxxf86vm1_1%3a1.1.4-1build4_arm64.deb ... 225s Unpacking libxxf86vm1:arm64 (1:1.1.4-1build4) ... 225s Selecting previously unselected package libdrm-radeon1:arm64. 225s Preparing to unpack .../296-libdrm-radeon1_2.4.123-1_arm64.deb ... 225s Unpacking libdrm-radeon1:arm64 (2.4.123-1) ... 225s Selecting previously unselected package libxcb-randr0:arm64. 225s Preparing to unpack .../297-libxcb-randr0_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-randr0:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxcb-sync1:arm64. 225s Preparing to unpack .../298-libxcb-sync1_1.17.0-2_arm64.deb ... 225s Unpacking libxcb-sync1:arm64 (1.17.0-2) ... 225s Selecting previously unselected package libxshmfence1:arm64. 225s Preparing to unpack .../299-libxshmfence1_1.3-1build5_arm64.deb ... 225s Unpacking libxshmfence1:arm64 (1.3-1build5) ... 226s Selecting previously unselected package mesa-libgallium:arm64. 226s Preparing to unpack .../300-mesa-libgallium_24.3.4-3ubuntu1_arm64.deb ... 226s Unpacking mesa-libgallium:arm64 (24.3.4-3ubuntu1) ... 226s Selecting previously unselected package libwayland-server0:arm64. 226s Preparing to unpack .../301-libwayland-server0_1.23.1-1_arm64.deb ... 226s Unpacking libwayland-server0:arm64 (1.23.1-1) ... 226s Selecting previously unselected package libgbm1:arm64. 226s Preparing to unpack .../302-libgbm1_24.3.4-3ubuntu1_arm64.deb ... 226s Unpacking libgbm1:arm64 (24.3.4-3ubuntu1) ... 226s Selecting previously unselected package libvulkan1:arm64. 226s Preparing to unpack .../303-libvulkan1_1.4.304.0-1_arm64.deb ... 226s Unpacking libvulkan1:arm64 (1.4.304.0-1) ... 226s Selecting previously unselected package libgl1-mesa-dri:arm64. 226s Preparing to unpack .../304-libgl1-mesa-dri_24.3.4-3ubuntu1_arm64.deb ... 226s Unpacking libgl1-mesa-dri:arm64 (24.3.4-3ubuntu1) ... 226s Selecting previously unselected package libglx-mesa0:arm64. 226s Preparing to unpack .../305-libglx-mesa0_24.3.4-3ubuntu1_arm64.deb ... 226s Unpacking libglx-mesa0:arm64 (24.3.4-3ubuntu1) ... 226s Selecting previously unselected package libglx0:arm64. 226s Preparing to unpack .../306-libglx0_1.7.0-1build1_arm64.deb ... 226s Unpacking libglx0:arm64 (1.7.0-1build1) ... 226s Selecting previously unselected package libgl1:arm64. 226s Preparing to unpack .../307-libgl1_1.7.0-1build1_arm64.deb ... 226s Unpacking libgl1:arm64 (1.7.0-1build1) ... 226s Selecting previously unselected package libfltk-gl1.3t64:arm64. 226s Preparing to unpack .../308-libfltk-gl1.3t64_1.3.8-6.1build2_arm64.deb ... 226s Unpacking libfltk-gl1.3t64:arm64 (1.3.8-6.1build2) ... 226s Selecting previously unselected package libgl2ps1.4. 226s Preparing to unpack .../309-libgl2ps1.4_1.4.2+dfsg1-2build1_arm64.deb ... 226s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 226s Selecting previously unselected package libltdl7:arm64. 226s Preparing to unpack .../310-libltdl7_2.5.4-3build1_arm64.deb ... 226s Unpacking libltdl7:arm64 (2.5.4-3build1) ... 226s Selecting previously unselected package libglpk40:arm64. 226s Preparing to unpack .../311-libglpk40_5.0-1build2_arm64.deb ... 226s Unpacking libglpk40:arm64 (5.0-1build2) ... 226s Selecting previously unselected package libopengl0:arm64. 226s Preparing to unpack .../312-libopengl0_1.7.0-1build1_arm64.deb ... 226s Unpacking libopengl0:arm64 (1.7.0-1build1) ... 226s Selecting previously unselected package libglu1-mesa:arm64. 226s Preparing to unpack .../313-libglu1-mesa_9.0.2-1.1build1_arm64.deb ... 226s Unpacking libglu1-mesa:arm64 (9.0.2-1.1build1) ... 226s Selecting previously unselected package libhwy1t64:arm64. 226s Preparing to unpack .../314-libhwy1t64_1.2.0-3ubuntu3_arm64.deb ... 226s Unpacking libhwy1t64:arm64 (1.2.0-3ubuntu3) ... 226s Selecting previously unselected package liblcms2-2:arm64. 226s Preparing to unpack .../315-liblcms2-2_2.16-2_arm64.deb ... 226s Unpacking liblcms2-2:arm64 (2.16-2) ... 226s Selecting previously unselected package libjxl0.11:arm64. 226s Preparing to unpack .../316-libjxl0.11_0.11.1-1_arm64.deb ... 226s Unpacking libjxl0.11:arm64 (0.11.1-1) ... 227s Selecting previously unselected package libwmflite-0.2-7:arm64. 227s Preparing to unpack .../317-libwmflite-0.2-7_0.2.13-1.1build3_arm64.deb ... 227s Unpacking libwmflite-0.2-7:arm64 (0.2.13-1.1build3) ... 227s Selecting previously unselected package libgraphicsmagick-q16-3t64. 227s Preparing to unpack .../318-libgraphicsmagick-q16-3t64_1.4+really1.3.45-1build2_arm64.deb ... 227s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 227s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 227s Preparing to unpack .../319-libgraphicsmagick++-q16-12t64_1.4+really1.3.45-1build2_arm64.deb ... 227s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 227s Selecting previously unselected package libaec0:arm64. 227s Preparing to unpack .../320-libaec0_1.1.3-1_arm64.deb ... 227s Unpacking libaec0:arm64 (1.1.3-1) ... 227s Selecting previously unselected package libsz2:arm64. 227s Preparing to unpack .../321-libsz2_1.1.3-1_arm64.deb ... 227s Unpacking libsz2:arm64 (1.1.3-1) ... 227s Selecting previously unselected package libhdf5-310:arm64. 227s Preparing to unpack .../322-libhdf5-310_1.14.5+repack-3_arm64.deb ... 227s Unpacking libhdf5-310:arm64 (1.14.5+repack-3) ... 227s Selecting previously unselected package libasound2-data. 227s Preparing to unpack .../323-libasound2-data_1.2.13-1build1_all.deb ... 227s Unpacking libasound2-data (1.2.13-1build1) ... 227s Selecting previously unselected package libasound2t64:arm64. 227s Preparing to unpack .../324-libasound2t64_1.2.13-1build1_arm64.deb ... 227s Unpacking libasound2t64:arm64 (1.2.13-1build1) ... 227s Selecting previously unselected package libopus0:arm64. 227s Preparing to unpack .../325-libopus0_1.5.2-2_arm64.deb ... 227s Unpacking libopus0:arm64 (1.5.2-2) ... 227s Selecting previously unselected package libsamplerate0:arm64. 227s Preparing to unpack .../326-libsamplerate0_0.2.2-4build1_arm64.deb ... 227s Unpacking libsamplerate0:arm64 (0.2.2-4build1) ... 227s Selecting previously unselected package libjack-jackd2-0:arm64. 227s Preparing to unpack .../327-libjack-jackd2-0_1.9.22~dfsg-4_arm64.deb ... 227s Unpacking libjack-jackd2-0:arm64 (1.9.22~dfsg-4) ... 227s Selecting previously unselected package libportaudio2:arm64. 227s Preparing to unpack .../328-libportaudio2_19.6.0-1.2build3_arm64.deb ... 227s Unpacking libportaudio2:arm64 (19.6.0-1.2build3) ... 227s Selecting previously unselected package libqhull-r8.0:arm64. 227s Preparing to unpack .../329-libqhull-r8.0_2020.2-6build1_arm64.deb ... 227s Unpacking libqhull-r8.0:arm64 (2020.2-6build1) ... 227s Selecting previously unselected package libqrupdate1:arm64. 227s Preparing to unpack .../330-libqrupdate1_1.1.5-1_arm64.deb ... 227s Unpacking libqrupdate1:arm64 (1.1.5-1) ... 227s Selecting previously unselected package libqscintilla2-qt6-l10n. 227s Preparing to unpack .../331-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 227s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 227s Selecting previously unselected package libb2-1:arm64. 227s Preparing to unpack .../332-libb2-1_0.98.1-1.1build1_arm64.deb ... 227s Unpacking libb2-1:arm64 (0.98.1-1.1build1) ... 227s Selecting previously unselected package libdouble-conversion3:arm64. 227s Preparing to unpack .../333-libdouble-conversion3_3.3.0-1build1_arm64.deb ... 227s Unpacking libdouble-conversion3:arm64 (3.3.0-1build1) ... 227s Selecting previously unselected package libpcre2-16-0:arm64. 227s Preparing to unpack .../334-libpcre2-16-0_10.42-4ubuntu3_arm64.deb ... 227s Unpacking libpcre2-16-0:arm64 (10.42-4ubuntu3) ... 227s Selecting previously unselected package libqt6core6t64:arm64. 227s Preparing to unpack .../335-libqt6core6t64_6.8.1+dfsg-0ubuntu4_arm64.deb ... 227s Unpacking libqt6core6t64:arm64 (6.8.1+dfsg-0ubuntu4) ... 228s Selecting previously unselected package libwayland-client0:arm64. 228s Preparing to unpack .../336-libwayland-client0_1.23.1-1_arm64.deb ... 228s Unpacking libwayland-client0:arm64 (1.23.1-1) ... 228s Selecting previously unselected package libegl-mesa0:arm64. 228s Preparing to unpack .../337-libegl-mesa0_24.3.4-3ubuntu1_arm64.deb ... 228s Unpacking libegl-mesa0:arm64 (24.3.4-3ubuntu1) ... 228s Selecting previously unselected package libegl1:arm64. 228s Preparing to unpack .../338-libegl1_1.7.0-1build1_arm64.deb ... 228s Unpacking libegl1:arm64 (1.7.0-1build1) ... 228s Selecting previously unselected package x11-common. 228s Preparing to unpack .../339-x11-common_1%3a7.7+23ubuntu3_all.deb ... 228s Unpacking x11-common (1:7.7+23ubuntu3) ... 228s Selecting previously unselected package libice6:arm64. 228s Preparing to unpack .../340-libice6_2%3a1.1.1-1_arm64.deb ... 228s Unpacking libice6:arm64 (2:1.1.1-1) ... 228s Selecting previously unselected package libmtdev1t64:arm64. 228s Preparing to unpack .../341-libmtdev1t64_1.1.7-1_arm64.deb ... 228s Unpacking libmtdev1t64:arm64 (1.1.7-1) ... 228s Selecting previously unselected package libwacom-common. 228s Preparing to unpack .../342-libwacom-common_2.14.0-1_all.deb ... 228s Unpacking libwacom-common (2.14.0-1) ... 228s Selecting previously unselected package libwacom9:arm64. 228s Preparing to unpack .../343-libwacom9_2.14.0-1_arm64.deb ... 228s Unpacking libwacom9:arm64 (2.14.0-1) ... 228s Selecting previously unselected package libinput-bin. 228s Preparing to unpack .../344-libinput-bin_1.27.1-1_arm64.deb ... 228s Unpacking libinput-bin (1.27.1-1) ... 228s Selecting previously unselected package libinput10:arm64. 228s Preparing to unpack .../345-libinput10_1.27.1-1_arm64.deb ... 228s Unpacking libinput10:arm64 (1.27.1-1) ... 228s Selecting previously unselected package libmd4c0:arm64. 228s Preparing to unpack .../346-libmd4c0_0.5.2-2_arm64.deb ... 228s Unpacking libmd4c0:arm64 (0.5.2-2) ... 228s Selecting previously unselected package libqt6dbus6:arm64. 228s Preparing to unpack .../347-libqt6dbus6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 228s Unpacking libqt6dbus6:arm64 (6.8.1+dfsg-0ubuntu4) ... 228s Selecting previously unselected package libsm6:arm64. 228s Preparing to unpack .../348-libsm6_2%3a1.2.4-1_arm64.deb ... 228s Unpacking libsm6:arm64 (2:1.2.4-1) ... 228s Selecting previously unselected package libts0t64:arm64. 228s Preparing to unpack .../349-libts0t64_1.22-1.1build1_arm64.deb ... 228s Unpacking libts0t64:arm64 (1.22-1.1build1) ... 228s Selecting previously unselected package libxcb-util1:arm64. 228s Preparing to unpack .../350-libxcb-util1_0.4.1-1_arm64.deb ... 228s Unpacking libxcb-util1:arm64 (0.4.1-1) ... 228s Selecting previously unselected package libxcb-image0:arm64. 228s Preparing to unpack .../351-libxcb-image0_0.4.0-2build1_arm64.deb ... 228s Unpacking libxcb-image0:arm64 (0.4.0-2build1) ... 228s Selecting previously unselected package libxcb-render-util0:arm64. 228s Preparing to unpack .../352-libxcb-render-util0_0.3.10-1_arm64.deb ... 228s Unpacking libxcb-render-util0:arm64 (0.3.10-1) ... 228s Selecting previously unselected package libxcb-cursor0:arm64. 228s Preparing to unpack .../353-libxcb-cursor0_0.1.5-1_arm64.deb ... 228s Unpacking libxcb-cursor0:arm64 (0.1.5-1) ... 228s Selecting previously unselected package libxcb-icccm4:arm64. 229s Preparing to unpack .../354-libxcb-icccm4_0.4.2-1_arm64.deb ... 229s Unpacking libxcb-icccm4:arm64 (0.4.2-1) ... 229s Selecting previously unselected package libxcb-keysyms1:arm64. 229s Preparing to unpack .../355-libxcb-keysyms1_0.4.1-1_arm64.deb ... 229s Unpacking libxcb-keysyms1:arm64 (0.4.1-1) ... 229s Selecting previously unselected package libxcb-shape0:arm64. 229s Preparing to unpack .../356-libxcb-shape0_1.17.0-2_arm64.deb ... 229s Unpacking libxcb-shape0:arm64 (1.17.0-2) ... 229s Selecting previously unselected package libxcb-xinput0:arm64. 229s Preparing to unpack .../357-libxcb-xinput0_1.17.0-2_arm64.deb ... 229s Unpacking libxcb-xinput0:arm64 (1.17.0-2) ... 229s Selecting previously unselected package libxcb-xkb1:arm64. 229s Preparing to unpack .../358-libxcb-xkb1_1.17.0-2_arm64.deb ... 229s Unpacking libxcb-xkb1:arm64 (1.17.0-2) ... 229s Selecting previously unselected package libxkbcommon-x11-0:arm64. 229s Preparing to unpack .../359-libxkbcommon-x11-0_1.7.0-2_arm64.deb ... 229s Unpacking libxkbcommon-x11-0:arm64 (1.7.0-2) ... 229s Selecting previously unselected package libqt6gui6:arm64. 229s Preparing to unpack .../360-libqt6gui6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 229s Unpacking libqt6gui6:arm64 (6.8.1+dfsg-0ubuntu4) ... 229s Selecting previously unselected package libavahi-common-data:arm64. 229s Preparing to unpack .../361-libavahi-common-data_0.8-14ubuntu1_arm64.deb ... 229s Unpacking libavahi-common-data:arm64 (0.8-14ubuntu1) ... 229s Selecting previously unselected package libavahi-common3:arm64. 229s Preparing to unpack .../362-libavahi-common3_0.8-14ubuntu1_arm64.deb ... 229s Unpacking libavahi-common3:arm64 (0.8-14ubuntu1) ... 229s Selecting previously unselected package libavahi-client3:arm64. 229s Preparing to unpack .../363-libavahi-client3_0.8-14ubuntu1_arm64.deb ... 229s Unpacking libavahi-client3:arm64 (0.8-14ubuntu1) ... 229s Selecting previously unselected package libcups2t64:arm64. 229s Preparing to unpack .../364-libcups2t64_2.4.11-0ubuntu2_arm64.deb ... 229s Unpacking libcups2t64:arm64 (2.4.11-0ubuntu2) ... 229s Selecting previously unselected package libqt6widgets6:arm64. 229s Preparing to unpack .../365-libqt6widgets6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 229s Unpacking libqt6widgets6:arm64 (6.8.1+dfsg-0ubuntu4) ... 229s Selecting previously unselected package libqt6printsupport6:arm64. 229s Preparing to unpack .../366-libqt6printsupport6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 229s Unpacking libqt6printsupport6:arm64 (6.8.1+dfsg-0ubuntu4) ... 229s Selecting previously unselected package libqscintilla2-qt6-15:arm64. 229s Preparing to unpack .../367-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_arm64.deb ... 229s Unpacking libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-1build4) ... 229s Selecting previously unselected package libqt6core5compat6:arm64. 229s Preparing to unpack .../368-libqt6core5compat6_6.8.1-0ubuntu2_arm64.deb ... 229s Unpacking libqt6core5compat6:arm64 (6.8.1-0ubuntu2) ... 229s Selecting previously unselected package libqt6sql6:arm64. 229s Preparing to unpack .../369-libqt6sql6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 229s Unpacking libqt6sql6:arm64 (6.8.1+dfsg-0ubuntu4) ... 229s Selecting previously unselected package libqt6help6:arm64. 229s Preparing to unpack .../370-libqt6help6_6.8.1-0ubuntu1_arm64.deb ... 229s Unpacking libqt6help6:arm64 (6.8.1-0ubuntu1) ... 229s Selecting previously unselected package libduktape207:arm64. 230s Preparing to unpack .../371-libduktape207_2.7.0+tests-0ubuntu3_arm64.deb ... 230s Unpacking libduktape207:arm64 (2.7.0+tests-0ubuntu3) ... 230s Selecting previously unselected package libproxy1v5:arm64. 230s Preparing to unpack .../372-libproxy1v5_0.5.9-1_arm64.deb ... 230s Unpacking libproxy1v5:arm64 (0.5.9-1) ... 230s Selecting previously unselected package libqt6network6:arm64. 230s Preparing to unpack .../373-libqt6network6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 230s Unpacking libqt6network6:arm64 (6.8.1+dfsg-0ubuntu4) ... 230s Selecting previously unselected package libqt6opengl6:arm64. 230s Preparing to unpack .../374-libqt6opengl6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 230s Unpacking libqt6opengl6:arm64 (6.8.1+dfsg-0ubuntu4) ... 230s Selecting previously unselected package libqt6openglwidgets6:arm64. 230s Preparing to unpack .../375-libqt6openglwidgets6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 230s Unpacking libqt6openglwidgets6:arm64 (6.8.1+dfsg-0ubuntu4) ... 230s Selecting previously unselected package libqt6xml6:arm64. 230s Preparing to unpack .../376-libqt6xml6_6.8.1+dfsg-0ubuntu4_arm64.deb ... 230s Unpacking libqt6xml6:arm64 (6.8.1+dfsg-0ubuntu4) ... 230s Selecting previously unselected package libogg0:arm64. 230s Preparing to unpack .../377-libogg0_1.3.5-3build1_arm64.deb ... 230s Unpacking libogg0:arm64 (1.3.5-3build1) ... 230s Selecting previously unselected package libflac12t64:arm64. 230s Preparing to unpack .../378-libflac12t64_1.4.3+ds-4_arm64.deb ... 230s Unpacking libflac12t64:arm64 (1.4.3+ds-4) ... 230s Selecting previously unselected package libmp3lame0:arm64. 230s Preparing to unpack .../379-libmp3lame0_3.100-6build1_arm64.deb ... 230s Unpacking libmp3lame0:arm64 (3.100-6build1) ... 230s Selecting previously unselected package libmpg123-0t64:arm64. 230s Preparing to unpack .../380-libmpg123-0t64_1.32.10-1_arm64.deb ... 230s Unpacking libmpg123-0t64:arm64 (1.32.10-1) ... 230s Selecting previously unselected package libvorbis0a:arm64. 230s Preparing to unpack .../381-libvorbis0a_1.3.7-2_arm64.deb ... 230s Unpacking libvorbis0a:arm64 (1.3.7-2) ... 230s Selecting previously unselected package libvorbisenc2:arm64. 230s Preparing to unpack .../382-libvorbisenc2_1.3.7-2_arm64.deb ... 230s Unpacking libvorbisenc2:arm64 (1.3.7-2) ... 230s Selecting previously unselected package libsndfile1:arm64. 230s Preparing to unpack .../383-libsndfile1_1.2.2-2_arm64.deb ... 230s Unpacking libsndfile1:arm64 (1.2.2-2) ... 230s Selecting previously unselected package libspqr4:arm64. 230s Preparing to unpack .../384-libspqr4_1%3a7.8.3+dfsg-3_arm64.deb ... 230s Unpacking libspqr4:arm64 (1:7.8.3+dfsg-3) ... 230s Selecting previously unselected package libumfpack6:arm64. 230s Preparing to unpack .../385-libumfpack6_1%3a7.8.3+dfsg-3_arm64.deb ... 230s Unpacking libumfpack6:arm64 (1:7.8.3+dfsg-3) ... 230s Selecting previously unselected package libtext-unidecode-perl. 230s Preparing to unpack .../386-libtext-unidecode-perl_1.30-3_all.deb ... 230s Unpacking libtext-unidecode-perl (1.30-3) ... 230s Selecting previously unselected package texinfo-lib. 230s Preparing to unpack .../387-texinfo-lib_7.1.1-1_arm64.deb ... 230s Unpacking texinfo-lib (7.1.1-1) ... 230s Selecting previously unselected package tex-common. 230s Preparing to unpack .../388-tex-common_6.18_all.deb ... 230s Unpacking tex-common (6.18) ... 230s Selecting previously unselected package texinfo. 230s Preparing to unpack .../389-texinfo_7.1.1-1_all.deb ... 230s Unpacking texinfo (7.1.1-1) ... 231s Selecting previously unselected package octave-common. 231s Preparing to unpack .../390-octave-common_9.4.0-1_all.deb ... 231s Unpacking octave-common (9.4.0-1) ... 231s Selecting previously unselected package octave. 231s Preparing to unpack .../391-octave_9.4.0-1_arm64.deb ... 231s Unpacking octave (9.4.0-1) ... 231s Selecting previously unselected package libncurses-dev:arm64. 231s Preparing to unpack .../392-libncurses-dev_6.5+20250125-2_arm64.deb ... 231s Unpacking libncurses-dev:arm64 (6.5+20250125-2) ... 231s Selecting previously unselected package libreadline-dev:arm64. 231s Preparing to unpack .../393-libreadline-dev_8.2-6_arm64.deb ... 231s Unpacking libreadline-dev:arm64 (8.2-6) ... 231s Selecting previously unselected package libhdf5-fortran-310:arm64. 231s Preparing to unpack .../394-libhdf5-fortran-310_1.14.5+repack-3_arm64.deb ... 231s Unpacking libhdf5-fortran-310:arm64 (1.14.5+repack-3) ... 231s Selecting previously unselected package libhdf5-hl-310:arm64. 231s Preparing to unpack .../395-libhdf5-hl-310_1.14.5+repack-3_arm64.deb ... 231s Unpacking libhdf5-hl-310:arm64 (1.14.5+repack-3) ... 231s Selecting previously unselected package libhdf5-hl-fortran-310:arm64. 231s Preparing to unpack .../396-libhdf5-hl-fortran-310_1.14.5+repack-3_arm64.deb ... 231s Unpacking libhdf5-hl-fortran-310:arm64 (1.14.5+repack-3) ... 231s Selecting previously unselected package libhdf5-cpp-310:arm64. 231s Preparing to unpack .../397-libhdf5-cpp-310_1.14.5+repack-3_arm64.deb ... 231s Unpacking libhdf5-cpp-310:arm64 (1.14.5+repack-3) ... 231s Selecting previously unselected package libhdf5-hl-cpp-310:arm64. 231s Preparing to unpack .../398-libhdf5-hl-cpp-310_1.14.5+repack-3_arm64.deb ... 231s Unpacking libhdf5-hl-cpp-310:arm64 (1.14.5+repack-3) ... 231s Selecting previously unselected package zlib1g-dev:arm64. 231s Preparing to unpack .../399-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_arm64.deb ... 231s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 232s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 232s Preparing to unpack .../400-libjpeg-turbo8-dev_2.1.5-3ubuntu2_arm64.deb ... 232s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 232s Selecting previously unselected package libjpeg8-dev:arm64. 232s Preparing to unpack .../401-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 232s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 232s Selecting previously unselected package libjpeg-dev:arm64. 232s Preparing to unpack .../402-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 232s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 232s Selecting previously unselected package libaec-dev:arm64. 232s Preparing to unpack .../403-libaec-dev_1.1.3-1_arm64.deb ... 232s Unpacking libaec-dev:arm64 (1.1.3-1) ... 232s Selecting previously unselected package libbrotli-dev:arm64. 232s Preparing to unpack .../404-libbrotli-dev_1.1.0-2build3_arm64.deb ... 232s Unpacking libbrotli-dev:arm64 (1.1.0-2build3) ... 232s Selecting previously unselected package libidn2-dev:arm64. 232s Preparing to unpack .../405-libidn2-dev_2.3.7-2build2_arm64.deb ... 232s Unpacking libidn2-dev:arm64 (2.3.7-2build2) ... 232s Selecting previously unselected package comerr-dev:arm64. 232s Preparing to unpack .../406-comerr-dev_2.1-1.47.2-1ubuntu1_arm64.deb ... 232s Unpacking comerr-dev:arm64 (2.1-1.47.2-1ubuntu1) ... 232s Selecting previously unselected package libgssrpc4t64:arm64. 232s Preparing to unpack .../407-libgssrpc4t64_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking libgssrpc4t64:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package libkadm5clnt-mit12:arm64. 232s Preparing to unpack .../408-libkadm5clnt-mit12_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking libkadm5clnt-mit12:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package libkdb5-10t64:arm64. 232s Preparing to unpack .../409-libkdb5-10t64_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking libkdb5-10t64:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package libkadm5srv-mit12:arm64. 232s Preparing to unpack .../410-libkadm5srv-mit12_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking libkadm5srv-mit12:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package krb5-multidev:arm64. 232s Preparing to unpack .../411-krb5-multidev_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking krb5-multidev:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package libkrb5-dev:arm64. 232s Preparing to unpack .../412-libkrb5-dev_1.21.3-4ubuntu1_arm64.deb ... 232s Unpacking libkrb5-dev:arm64 (1.21.3-4ubuntu1) ... 232s Selecting previously unselected package libldap-dev:arm64. 232s Preparing to unpack .../413-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_arm64.deb ... 232s Unpacking libldap-dev:arm64 (2.6.9+dfsg-1~exp2ubuntu1) ... 232s Selecting previously unselected package libpkgconf3:arm64. 232s Preparing to unpack .../414-libpkgconf3_1.8.1-4_arm64.deb ... 232s Unpacking libpkgconf3:arm64 (1.8.1-4) ... 232s Selecting previously unselected package pkgconf-bin. 232s Preparing to unpack .../415-pkgconf-bin_1.8.1-4_arm64.deb ... 232s Unpacking pkgconf-bin (1.8.1-4) ... 232s Selecting previously unselected package pkgconf:arm64. 232s Preparing to unpack .../416-pkgconf_1.8.1-4_arm64.deb ... 232s Unpacking pkgconf:arm64 (1.8.1-4) ... 232s Selecting previously unselected package libnghttp2-dev:arm64. 232s Preparing to unpack .../417-libnghttp2-dev_1.64.0-1_arm64.deb ... 232s Unpacking libnghttp2-dev:arm64 (1.64.0-1) ... 232s Selecting previously unselected package libpsl-dev:arm64. 232s Preparing to unpack .../418-libpsl-dev_0.21.2-1.1build1_arm64.deb ... 232s Unpacking libpsl-dev:arm64 (0.21.2-1.1build1) ... 232s Selecting previously unselected package libgmpxx4ldbl:arm64. 232s Preparing to unpack .../419-libgmpxx4ldbl_2%3a6.3.0+dfsg-2ubuntu7_arm64.deb ... 232s Unpacking libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-2ubuntu7) ... 233s Selecting previously unselected package libgmp-dev:arm64. 233s Preparing to unpack .../420-libgmp-dev_2%3a6.3.0+dfsg-2ubuntu7_arm64.deb ... 233s Unpacking libgmp-dev:arm64 (2:6.3.0+dfsg-2ubuntu7) ... 233s Selecting previously unselected package libevent-2.1-7t64:arm64. 233s Preparing to unpack .../421-libevent-2.1-7t64_2.1.12-stable-10_arm64.deb ... 233s Unpacking libevent-2.1-7t64:arm64 (2.1.12-stable-10) ... 233s Selecting previously unselected package libunbound8:arm64. 233s Preparing to unpack .../422-libunbound8_1.22.0-1ubuntu1_arm64.deb ... 233s Unpacking libunbound8:arm64 (1.22.0-1ubuntu1) ... 233s Selecting previously unselected package libgnutls-dane0t64:arm64. 233s Preparing to unpack .../423-libgnutls-dane0t64_3.8.9-2ubuntu1_arm64.deb ... 233s Unpacking libgnutls-dane0t64:arm64 (3.8.9-2ubuntu1) ... 233s Selecting previously unselected package libgnutls-openssl27t64:arm64. 233s Preparing to unpack .../424-libgnutls-openssl27t64_3.8.9-2ubuntu1_arm64.deb ... 233s Unpacking libgnutls-openssl27t64:arm64 (3.8.9-2ubuntu1) ... 233s Selecting previously unselected package libp11-kit-dev:arm64. 233s Preparing to unpack .../425-libp11-kit-dev_0.25.5-2ubuntu2_arm64.deb ... 233s Unpacking libp11-kit-dev:arm64 (0.25.5-2ubuntu2) ... 233s Selecting previously unselected package libtasn1-6-dev:arm64. 233s Preparing to unpack .../426-libtasn1-6-dev_4.20.0-2_arm64.deb ... 233s Unpacking libtasn1-6-dev:arm64 (4.20.0-2) ... 233s Selecting previously unselected package nettle-dev:arm64. 233s Preparing to unpack .../427-nettle-dev_3.10-1_arm64.deb ... 233s Unpacking nettle-dev:arm64 (3.10-1) ... 233s Selecting previously unselected package libgnutls28-dev:arm64. 233s Preparing to unpack .../428-libgnutls28-dev_3.8.9-2ubuntu1_arm64.deb ... 233s Unpacking libgnutls28-dev:arm64 (3.8.9-2ubuntu1) ... 233s Selecting previously unselected package librtmp-dev:arm64. 233s Preparing to unpack .../429-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_arm64.deb ... 233s Unpacking librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-2build7) ... 233s Selecting previously unselected package libssl-dev:arm64. 233s Preparing to unpack .../430-libssl-dev_3.4.0-1ubuntu2_arm64.deb ... 233s Unpacking libssl-dev:arm64 (3.4.0-1ubuntu2) ... 233s Selecting previously unselected package libssh2-1-dev:arm64. 233s Preparing to unpack .../431-libssh2-1-dev_1.11.1-1_arm64.deb ... 233s Unpacking libssh2-1-dev:arm64 (1.11.1-1) ... 233s Selecting previously unselected package libzstd-dev:arm64. 233s Preparing to unpack .../432-libzstd-dev_1.5.6+dfsg-2_arm64.deb ... 233s Unpacking libzstd-dev:arm64 (1.5.6+dfsg-2) ... 233s Selecting previously unselected package libcurl4-openssl-dev:arm64. 233s Preparing to unpack .../433-libcurl4-openssl-dev_8.12.0+git20250209.89ed161+ds-1ubuntu1_arm64.deb ... 233s Unpacking libcurl4-openssl-dev:arm64 (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 233s Selecting previously unselected package hdf5-helpers. 233s Preparing to unpack .../434-hdf5-helpers_1.14.5+repack-3_arm64.deb ... 233s Unpacking hdf5-helpers (1.14.5+repack-3) ... 233s Selecting previously unselected package libhdf5-dev. 233s Preparing to unpack .../435-libhdf5-dev_1.14.5+repack-3_arm64.deb ... 233s Unpacking libhdf5-dev (1.14.5+repack-3) ... 234s Selecting previously unselected package xorg-sgml-doctools. 234s Preparing to unpack .../436-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 234s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 234s Selecting previously unselected package x11proto-dev. 234s Preparing to unpack .../437-x11proto-dev_2024.1-1_all.deb ... 234s Unpacking x11proto-dev (2024.1-1) ... 234s Selecting previously unselected package libxau-dev:arm64. 234s Preparing to unpack .../438-libxau-dev_1%3a1.0.11-1_arm64.deb ... 234s Unpacking libxau-dev:arm64 (1:1.0.11-1) ... 234s Selecting previously unselected package libxdmcp-dev:arm64. 234s Preparing to unpack .../439-libxdmcp-dev_1%3a1.1.5-1_arm64.deb ... 234s Unpacking libxdmcp-dev:arm64 (1:1.1.5-1) ... 234s Selecting previously unselected package xtrans-dev. 234s Preparing to unpack .../440-xtrans-dev_1.4.0-1_all.deb ... 234s Unpacking xtrans-dev (1.4.0-1) ... 234s Selecting previously unselected package libxcb1-dev:arm64. 234s Preparing to unpack .../441-libxcb1-dev_1.17.0-2_arm64.deb ... 234s Unpacking libxcb1-dev:arm64 (1.17.0-2) ... 234s Selecting previously unselected package libx11-dev:arm64. 234s Preparing to unpack .../442-libx11-dev_2%3a1.8.10-2_arm64.deb ... 234s Unpacking libx11-dev:arm64 (2:1.8.10-2) ... 234s Selecting previously unselected package libglx-dev:arm64. 234s Preparing to unpack .../443-libglx-dev_1.7.0-1build1_arm64.deb ... 234s Unpacking libglx-dev:arm64 (1.7.0-1build1) ... 234s Selecting previously unselected package libgl-dev:arm64. 234s Preparing to unpack .../444-libgl-dev_1.7.0-1build1_arm64.deb ... 234s Unpacking libgl-dev:arm64 (1.7.0-1build1) ... 234s Selecting previously unselected package libblas-dev:arm64. 234s Preparing to unpack .../445-libblas-dev_3.12.1-2_arm64.deb ... 234s Unpacking libblas-dev:arm64 (3.12.1-2) ... 234s Selecting previously unselected package liblapack-dev:arm64. 234s Preparing to unpack .../446-liblapack-dev_3.12.1-2_arm64.deb ... 234s Unpacking liblapack-dev:arm64 (3.12.1-2) ... 234s Selecting previously unselected package libfftw3-long3:arm64. 234s Preparing to unpack .../447-libfftw3-long3_3.3.10-2fakesync1build1_arm64.deb ... 234s Unpacking libfftw3-long3:arm64 (3.3.10-2fakesync1build1) ... 234s Selecting previously unselected package libfftw3-bin. 234s Preparing to unpack .../448-libfftw3-bin_3.3.10-2fakesync1build1_arm64.deb ... 234s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 234s Selecting previously unselected package libfftw3-dev:arm64. 234s Preparing to unpack .../449-libfftw3-dev_3.3.10-2fakesync1build1_arm64.deb ... 234s Unpacking libfftw3-dev:arm64 (3.3.10-2fakesync1build1) ... 235s Selecting previously unselected package libgfortran-14-dev:arm64. 235s Preparing to unpack .../450-libgfortran-14-dev_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking libgfortran-14-dev:arm64 (14.2.0-17ubuntu1) ... 235s Selecting previously unselected package gfortran-14-aarch64-linux-gnu. 235s Preparing to unpack .../451-gfortran-14-aarch64-linux-gnu_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 235s Selecting previously unselected package gfortran-14. 235s Preparing to unpack .../452-gfortran-14_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking gfortran-14 (14.2.0-17ubuntu1) ... 235s Selecting previously unselected package gfortran-aarch64-linux-gnu. 235s Preparing to unpack .../453-gfortran-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 235s Unpacking gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 235s Selecting previously unselected package gfortran. 235s Preparing to unpack .../454-gfortran_4%3a14.2.0-1ubuntu1_arm64.deb ... 235s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 235s Selecting previously unselected package libstdc++-14-dev:arm64. 235s Preparing to unpack .../455-libstdc++-14-dev_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking libstdc++-14-dev:arm64 (14.2.0-17ubuntu1) ... 235s Selecting previously unselected package g++-14-aarch64-linux-gnu. 235s Preparing to unpack .../456-g++-14-aarch64-linux-gnu_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking g++-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 235s Selecting previously unselected package g++-14. 235s Preparing to unpack .../457-g++-14_14.2.0-17ubuntu1_arm64.deb ... 235s Unpacking g++-14 (14.2.0-17ubuntu1) ... 236s Selecting previously unselected package g++-aarch64-linux-gnu. 236s Preparing to unpack .../458-g++-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 236s Unpacking g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 236s Selecting previously unselected package g++. 236s Preparing to unpack .../459-g++_4%3a14.2.0-1ubuntu1_arm64.deb ... 236s Unpacking g++ (4:14.2.0-1ubuntu1) ... 236s Selecting previously unselected package octave-dev. 236s Preparing to unpack .../460-octave-dev_9.4.0-1_arm64.deb ... 236s Unpacking octave-dev (9.4.0-1) ... 236s Selecting previously unselected package dh-octave. 236s Preparing to unpack .../461-dh-octave_1.8.0_all.deb ... 236s Unpacking dh-octave (1.8.0) ... 236s Selecting previously unselected package libfontenc1:arm64. 236s Preparing to unpack .../462-libfontenc1_1%3a1.1.8-1build1_arm64.deb ... 236s Unpacking libfontenc1:arm64 (1:1.1.8-1build1) ... 236s Selecting previously unselected package libxt6t64:arm64. 236s Preparing to unpack .../463-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 236s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 236s Selecting previously unselected package libxmu6:arm64. 236s Preparing to unpack .../464-libxmu6_2%3a1.1.3-3build2_arm64.deb ... 236s Unpacking libxmu6:arm64 (2:1.1.3-3build2) ... 236s Selecting previously unselected package libxaw7:arm64. 236s Preparing to unpack .../465-libxaw7_2%3a1.0.16-1_arm64.deb ... 236s Unpacking libxaw7:arm64 (2:1.0.16-1) ... 236s Selecting previously unselected package libxfont2:arm64. 236s Preparing to unpack .../466-libxfont2_1%3a2.0.6-1build1_arm64.deb ... 236s Unpacking libxfont2:arm64 (1:2.0.6-1build1) ... 236s Selecting previously unselected package libxkbfile1:arm64. 236s Preparing to unpack .../467-libxkbfile1_1%3a1.1.0-1build4_arm64.deb ... 236s Unpacking libxkbfile1:arm64 (1:1.1.0-1build4) ... 236s Selecting previously unselected package libxrandr2:arm64. 236s Preparing to unpack .../468-libxrandr2_2%3a1.5.4-1_arm64.deb ... 236s Unpacking libxrandr2:arm64 (2:1.5.4-1) ... 236s Selecting previously unselected package octave-io. 236s Preparing to unpack .../469-octave-io_2.6.4-3build2_arm64.deb ... 236s Unpacking octave-io (2.6.4-3build2) ... 236s Selecting previously unselected package octave-statistics-common. 236s Preparing to unpack .../470-octave-statistics-common_1.7.2-1_all.deb ... 236s Unpacking octave-statistics-common (1.7.2-1) ... 236s Selecting previously unselected package octave-statistics. 236s Preparing to unpack .../471-octave-statistics_1.7.2-1_arm64.deb ... 236s Unpacking octave-statistics (1.7.2-1) ... 236s Selecting previously unselected package x11-xkb-utils. 236s Preparing to unpack .../472-x11-xkb-utils_7.7+9_arm64.deb ... 236s Unpacking x11-xkb-utils (7.7+9) ... 236s Selecting previously unselected package xserver-common. 236s Preparing to unpack .../473-xserver-common_2%3a21.1.14-2ubuntu1_all.deb ... 236s Unpacking xserver-common (2:21.1.14-2ubuntu1) ... 236s Selecting previously unselected package xvfb. 236s Preparing to unpack .../474-xvfb_2%3a21.1.14-2ubuntu1_arm64.deb ... 236s Unpacking xvfb (2:21.1.14-2ubuntu1) ... 237s Setting up libapt-pkg-perl (0.1.40build8) ... 237s Setting up libhwy1t64:arm64 (1.2.0-3ubuntu3) ... 237s Setting up libmodule-pluggable-perl (5.2-5) ... 237s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 237s Setting up libstring-escape-perl (2010.002-3) ... 237s Setting up libgnutls-openssl27t64:arm64 (3.8.9-2ubuntu1) ... 237s Setting up libxcb-dri3-0:arm64 (1.17.0-2) ... 237s Setting up liblcms2-2:arm64 (2.16-2) ... 237s Setting up libberkeleydb-perl:arm64 (0.66-1) ... 237s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 237s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 237s Setting up libwayland-server0:arm64 (1.23.1-1) ... 237s Setting up libaom3:arm64 (3.12.0-1) ... 237s Setting up libx11-xcb1:arm64 (2:1.8.10-2) ... 237s Setting up libfile-which-perl (1.27-2) ... 237s Setting up libdouble-conversion3:arm64 (3.3.0-1build1) ... 237s Setting up libncurses-dev:arm64 (6.5+20250125-2) ... 237s Setting up libunicode-utf8-perl (0.62-2build4) ... 237s Setting up libset-intspan-perl (1.19-3) ... 237s Setting up libxcb-xfixes0:arm64 (1.17.0-2) ... 237s Setting up libogg0:arm64 (1.3.5-3build1) ... 237s Setting up libmouse-perl:arm64 (2.5.11-1build1) ... 237s Setting up libzstd-dev:arm64 (1.5.6+dfsg-2) ... 237s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 237s Setting up libpod-pom-perl (2.01-4) ... 237s Setting up libxpm4:arm64 (1:3.5.17-1build2) ... 237s Setting up hdf5-helpers (1.14.5+repack-3) ... 237s Setting up libwmflite-0.2-7:arm64 (0.2.13-1.1build3) ... 237s Setting up libregexp-pattern-perl (0.2.14-2) ... 237s Setting up libdata-messagepack-perl (1.02-1build5) ... 237s Setting up libclass-inspector-perl (1.36-3) ... 237s Setting up libxcb-xinput0:arm64 (1.17.0-2) ... 237s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 237s Setting up libdynaloader-functions-perl (0.004-1) ... 237s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 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:arm64 (1.17.0-2) ... 237s Setting up libclone-perl:arm64 (0.47-1) ... 237s Setting up libarchive-zip-perl (1.68-1) ... 237s Setting up libsub-identify-perl (0.14-3build4) ... 237s Setting up libdrm-radeon1:arm64 (2.4.123-1) ... 237s Setting up libcpanel-json-xs-perl:arm64 (4.39-1) ... 237s Setting up libglvnd0:arm64 (1.7.0-1build1) ... 237s Setting up libio-stringy-perl (2.113-2) ... 237s Setting up libhtml-tagset-perl (3.24-1) ... 237s Setting up libts0t64:arm64 (1.22-1.1build1) ... 237s Setting up liblog-any-perl (1.717-1) ... 237s Setting up libyaml-pp-perl (0.38.1-2) ... 237s Setting up libxcb-glx0:arm64 (1.17.0-2) ... 237s Setting up libdevel-size-perl (0.84-1build1) ... 237s Setting up unzip (6.0-28ubuntu6) ... 237s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 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.903.0+ds-1) ... 237s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 237s Setting up libio-interactive-perl (1.026-1) ... 237s Setting up libxcb-keysyms1:arm64 (0.4.1-1) ... 237s Setting up libxcb-shape0:arm64 (1.17.0-2) ... 237s Setting up x11-common (1:7.7+23ubuntu3) ... 237s Setting up libtry-tiny-perl (0.32-1) ... 237s Setting up libdeflate0:arm64 (1.23-1) ... 237s Setting up perl-openssl-defaults:arm64 (7build3) ... 237s Setting up libmldbm-perl (2.05-4) ... 237s Setting up libxml-namespacesupport-perl (1.12-2) ... 237s Setting up m4 (1.4.19-5) ... 237s Setting up libevent-2.1-7t64:arm64 (2.1.12-stable-10) ... 237s Setting up libclone-choose-perl (0.010-2) ... 237s Setting up libqhull-r8.0:arm64 (2020.2-6build1) ... 237s Setting up libxcb-render-util0:arm64 (0.3.10-1) ... 237s Setting up libtime-moment-perl (0.44-2build5) ... 237s Setting up libencode-locale-perl (1.05-3) ... 237s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 237s Setting up libxcb-icccm4:arm64 (0.4.2-1) ... 237s Setting up texinfo-lib (7.1.1-1) ... 237s Setting up libreadline-dev:arm64 (8.2-6) ... 237s Setting up libmpg123-0t64:arm64 (1.32.10-1) ... 237s Setting up libgomp1:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libconfig-tiny-perl (2.30-1) ... 237s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 237s Setting up liblist-utilsby-perl (0.12-2) ... 237s Setting up libyaml-tiny-perl (1.76-1) ... 237s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 237s Setting up octave-common (9.4.0-1) ... 237s Setting up libregexp-common-perl (2024080801-1) ... 237s Setting up libpcre2-16-0:arm64 (10.42-4ubuntu3) ... 237s Setting up libaec0:arm64 (1.1.3-1) ... 237s Setting up libnet-netmask-perl (2.0002-2) ... 237s Setting up libopengl0:arm64 (1.7.0-1build1) ... 237s Setting up libsub-install-perl (0.929-1) ... 237s Setting up libxcb-util1:arm64 (0.4.1-1) ... 237s Setting up libpsl-dev:arm64 (0.21.2-1.1build1) ... 237s Setting up libxxf86vm1:arm64 (1:1.1.4-1build4) ... 237s Setting up libindirect-perl (0.39-2build5) ... 237s Setting up libxcb-xkb1:arm64 (1.17.0-2) ... 237s Setting up libxcb-image0:arm64 (0.4.0-2build1) ... 237s Setting up libnumber-compare-perl (0.03-3) ... 237s Setting up libxcb-present0:arm64 (1.17.0-2) ... 237s Setting up liberror-perl (0.17029-2) ... 237s Setting up libasound2-data (1.2.13-1build1) ... 237s Setting up patchutils (0.4.2-1build3) ... 237s Setting up tex-common (6.18) ... 237s update-language: texlive-base not installed and configured, doing nothing! 237s Setting up libjson-maybexs-perl (1.004008-1) ... 237s Setting up libxml-sax-base-perl (1.09-3) ... 237s Setting up libio-string-perl (1.08-4) ... 237s Setting up libboolean-perl (0.46-3) ... 237s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 237s Setting up xtrans-dev (1.4.0-1) ... 237s Setting up libfontenc1:arm64 (1:1.1.8-1build1) ... 237s Setting up autotools-dev (20220109.1) ... 237s Setting up libblas3:arm64 (3.12.1-2) ... 237s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 237s Setting up libclass-data-inheritable-perl (0.10-1) ... 237s Setting up libunbound8:arm64 (1.22.0-1ubuntu1) ... 237s Setting up libpkgconf3:arm64 (1.8.1-4) ... 237s Setting up libgmpxx4ldbl:arm64 (2:6.3.0+dfsg-2ubuntu7) ... 237s Setting up libalgorithm-c3-perl (0.11-2) ... 237s Setting up libasound2t64:arm64 (1.2.13-1build1) ... 237s Setting up liblog-log4perl-perl (1.57-1) ... 237s Setting up libtext-reform-perl (1.20-5) ... 237s Setting up libgnutls-dane0t64:arm64 (3.8.9-2ubuntu1) ... 237s Setting up libfile-find-rule-perl (0.34-3) ... 237s Setting up libxfixes3:arm64 (1:6.0.0-2build1) ... 237s Setting up libxcb-sync1:arm64 (1.17.0-2) ... 237s Setting up libipc-system-simple-perl (1.30-2) ... 237s Setting up libio-tiecombine-perl (1.005-3) ... 237s Setting up libnet-domain-tld-perl (1.75-4) ... 237s Setting up libgssrpc4t64:arm64 (1.21.3-4ubuntu1) ... 237s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 237s Setting up libldap-dev:arm64 (2.6.9+dfsg-1~exp2ubuntu1) ... 237s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 237s Setting up libxcb-cursor0:arm64 (0.1.5-1) ... 237s Setting up lzip (1.25-1) ... 237s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 237s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 237s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 237s Setting up libavahi-common-data:arm64 (0.8-14ubuntu1) ... 237s Setting up libopus0:arm64 (1.5.2-2) ... 237s Setting up t1utils (1.41-4build3) ... 237s Setting up libxinerama1:arm64 (2:1.1.4-3build1) ... 237s Setting up diffstat (1.67-1) ... 237s Setting up libimagequant0:arm64 (2.18.0-1build1) ... 237s Setting up comerr-dev:arm64 (2.1-1.47.2-1ubuntu1) ... 237s Setting up libxkbcommon-x11-0:arm64 (1.7.0-2) ... 237s Setting up fonts-dejavu-mono (2.37-8) ... 237s Setting up libssl-dev:arm64 (3.4.0-1ubuntu2) ... 237s Setting up libmpc3:arm64 (1.3.1-1build2) ... 237s Setting up libvorbis0a:arm64 (1.3.7-2) ... 237s Setting up libvariable-magic-perl (0.64-1build1) ... 237s Setting up libio-html-perl (1.004-3) ... 237s Setting up libxrandr2:arm64 (2:1.5.4-1) ... 237s Setting up libtext-template-perl (1.61-1) ... 237s Setting up libpod-parser-perl (1.67-1) ... 237s Setting up autopoint (0.23.1-1) ... 237s Setting up libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 237s Setting up fonts-dejavu-core (2.37-8) ... 237s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 237s Setting up pkgconf-bin (1.8.1-4) ... 237s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 237s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 237s Setting up libltdl7:arm64 (2.5.4-3build1) ... 237s Setting up libidn2-dev:arm64 (2.3.7-2build2) ... 237s Setting up libfftw3-double3:arm64 (3.3.10-2fakesync1build1) ... 237s Setting up libglapi-mesa:arm64 (24.3.4-3ubuntu1) ... 237s Setting up libparams-util-perl (1.102-3build1) ... 237s Setting up libgfortran5:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libvulkan1:arm64 (1.4.304.0-1) ... 237s Setting up libtime-duration-perl (1.21-2) ... 237s Setting up autoconf (2.72-3) ... 237s Setting up libtext-xslate-perl:arm64 (3.5.9-2build1) ... 237s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 237s Setting up libwebp7:arm64 (1.5.0-0.1) ... 237s Setting up libarray-intspan-perl (2.004-2) ... 237s Setting up libcapture-tiny-perl (0.50-1) ... 237s Setting up libtimedate-perl (2.3300-2) ... 237s Setting up libexporter-lite-perl (0.09-2) ... 237s Setting up libubsan1:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libsub-name-perl:arm64 (0.28-1) ... 237s Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 237s Setting up dwz (0.15-1build6) ... 237s Setting up libdata-validate-domain-perl (0.15-1) ... 237s Setting up libproc-processtable-perl:arm64 (0.636-1build4) ... 237s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 237s Setting up libmtdev1t64:arm64 (1.1.7-1) ... 237s Setting up libduktape207:arm64 (2.7.0+tests-0ubuntu3) ... 237s Setting up libxshmfence1:arm64 (1.3-1build5) ... 237s Setting up libhwasan0:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libxcb-randr0:arm64 (1.17.0-2) ... 237s Setting up libpath-tiny-perl (0.146-1) ... 237s Setting up libasan8:arm64 (14.2.0-17ubuntu1) ... 237s Setting up lzop (1.04-2build3) ... 237s Setting up libjson-perl (4.10000-1) ... 237s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 237s Setting up librole-tiny-perl (2.002004-1) ... 237s Setting up debugedit (1:5.1-2) ... 237s Setting up libipc-run3-perl (0.049-1) ... 237s Setting up libmd4c0:arm64 (0.5.2-2) ... 237s Setting up libregexp-wildcards-perl (1.05-3) ... 237s Setting up libmousex-strictconstructor-perl (0.02-3) ... 237s Setting up libfile-sharedir-perl (1.118-3) ... 237s Setting up libsub-uplevel-perl (0.2800-3) ... 237s Setting up libsuitesparseconfig7:arm64 (1:7.8.3+dfsg-3) ... 237s Setting up liblua5.4-0:arm64 (5.4.7-1) ... 237s Setting up libaliased-perl (0.34-3) ... 237s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 237s Setting up libthai-data (0.1.29-2build1) ... 237s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 237s Setting up libstrictures-perl (2.000006-1) ... 237s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 237s Setting up libdevel-stacktrace-perl (2.0500-1) ... 237s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 237s Setting up libtext-autoformat-perl (1.750000-2) ... 237s Setting up libglu1-mesa:arm64 (9.0.2-1.1build1) ... 237s Setting up libflac12t64:arm64 (1.4.3+ds-4) ... 237s Setting up libtoml-tiny-perl (0.18-1) ... 237s Setting up libstemmer0d:arm64 (2.2.0-4build1) ... 237s Setting up libxkbfile1:arm64 (1:1.1.0-1build4) ... 237s Setting up libsort-versions-perl (1.62-3) ... 237s Setting up libtsan2:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libexporter-tiny-perl (1.006002-1) ... 237s Setting up libterm-readkey-perl (2.38-2build5) ... 237s Setting up libisl23:arm64 (0.27-1) ... 237s Setting up libtext-unidecode-perl (1.30-3) ... 237s Setting up libde265-0:arm64 (1.0.15-1build4) ... 237s Setting up libfont-ttf-perl (1.06-2) ... 237s Setting up libfile-homedir-perl (1.006-2) ... 237s Setting up libsamplerate0:arm64 (0.2.2-4build1) ... 237s Setting up libtasn1-6-dev:arm64 (4.20.0-2) ... 237s Setting up libwebpmux3:arm64 (1.5.0-0.1) ... 237s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 237s Setting up libperlio-gzip-perl (0.20-1build5) ... 237s Setting up libjxl0.11:arm64 (0.11.1-1) ... 237s Setting up libxfont2:arm64 (1:2.0.6-1build1) ... 237s Setting up libhtml-html5-entities-perl (0.004-3) ... 237s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 237s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 237s Setting up libmarkdown2:arm64 (2.2.7-2ubuntu1) ... 237s Setting up libcc1-0:arm64 (14.2.0-17ubuntu1) ... 237s Setting up liburi-perl (5.30-1) ... 237s Setting up libnet-ipv6addr-perl (1.02-1) ... 237s Setting up libbrotli-dev:arm64 (1.1.0-2build3) ... 237s Setting up liblsan0:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libp11-kit-dev:arm64 (0.25.5-2ubuntu2) ... 237s Setting up libmp3lame0:arm64 (3.100-6build1) ... 237s Setting up libblas-dev:arm64 (3.12.1-2) ... 237s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 237s Setting up libsz2:arm64 (1.1.3-1) ... 237s Setting up libitm1:arm64 (14.2.0-17ubuntu1) ... 237s Setting up libvorbisenc2:arm64 (1.3.7-2) ... 237s Setting up libkadm5clnt-mit12:arm64 (1.21.3-4ubuntu1) ... 237s Setting up libdata-validate-ip-perl (0.31-1) ... 237s Setting up libwacom-common (2.14.0-1) ... 237s Setting up libmousex-nativetraits-perl (1.09-3) ... 237s Setting up libemail-address-xs-perl (1.05-1build5) ... 237s Setting up libwayland-client0:arm64 (1.23.1-1) ... 237s Setting up libnet-ssleay-perl:arm64 (1.94-2) ... 237s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 237s Setting up automake (1:1.17-3) ... 237s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 237s Setting up libb2-1:arm64 (0.98.1-1.1build1) ... 237s Setting up x11proto-dev (2024.1-1) ... 237s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 237s Setting up gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 237s Setting up libice6:arm64 (2:1.1.1-1) ... 237s Setting up libqt6core6t64:arm64 (6.8.1+dfsg-0ubuntu4) ... 237s Setting up libhttp-date-perl (6.06-1) ... 237s Setting up mesa-libgallium:arm64 (24.3.4-3ubuntu1) ... 237s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 237s Setting up liblapack3:arm64 (3.12.1-2) ... 237s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 237s Setting up libproxy1v5:arm64 (0.5.9-1) ... 237s Setting up libfile-basedir-perl (0.09-2) ... 237s Setting up gettext (0.23.1-1) ... 237s Setting up libarpack2t64:arm64 (3.9.1-4) ... 237s Setting up libfftw3-single3:arm64 (3.3.10-2fakesync1build1) ... 237s Setting up libgmp-dev:arm64 (2:6.3.0+dfsg-2ubuntu7) ... 237s Setting up libamd3:arm64 (1:7.8.3+dfsg-3) ... 237s Setting up libfile-listing-perl (6.16-1) ... 237s Setting up libxau-dev:arm64 (1:1.0.11-1) ... 237s Setting up nettle-dev:arm64 (3.10-1) ... 237s Setting up libkdb5-10t64:arm64 (1.21.3-4ubuntu1) ... 237s Setting up libgbm1:arm64 (24.3.4-3ubuntu1) ... 237s Setting up libcolamd3:arm64 (1:7.8.3+dfsg-3) ... 237s Setting up libwacom9:arm64 (2.14.0-1) ... 237s Setting up fontconfig-config (2.15.0-1.1ubuntu2) ... 238s Setting up liblist-moreutils-perl (0.430-2) ... 238s Setting up libxcursor1:arm64 (1:1.2.3-1) ... 238s Setting up libpod-constants-perl (0.19-2) ... 238s Setting up libgl1-mesa-dri:arm64 (24.3.4-3ubuntu1) ... 238s Setting up libhash-merge-perl (0.302-1) ... 238s Setting up libsoftware-copyright-perl (0.012-2) ... 238s Setting up libaec-dev:arm64 (1.1.3-1) ... 238s Setting up libavahi-common3:arm64 (0.8-14ubuntu1) ... 238s Setting up libcxsparse4:arm64 (1:7.8.3+dfsg-3) ... 238s Setting up libfftw3-long3:arm64 (3.3.10-2fakesync1build1) ... 238s Setting up libnet-http-perl (6.23-1) ... 238s Setting up libpath-iterator-rule-perl (1.015-2) ... 238s Setting up libtext-markdown-discount-perl (0.18-1) ... 238s Setting up libappstream5:arm64 (1.0.4-1) ... 238s Setting up libexception-class-perl (1.45-1) ... 238s Setting up libclass-c3-perl (0.35-2) ... 238s Setting up libqrupdate1:arm64 (1.1.5-1) ... 238s Setting up libdevel-callchecker-perl:arm64 (0.009-1build1) ... 238s Setting up libxml-sax-perl (1.02+dfsg-4) ... 238s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 238s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 238s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 238s Setting up libcamd3:arm64 (1:7.8.3+dfsg-3) ... 238s Setting up pkgconf:arm64 (1.8.1-4) ... 238s Setting up libinput-bin (1.27.1-1) ... 238s Setting up libxs-parse-sublike-perl:arm64 (0.36-1) ... 238s Setting up intltool-debian (0.35.0+20060710.6) ... 238s Setting up libthai0:arm64 (0.1.29-2build1) ... 238s Setting up libxdmcp-dev:arm64 (1:1.1.5-1) ... 238s Setting up libegl-mesa0:arm64 (24.3.4-3ubuntu1) ... 238s Setting up libdata-validate-uri-perl (0.07-3) ... 238s Setting up libxs-parse-keyword-perl (0.48-2) ... 238s Setting up libtest-exception-perl (0.43-3) ... 238s Setting up appstream (1.0.4-1) ... 238s ✔ Metadata cache was updated successfully. 238s Setting up libqt6xml6:arm64 (6.8.1+dfsg-0ubuntu4) ... 238s Setting up libglpk40:arm64 (5.0-1build2) ... 238s Setting up libqt6sql6:arm64 (6.8.1+dfsg-0ubuntu4) ... 238s Setting up libstring-copyright-perl (0.003014-1) ... 238s Setting up libraqm0:arm64 (0.10.2-1) ... 238s Setting up liblapack-dev:arm64 (3.12.1-2) ... 238s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 238s Setting up libdata-optlist-perl (0.114-1) ... 238s Setting up libssh2-1-dev:arm64 (1.11.1-1) ... 238s Setting up libccolamd3:arm64 (1:7.8.3+dfsg-3) ... 238s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 238s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 238s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 238s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 238s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 238s Setting up dh-strip-nondeterminism (1.14.1-2) ... 238s Setting up libwww-robotrules-perl (6.02-1) ... 238s Setting up libsyntax-keyword-try-perl (0.30-1) ... 238s Setting up libjack-jackd2-0:arm64 (1.9.22~dfsg-4) ... 238s Setting up libhdf5-310:arm64 (1.14.5+repack-3) ... 238s Setting up cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 238s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 238s Setting up libhtml-parser-perl:arm64 (3.83-1build1) ... 238s Setting up libkadm5srv-mit12:arm64 (1.21.3-4ubuntu1) ... 238s Setting up libegl1:arm64 (1.7.0-1build1) ... 238s Setting up libqt6core5compat6:arm64 (6.8.1-0ubuntu2) ... 238s Setting up libfontconfig1:arm64 (2.15.0-1.1ubuntu2) ... 238s Setting up libsndfile1:arm64 (1.2.2-2) ... 238s Setting up libmro-compat-perl (0.15-2) ... 238s Setting up libgcc-14-dev:arm64 (14.2.0-17ubuntu1) ... 238s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 238s Setting up libhdf5-fortran-310:arm64 (1.14.5+repack-3) ... 238s Setting up libstdc++-14-dev:arm64 (14.2.0-17ubuntu1) ... 238s Setting up libsm6:arm64 (2:1.2.4-1) ... 238s Setting up libavahi-client3:arm64 (0.8-14ubuntu1) ... 238s Setting up libio-socket-ssl-perl (2.089-1) ... 238s Setting up libsub-exporter-perl (0.990-1) ... 238s Setting up libqt6dbus6:arm64 (6.8.1+dfsg-0ubuntu4) ... 238s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 238s Setting up libhtml-form-perl (6.12-1) ... 238s Setting up krb5-multidev:arm64 (1.21.3-4ubuntu1) ... 238s Setting up libhdf5-cpp-310:arm64 (1.14.5+repack-3) ... 238s Setting up libgfortran-14-dev:arm64 (14.2.0-17ubuntu1) ... 238s Setting up libiterator-perl (0.03+ds1-2) ... 238s Setting up libgnutls28-dev:arm64 (3.8.9-2ubuntu1) ... 238s Setting up libinput10:arm64 (1.27.1-1) ... 238s Setting up libnghttp2-dev:arm64 (1.64.0-1) ... 238s Setting up libhdf5-hl-310:arm64 (1.14.5+repack-3) ... 238s Setting up libportaudio2:arm64 (19.6.0-1.2build3) ... 238s Setting up libhttp-negotiate-perl (6.01-2) ... 238s Setting up fontconfig (2.15.0-1.1ubuntu2) ... 240s Regenerating fonts cache... done. 240s Setting up libcarp-assert-more-perl (2.8.0-1) ... 240s Setting up libcholmod5:arm64 (1:7.8.3+dfsg-3) ... 240s Setting up libxft2:arm64 (2.3.6-1build1) ... 241s Setting up libglx-mesa0:arm64 (24.3.4-3ubuntu1) ... 241s Setting up libxcb1-dev:arm64 (1.17.0-2) ... 241s Setting up libiterator-util-perl (0.02+ds1-2) ... 241s Setting up libglx0:arm64 (1.7.0-1build1) ... 241s Setting up libhttp-cookies-perl (6.11-1) ... 241s Setting up libspqr4:arm64 (1:7.8.3+dfsg-3) ... 241s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 241s Setting up po-debconf (1.0.21+nmu1) ... 241s Setting up libhtml-tree-perl (5.07-3) ... 241s Setting up libparams-classify-perl:arm64 (0.015-2build6) ... 241s Setting up libpango-1.0-0:arm64 (1.56.1-1) ... 241s Setting up libcgi-pm-perl (4.67-1) ... 241s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 241s Setting up libx11-dev:arm64 (2:1.8.10-2) ... 241s Setting up libcairo2:arm64 (1.18.2-2) ... 241s Setting up libobject-pad-perl (0.819-1) ... 241s Setting up libkrb5-dev:arm64 (1.21.3-4ubuntu1) ... 241s Setting up cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 241s Setting up libgl1:arm64 (1.7.0-1build1) ... 241s Setting up libqt6gui6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up libnet-smtp-ssl-perl (1.04-2) ... 241s Setting up libmodule-runtime-perl (0.016-2) ... 241s Setting up libmailtools-perl (2.22-1) ... 241s Setting up libconfig-model-perl (2.155-1) ... 241s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 241s Setting up librtmp-dev:arm64 (2.4+20151223.gitfa8646d.1-2build7) ... 241s Setting up texinfo (7.1.1-1) ... 241s Setting up cpp-14 (14.2.0-17ubuntu1) ... 241s Setting up libumfpack6:arm64 (1:7.8.3+dfsg-3) ... 241s Setting up libconst-fast-perl (0.014-2) ... 241s Setting up libqt6network6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up cpp (4:14.2.0-1ubuntu1) ... 241s Setting up libdata-section-perl (0.200008-1) ... 241s Setting up libglx-dev:arm64 (1.7.0-1build1) ... 241s Setting up gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 241s Setting up libpangoft2-1.0-0:arm64 (1.56.1-1) ... 241s Setting up libdata-dpath-perl (0.60-1) ... 241s Setting up libfltk1.3t64:arm64 (1.3.8-6.1build2) ... 241s Setting up libfftw3-dev:arm64 (3.3.10-2fakesync1build1) ... 241s Setting up libcups2t64:arm64 (2.4.11-0ubuntu2) ... 241s Setting up libgl-dev:arm64 (1.7.0-1build1) ... 241s Setting up libstring-rewriteprefix-perl (0.009-1) ... 241s Setting up libpangocairo-1.0-0:arm64 (1.56.1-1) ... 241s Setting up libhdf5-hl-cpp-310:arm64 (1.14.5+repack-3) ... 241s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 241s Setting up gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 241s Setting up libhdf5-hl-fortran-310:arm64 (1.14.5+repack-3) ... 241s Setting up libxmu6:arm64 (2:1.1.3-3build2) ... 241s Setting up g++-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 241s Setting up libmodule-implementation-perl (0.09-2) ... 241s Setting up libpackage-stash-perl (0.40-1) ... 241s Setting up libimport-into-perl (1.002005-2) ... 241s Setting up libmoo-perl (2.005005-1) ... 241s Setting up libqt6opengl6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up liblist-someutils-perl (0.59-1) ... 241s Setting up libxaw7:arm64 (2:1.0.16-1) ... 241s Setting up libmime-tools-perl (5.515-1) ... 241s Setting up libsoftware-license-perl (0.104006-1) ... 241s Setting up libclass-load-perl (0.25-2) ... 241s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 241s Setting up gcc-14 (14.2.0-17ubuntu1) ... 241s Setting up libqt6widgets6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up libfltk-gl1.3t64:arm64 (1.3.8-6.1build2) ... 241s Setting up libcurl4-openssl-dev:arm64 (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 241s Setting up libhdf5-dev (1.14.5+repack-3) ... 241s update-alternatives: using /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 241s Setting up gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu1) ... 241s Setting up g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 241s Setting up gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 241s Setting up g++-14 (14.2.0-17ubuntu1) ... 241s Setting up libmoox-aliases-perl (0.001006-2) ... 241s Setting up gfortran-14 (14.2.0-17ubuntu1) ... 241s Setting up libparams-validate-perl:arm64 (1.31-2build4) ... 241s Setting up libqt6openglwidgets6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up libb-hooks-endofscope-perl (0.28-1) ... 241s Setting up libqt6printsupport6:arm64 (6.8.1+dfsg-0ubuntu4) ... 241s Setting up libtool (2.5.4-3build1) ... 241s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 241s Setting up x11-xkb-utils (7.7+9) ... 241s Setting up libqt6help6:arm64 (6.8.1-0ubuntu1) ... 241s Setting up libqscintilla2-qt6-15:arm64 (2.14.1+dfsg-1build4) ... 241s Setting up gcc (4:14.2.0-1ubuntu1) ... 241s Setting up dh-autoreconf (20) ... 241s Setting up libnamespace-clean-perl (0.27-2) ... 241s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 241s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 241s Setting up g++ (4:14.2.0-1ubuntu1) ... 241s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 241s Setting up xserver-common (2:21.1.14-2ubuntu1) ... 241s Setting up licensecheck (3.3.9-1ubuntu1) ... 241s Setting up libapp-cmd-perl (0.337-2) ... 241s Setting up xvfb (2:21.1.14-2ubuntu1) ... 241s Setting up debhelper (13.24.1ubuntu2) ... 241s Setting up gfortran (4:14.2.0-1ubuntu1) ... 241s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 241s 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 241s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 241s 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 241s Setting up cme (1.041-1) ... 241s Setting up libheif-plugin-aomdec:arm64 (1.19.5-1build1) ... 241s Setting up libwww-perl (6.77-1) ... 241s Setting up libheif1:arm64 (1.19.5-1build1) ... 241s Setting up libparse-debcontrol-perl (2.005-6) ... 241s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 241s Setting up libwww-mechanize-perl (2.18-1ubuntu1) ... 241s Setting up libgd3:arm64 (2.3.3-12ubuntu3) ... 241s Setting up gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 241s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 241s Setting up liblwp-protocol-https-perl (6.14-1) ... 241s Setting up libheif-plugin-libde265:arm64 (1.19.5-1build1) ... 241s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 241s Setting up lintian (2.121.1ubuntu1) ... 241s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 241s Setting up libconfig-model-dpkg-perl (3.010) ... 241s Setting up dh-octave-autopkgtest (1.8.0) ... 241s Setting up octave (9.4.0-1) ... 241s Setting up octave-dev (9.4.0-1) ... 241s Setting up octave-io (2.6.4-3build2) ... 241s Setting up octave-statistics-common (1.7.2-1) ... 241s Setting up octave-statistics (1.7.2-1) ... 241s Setting up dh-octave (1.8.0) ... 241s Processing triggers for libc-bin (2.41-1ubuntu1) ... 241s Processing triggers for man-db (2.13.0-1) ... 242s Processing triggers for udev (257.2-3ubuntu1) ... 243s Processing triggers for install-info (7.1.1-1) ... 244s autopkgtest [07:45:48]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 244s autopkgtest [07:45:48]: test command1: [----------------------- 244s Checking package... 245s Run the unit tests... 246s Checking m files ... 246s [inst/nanmin.m] 246s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/nanmin.m 246s ***** demo 246s ## Find the column minimum values and their indices 246s ## for matrix data with missing values. 246s 246s x = magic (3); 246s x([1, 6:9]) = NaN 246s [y, ind] = nanmin (x) 246s ***** demo 246s ## Find the minimum of all the values in an array, ignoring missing values. 246s ## Create a 2-by-5-by-3 array x with some missing values. 246s 246s x = reshape (1:30, [2, 5, 3]); 246s x([10:12, 25]) = NaN 246s 246s ## Find the minimum of the elements of x. 246s 246s y = nanmin (x, [], 'all') 246s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 246s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 246s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 246s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 246s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 246s ***** shared x, y 246s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 246s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 246s y = x; 246s y(2,3,1) = 0.51; 246s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 246s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 246s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 246s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 246s ***** assert (nanmin (x, [], 'all'), -2.95) 246s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 246s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 246s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 246s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 246s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 246s ***** test 246s xx = repmat ([1:20;6:25], [5 2 6 3]); 246s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 246s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 246s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 246s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 246s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 246s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 246s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 246s ***** assert (nanmin (magic (3), [], 3), magic (3)) 246s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 246s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 246s ***** assert (nanmin (ones (2), 3), ones (2,2)) 246s ***** error ... 246s nanmin (y, [], [1, 1, 2]) 246s ***** error ... 246s [v, idx] = nanmin(x, y, [1 2]) 246s 24 tests, 24 passed, 0 known failure, 0 skipped 246s [inst/combnk.m] 246s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/combnk.m 246s ***** demo 246s c = combnk (1:5, 2); 246s disp ("All pairs of integers between 1 and 5:"); 246s disp (c); 246s ***** test 246s c = combnk (1:3, 2); 246s assert (c, [1, 2; 1, 3; 2, 3]); 246s ***** test 246s c = combnk (1:3, 6); 246s assert (isempty (c)); 246s ***** test 246s c = combnk ({1, 2, 3}, 2); 246s assert (c, {1, 2; 1, 3; 2, 3}); 246s ***** test 246s c = combnk ("hello", 2); 246s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 246s 4 tests, 4 passed, 0 known failure, 0 skipped 246s [inst/mhsample.m] 246s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/mhsample.m 246s ***** demo 246s ## Define function to sample 246s d = 2; 246s mu = [-1; 2]; 246s rand ("seed", 5) # for reproducibility 246s Sigma = rand (d); 246s Sigma = (Sigma + Sigma'); 246s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 246s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 246s ## Inputs 246s start = ones (1, 2); 246s nsamples = 500; 246s sym = true; 246s K = 500; 246s m = 10; 246s rand ("seed", 8) # for reproducibility 246s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 246s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 246s "symmetric", sym, "burnin", K, "thin", m); 246s figure; 246s hold on; 246s plot (smpl(:, 1), smpl(:, 2), 'x'); 246s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 246s z = reshape (pdf ([x(:), y(:)]), size(x)); 246s mesh (x, y, z, "facecolor", "None"); 246s ## Using sample points to find the volume of half a sphere with radius of .5 246s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 246s int = mean (f (smpl) ./ pdf (smpl)); 246s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 246s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 246s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 246s printf ("Monte Carlo integral error estimate %f\n", errest); 246s printf ("The actual error %f\n", trueerr); 246s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 246s ***** demo 246s ## Integrate truncated normal distribution to find normilization constant 246s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 246s nsamples = 1e3; 246s rand ("seed", 5) # for reproducibility 246s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 246s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 246s "symmetric", true, "thin", 4); 246s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 246s x = linspace (-3, 3, 1000); 246s area(x, f(x)); 246s xlabel ('x'); 246s ylabel ('f(x)'); 246s int = mean (f (smpl) ./ pdf (smpl)); 246s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 246s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 246s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 246s printf ("Monte Carlo integral error estimate %f\n", errest); 246s printf ("The actual error %f\n", trueerr); 246s ***** test 246s nchain = 1e4; 246s start = rand (nchain, 1); 246s nsamples = 1e3; 246s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 246s proppdf = @(x, y) 1/3; 246s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 246s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 246s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 246s "burnin", 0); 246s assert (mean (mean (smpl, 1), 3), 1, .01); 246s assert (mean (var (smpl, 1), 3), 1, .01) 250s ***** error mhsample (); 250s ***** error mhsample (1); 250s ***** error mhsample (1, 1); 250s ***** error mhsample (1, 1, "pdf", @(x)x); 250s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 250s 6 tests, 6 passed, 0 known failure, 0 skipped 250s [inst/wblplot.m] 250s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/wblplot.m 250s ***** demo 250s x = [16 34 53 75 93 120]; 250s wblplot (x); 250s ***** demo 250s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 250s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 250s [h, p] = wblplot (x, c); 250s p 250s ***** demo 250s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 250s [h, p] = wblplot (x, [], [], 0.05); 250s p 250s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 250s ***** demo 250s x = [46 64 83 105 123 150 150]; 250s c = [0 0 0 0 0 0 1]; 250s f = [1 1 1 1 1 1 4]; 250s wblplot (x, c, f, 0.05); 250s ***** demo 250s x = [46 64 83 105 123 150 150]; 250s c = [0 0 0 0 0 0 1]; 250s f = [1 1 1 1 1 1 4]; 250s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 250s wblplot (x - 30.92, c, f, 0.05); 250s ***** test 250s hf = figure ("visible", "off"); 250s unwind_protect 250s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 250s [h, p] = wblplot (x, [], [], 0.05); 250s assert (numel (h), 4) 250s assert (p(1), 146.2545, 1E-4) 250s assert (p(2), 1.1973, 1E-4) 250s assert (p(3), 0.9999, 5E-5) 250s unwind_protect_cleanup 250s close (hf); 250s end_unwind_protect 250s warning: using the gnuplot graphics toolkit is discouraged 250s 250s The gnuplot graphics toolkit is not actively maintained and has a number 250s of limitations that are unlikely to be fixed. Communication with gnuplot 250s uses a one-directional pipe and limited information is passed back to the 250s Octave interpreter so most changes made interactively in the plot window 250s will not be reflected in the graphics properties managed by Octave. For 250s example, if the plot window is closed with a mouse click, Octave will not 250s be notified and will not update its internal list of open figure windows. 250s The qt toolkit is recommended instead. 251s 1 test, 1 passed, 0 known failure, 0 skipped 251s [inst/gmdistribution.m] 251s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/gmdistribution.m 251s ***** test 251s mu = eye(2); 251s Sigma = eye(2); 251s GM = gmdistribution (mu, Sigma); 251s density = GM.pdf ([0 0; 1 1]); 251s assert (density(1) - density(2), 0, 1e-6); 251s 251s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 251s assert (idx, [1; 2]); 251s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 251s assert (nlogl - nlogl2, 0, 1e-6); 251s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 251s assert (P - P3, zeros (2), 1e-6); 251s [idx4,nlogl4] = cluster (GM, eye(2)); 251s assert (size (nlogl4), [1 1]); 251s idx5 = cluster (GM, eye(2)); 251s assert (idx - idx5, zeros (2,1)); 251s 251s D = GM.mahal ([1;0]); 251s assert (D - M(1,:), zeros (1,2), 1e-6); 251s 251s P = GM.posterior ([0 1]); 251s assert (P - P2(2,:), zeros (1,2), 1e-6); 251s 251s R = GM.random(20); 251s assert (size(R), [20, 2]); 251s 251s R = GM.random(); 251s assert (size(R), [1, 2]); 251s 1 test, 1 passed, 0 known failure, 0 skipped 251s [inst/ppplot.m] 251s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ppplot.m 251s ***** test 251s hf = figure ("visible", "off"); 251s unwind_protect 251s 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]); 251s unwind_protect_cleanup 251s close (hf); 251s end_unwind_protect 251s ***** error ppplot () 251s ***** error ppplot (ones (2,2)) 251s ***** error ppplot (1, 2) 251s ***** error ppplot ([1 2 3 4], 2) 251s 5 tests, 5 passed, 0 known failure, 0 skipped 251s [inst/vartest2.m] 251s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/vartest2.m 251s ***** error vartest2 (); 251s ***** error vartest2 (ones (20,1)); 251s ***** error ... 251s vartest2 (rand (20,1), 5); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 251s ***** error ... 251s vartest2 (rand (20,1), rand (25,1)*2, "some"); 251s ***** test 251s load carsmall 251s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 251s assert (h, 0); 251s assert (pval, 0.6288022362718455, 1e-13); 251s assert (ci, [0.4139; 1.7193], 1e-4); 251s assert (stat.fstat, 0.8384, 1e-4); 251s assert (stat.df1, 30); 251s assert (stat.df2, 33); 251s 14 tests, 14 passed, 0 known failure, 0 skipped 251s [inst/datasample.m] 251s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/datasample.m 251s ***** error datasample(); 252s ***** error datasample(1); 252s ***** error datasample({1, 2, 3}, 1); 252s ***** error datasample([1 2], -1); 252s ***** error datasample([1 2], 1.5); 252s ***** error datasample([1 2], [1 1]); 252s ***** error datasample([1 2], 'g', [1 1]); 252s ***** error datasample([1 2], 1, -1); 252s ***** error datasample([1 2], 1, 1.5); 252s ***** error datasample([1 2], 1, [1 1]); 252s ***** error datasample([1 2], 1, 1, "Replace", -2); 252s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 252s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 252s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 252s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 252s ***** test 252s dat = randn (10, 4); 252s assert (size (datasample (dat, 3, 1)), [3 4]); 252s ***** test 252s dat = randn (10, 4); 252s assert (size (datasample (dat, 3, 2)), [10 3]); 252s 17 tests, 17 passed, 0 known failure, 0 skipped 252s [inst/tabulate.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/tabulate.m 252s ***** demo 252s ## Generate a frequency table for a vector of data in a cell array 252s load patients 252s 252s ## Display the first seven entries of the Gender variable 252s gender = Gender(1:7) 252s 252s ## Compute the equency table that shows the number and 252s ## percentage of Male and Female patients 252s tabulate (Gender) 252s ***** demo 252s ## Create a frequency table for a vector of positive integers 252s load patients 252s 252s ## Display the first seven entries of the Gender variable 252s height = Height(1:7) 252s 252s ## Create a frequency table that shows, in its second and third columns, 252s ## the number and percentage of patients with a particular height. 252s table = tabulate (Height); 252s 252s ## Display the first and last seven entries of the frequency table 252s first = table(1:7,:) 252s 252s last = table(end-6:end,:) 252s ***** demo 252s ## Create a frequency table from a character array 252s load carsmall 252s 252s ## Tabulate the data in the Origin variable, which shows the 252s ## country of origin of each car in the data set 252s tabulate (Origin) 252s ***** demo 252s ## Create a frequency table from a numeric vector with NaN values 252s load carsmall 252s 252s ## The carsmall dataset contains measurements of 100 cars 252s total_cars = length (MPG) 252s ## For six cars, the MPG value is missing 252s missingMPG = length (MPG(isnan (MPG))) 252s 252s ## Create a frequency table using MPG 252s tabulate (MPG) 252s table = tabulate (MPG); 252s 252s ## Only 94 cars were used 252s valid_cars = sum (table(:,2)) 252s ***** test 252s load patients 252s table = tabulate (Gender); 252s assert (table{1,1}, "Male"); 252s assert (table{2,1}, "Female"); 252s assert (table{1,2}, 47); 252s assert (table{2,2}, 53); 252s ***** test 252s load patients 252s table = tabulate (Height); 252s assert (table(end-4,:), [68, 15, 15]); 252s assert (table(end-3,:), [69, 8, 8]); 252s assert (table(end-2,:), [70, 11, 11]); 252s assert (table(end-1,:), [71, 10, 10]); 252s assert (table(end,:), [72, 4, 4]); 252s ***** error tabulate (ones (3)) 252s ***** error tabulate ({1, 2, 3, 4}) 252s ***** error ... 252s tabulate ({"a", "b"; "a", "c"}) 252s 5 tests, 5 passed, 0 known failure, 0 skipped 252s [inst/pcares.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/pcares.m 252s ***** demo 252s x = [ 7 26 6 60; 252s 1 29 15 52; 252s 11 56 8 20; 252s 11 31 8 47; 252s 7 52 6 33; 252s 11 55 9 22; 252s 3 71 17 6; 252s 1 31 22 44; 252s 2 54 18 22; 252s 21 47 4 26; 252s 1 40 23 34; 252s 11 66 9 12; 252s 10 68 8 12]; 252s 252s ## As we increase the number of principal components, the norm 252s ## of the residuals matrix will decrease 252s r1 = pcares (x,1); 252s n1 = norm (r1) 252s r2 = pcares (x,2); 252s n2 = norm (r2) 252s r3 = pcares (x,3); 252s n3 = norm (r3) 252s r4 = pcares (x,4); 252s n4 = norm (r4) 252s ***** test 252s load hald 252s r1 = pcares (ingredients,1); 252s r2 = pcares (ingredients,2); 252s r3 = pcares (ingredients,3); 252s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 252s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 252s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 252s ***** error pcares (ones (20, 3)) 252s ***** error ... 252s pcares (ones (30, 2), 3) 252s 3 tests, 3 passed, 0 known failure, 0 skipped 252s [inst/ztest.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ztest.m 252s ***** error ztest (); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 2, -0.5); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 252s ***** error ... 252s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 252s ***** test 252s load carsmall 252s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 252s assert (h, 0); 252s assert (pval, 1, 1e-14); 252s assert (ci, [22.094; 25.343], 1e-3); 252s ***** test 252s load carsmall 252s [h, pval, ci] = ztest (MPG, 26, 8); 252s assert (h, 1); 252s assert (pval, 0.00568359158544743, 1e-14); 252s assert (ci, [22.101; 25.335], 1e-3); 252s ***** test 252s load carsmall 252s [h, pval, ci] = ztest (MPG, 26, 4); 252s assert (h, 1); 252s assert (pval, 3.184168011941316e-08, 1e-14); 252s assert (ci, [22.909; 24.527], 1e-3); 252s 13 tests, 13 passed, 0 known failure, 0 skipped 252s [inst/rangesearch.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/rangesearch.m 252s ***** demo 252s ## Generate 1000 random 2D points from each of five distinct multivariate 252s ## normal distributions that form five separate classes 252s N = 1000; 252s d = 10; 252s randn ("seed", 5); 252s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 252s randn ("seed", 6); 252s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 252s randn ("seed", 7); 252s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 252s randn ("seed", 8); 252s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 252s randn ("seed", 8); 252s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 252s X = [X1; X2; X3; X4; X5]; 252s 252s ## For each point in X, find the points in X that are within a radius d 252s ## away from the points in X. 252s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 252s 252s ## Select the first point in X (corresponding to the first class) and find 252s ## its nearest neighbors within the radius d. Display these points in 252s ## one color and the remaining points in a different color. 252s x = X(1,:); 252s nearestPoints = X (Idx{1},:); 252s nonNearestIdx = true (size (X, 1), 1); 252s nonNearestIdx(Idx{1}) = false; 252s 252s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 252s hold on 252s scatter (nearestPoints(:,1),nearestPoints(:,2)) 252s scatter (x(1), x(2), "black", "filled") 252s hold off 252s 252s ## Select the last point in X (corresponding to the fifth class) and find 252s ## its nearest neighbors within the radius d. Display these points in 252s ## one color and the remaining points in a different color. 252s x = X(end,:); 252s nearestPoints = X (Idx{1},:); 252s nonNearestIdx = true (size (X, 1), 1); 252s nonNearestIdx(Idx{1}) = false; 252s 252s figure 252s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 252s hold on 252s scatter (nearestPoints(:,1),nearestPoints(:,2)) 252s scatter (x(1), x(2), "black", "filled") 252s hold off 252s ***** shared x, y, X, Y 252s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 252s y = [2, 3, 4; 1, 4, 3]; 252s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 252s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 252s ***** test 252s [idx, D] = rangesearch (x, y, 4); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 252s assert (idx, {[1, 2, 4]; [1, 4]}); 252s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 252s "SortIndices", false); 252s assert (idx, {[1, 2, 4]; [1, 4]}); 252s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 252s ***** test 252s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 252s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 252s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 252s "NSMethod", "exhaustive"); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 252s "NSMethod", "exhaustive"); 252s assert (idx, {[1, 4, 2]; [1, 4]}); 252s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 252s "NSMethod", "exhaustive", "SortIndices", false); 252s assert (idx, {[1, 2, 4]; [1, 4]}); 252s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (X, Y, 4); 252s assert (idx, {[1, 2]; [1, 2, 3]}); 252s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (X, Y, 2); 252s assert (idx, {[1]; [1, 2]}); 252s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 252s ***** test 252s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 252s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 252s assert (idx, {[1, 2]; [1, 2, 3]}); 252s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 252s assert (idx, {[1, 2]; [1, 2, 3]}); 252s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 252s ***** test 252s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 252s "NSMethod", "exhaustive"); 252s assert (idx, {[1, 2]; [1, 2, 3]}); 252s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 252s ***** error rangesearch (1) 252s ***** error ... 252s rangesearch (ones (4, 5), ones (4)) 252s ***** error ... 252s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 252s ***** error ... 252s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 252s 31 tests, 31 passed, 0 known failure, 0 skipped 252s [inst/pcacov.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/pcacov.m 252s ***** demo 252s x = [ 7 26 6 60; 252s 1 29 15 52; 252s 11 56 8 20; 252s 11 31 8 47; 252s 7 52 6 33; 252s 11 55 9 22; 252s 3 71 17 6; 252s 1 31 22 44; 252s 2 54 18 22; 252s 21 47 4 26; 252s 1 40 23 34; 252s 11 66 9 12; 252s 10 68 8 12 252s ]; 252s Kxx = cov (x); 252s [coeff, latent, explained] = pcacov (Kxx) 252s ***** test 252s load hald 252s Kxx = cov (ingredients); 252s [coeff,latent,explained] = pcacov(Kxx); 252s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 252s -0.6785, -0.0200, -0.5440, 0.4933; ... 252s 0.0290, 0.7553, 0.4036, 0.5156; ... 252s 0.7309, -0.1085, -0.4684, 0.4844]; 252s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 252s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 252s assert (coeff, c_out, 1e-4); 252s assert (latent, l_out, 1e-4); 252s assert (explained, e_out, 1e-4); 252s ***** error pcacov (ones (2,3)) 252s ***** error pcacov (ones (3,3,3)) 252s 3 tests, 3 passed, 0 known failure, 0 skipped 252s [inst/jackknife.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/jackknife.m 252s ***** demo 252s for k = 1:1000 252s rand ("seed", k); # for reproducibility 252s x = rand (10, 1); 252s s(k) = std (x); 252s jackstat = jackknife (@std, x); 252s j(k) = 10 * std (x) - 9 * mean (jackstat); 252s endfor 252s figure(); 252s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 252s ***** demo 252s for k = 1:1000 252s randn ("seed", k); # for reproducibility 252s x = randn (1, 50); 252s rand ("seed", k); # for reproducibility 252s y = rand (1, 50); 252s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 252s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 252s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 252s endfor 252s t = (j - sqrt (1 / 12)) ./ sqrt (v); 252s figure(); 252s plot (sort (tcdf (t, 49)), ... 252s "-;Almost linear mapping indicates good fit with t-distribution.;") 252s ***** test 252s ##Example from Quenouille, Table 1 252s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 252s jackstat = jackknife ( @(x) 1/mean(x), d ); 252s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 252s 1 test, 1 passed, 0 known failure, 0 skipped 252s [inst/fitcgam.m] 252s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitcgam.m 252s ***** demo 252s ## Train a GAM classifier for binary classification 252s ## using specific data and plot the decision boundaries. 252s 252s ## Define specific data 252s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 252s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 252s Y = [0; 0; 0; 0; 0; ... 252s 1; 1; 1; 1; 1]; 252s 252s ## Train the GAM model 252s obj = fitcgam (X, Y, "Interactions", "all"); 252s 252s ## Create a grid of values for prediction 252s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 252s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 252s [x1G, x2G] = meshgrid (x1, x2); 252s XGrid = [x1G(:), x2G(:)]; 252s pred = predict (obj, XGrid); 252s 252s ## Plot decision boundaries and data points 252s predNumeric = str2double (pred); 252s gidx = predNumeric > 0.5; 252s 252s figure 252s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 252s hold on 252s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 252s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 252s xlabel("Feature 1"); 252s ylabel("Feature 2"); 252s title("Generalized Additive Model (GAM) Decision Boundary"); 252s legend({"Class 1 Region", "Class 0 Region", ... 252s "Class 1 Samples", "Class 0 Samples"}, ... 252s "location", "northwest") 252s axis tight 252s hold off 252s ***** test 252s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 252s y = [0; 0; 1; 1]; 252s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 252s a = fitcgam (x, y, "PredictorNames", PredictorNames); 252s assert (class (a), "ClassificationGAM"); 252s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 252s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 252s assert (a.ClassNames, {'0'; '1'}) 252s assert (a.PredictorNames, PredictorNames) 252s assert (a.BaseModel.Intercept, 0) 253s ***** test 253s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 253s y = [1; 0; 1; 0; 1]; 253s a = fitcgam (x, y, "interactions", "all"); 253s assert (class (a), "ClassificationGAM"); 253s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 253s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 253s assert (a.ClassNames, {'1'; '0'}) 253s assert (a.PredictorNames, {'x1', 'x2'}) 253s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 256s ***** test 256s load fisheriris 256s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 256s X = meas(inds, :); 256s Y = species(inds, :)'; 256s Y = strcmp (Y, 'virginica')'; 256s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 256s assert (class (a), "ClassificationGAM"); 256s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 256s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 256s assert (a.ClassNames, {'0'; '1'}) 256s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 256s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 256s assert (a.ModelwInt.Intercept, 0) 260s ***** error fitcgam () 260s ***** error fitcgam (ones (4,1)) 260s ***** error 260s fitcgam (ones (4,2), ones (4, 1), "K") 260s ***** error 260s fitcgam (ones (4,2), ones (3, 1)) 260s ***** error 260s fitcgam (ones (4,2), ones (3, 1), "K", 2) 260s 8 tests, 8 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/nakalike.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/nakalike.m 260s ***** test 260s nlogL = nakalike ([0.735504, 858.5], [1:50]); 260s assert (nlogL, 202.8689, 1e-4); 260s ***** test 260s nlogL = nakalike ([1.17404, 11], [1:5]); 260s assert (nlogL, 8.6976, 1e-4); 260s ***** test 260s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 260s assert (nlogL, 8.6976, 1e-4); 260s ***** test 260s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 260s assert (nlogL, 8.6976, 1e-4); 260s ***** error nakalike (3.25) 260s ***** error nakalike ([5, 0.2], ones (2)) 260s ***** error ... 260s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 260s ***** error ... 260s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 260s ***** error ... 260s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 260s ***** error ... 260s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 260s ***** error ... 260s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 260s 11 tests, 11 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/gumbelfit.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gumbelfit.m 260s ***** demo 260s ## Sample 3 populations from different Gumbel distibutions 260s rand ("seed", 1); # for reproducibility 260s r1 = gumbelrnd (2, 5, 400, 1); 260s rand ("seed", 11); # for reproducibility 260s r2 = gumbelrnd (-5, 3, 400, 1); 260s rand ("seed", 16); # for reproducibility 260s r3 = gumbelrnd (14, 8, 400, 1); 260s r = [r1, r2, r3]; 260s 260s ## Plot them normalized and fix their colors 260s hist (r, 25, 0.32); 260s h = findobj (gca, "Type", "patch"); 260s set (h(1), "facecolor", "c"); 260s set (h(2), "facecolor", "g"); 260s set (h(3), "facecolor", "r"); 260s ylim ([0, 0.28]) 260s xlim ([-11, 50]); 260s hold on 260s 260s ## Estimate their MU and BETA parameters 260s mu_betaA = gumbelfit (r(:,1)); 260s mu_betaB = gumbelfit (r(:,2)); 260s mu_betaC = gumbelfit (r(:,3)); 260s 260s ## Plot their estimated PDFs 260s x = [min(r(:)):max(r(:))]; 260s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 260s plot (x, y, "-pr"); 260s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 260s plot (x, y, "-sg"); 260s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 260s plot (x, y, "-^c"); 260s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 260s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 260s "Normalized HIST of sample 3 with μ=14 and β=8", ... 260s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 260s mu_betaA(1), mu_betaA(2)), ... 260s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 260s mu_betaB(1), mu_betaB(2)), ... 260s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 260s mu_betaC(1), mu_betaC(2))}) 260s title ("Three population samples from different Gumbel distibutions") 260s hold off 260s ***** test 260s x = 1:50; 260s [paramhat, paramci] = gumbelfit (x); 260s paramhat_out = [18.3188, 13.0509]; 260s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 260s assert (paramhat, paramhat_out, 1e-4); 260s assert (paramci, paramci_out, 1e-4); 260s ***** test 260s x = 1:50; 260s [paramhat, paramci] = gumbelfit (x, 0.01); 260s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 260s assert (paramci, paramci_out, 1e-4); 260s ***** error gumbelfit (ones (2,5)); 260s ***** error ... 260s gumbelfit (single (ones (1,5))); 260s ***** error ... 260s gumbelfit ([1, 2, 3, 4, NaN]); 260s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 260s ***** error ... 260s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 260s ***** error ... 260s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 260s ***** error 260s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 260s ***** error ... 260s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 260s 10 tests, 10 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/binolike.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/binolike.m 260s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 260s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 260s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 260s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 260s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 260s ***** test 260s [nlogL, acov] = binolike ([3, 0.333], 3); 260s assert (acov(4), 0.0740, 1e-4) 260s ***** error binolike (3.25) 260s ***** error binolike ([5, 0.2], ones (2)) 260s ***** error ... 260s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 260s ***** error binolike ([1.5, 0.2], 1) 260s ***** error binolike ([-1, 0.2], 1) 260s ***** error binolike ([Inf, 0.2], 1) 260s ***** error binolike ([5, 1.2], [3, 5]) 260s ***** error binolike ([5, -0.2], [3, 5]) 260s ***** error ... 260s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 260s ***** error ... 260s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 260s ***** error binolike ([5, 0.2], [-1, 3]) 260s ***** error binolike ([5, 0.2], [3, 5, 7]) 260s 18 tests, 18 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/loglfit.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/loglfit.m 260s ***** demo 260s ## Sample 3 populations from different log-logistic distibutions 260s rand ("seed", 5) # for reproducibility 260s r1 = loglrnd (0, 1, 2000, 1); 260s rand ("seed", 2) # for reproducibility 260s r2 = loglrnd (0, 0.5, 2000, 1); 260s rand ("seed", 7) # for reproducibility 260s r3 = loglrnd (0, 0.125, 2000, 1); 260s r = [r1, r2, r3]; 260s 260s ## Plot them normalized and fix their colors 260s hist (r, [0.05:0.1:2.5], 10); 260s h = findobj (gca, "Type", "patch"); 260s set (h(1), "facecolor", "c"); 260s set (h(2), "facecolor", "g"); 260s set (h(3), "facecolor", "r"); 260s ylim ([0, 3.5]); 260s xlim ([0, 2.0]); 260s hold on 260s 260s ## Estimate their MU and LAMBDA parameters 260s a_bA = loglfit (r(:,1)); 260s a_bB = loglfit (r(:,2)); 260s a_bC = loglfit (r(:,3)); 260s 260s ## Plot their estimated PDFs 260s x = [0.01:0.1:2.01]; 260s y = loglpdf (x, a_bA(1), a_bA(2)); 260s plot (x, y, "-pr"); 260s y = loglpdf (x, a_bB(1), a_bB(2)); 260s plot (x, y, "-sg"); 260s y = loglpdf (x, a_bC(1), a_bC(2)); 260s plot (x, y, "-^c"); 260s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 260s "Normalized HIST of sample 2 with α=1 and β=2", ... 260s "Normalized HIST of sample 3 with α=1 and β=8", ... 260s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 260s a_bA(1), a_bA(2)), ... 260s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 260s a_bB(1), a_bB(2)), ... 260s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 260s a_bC(1), a_bC(2))}) 260s title ("Three population samples from different log-logistic distibutions") 260s hold off 260s ***** test 260s [paramhat, paramci] = loglfit ([1:50]); 260s paramhat_out = [3.09717, 0.468525]; 260s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 260s assert (paramhat, paramhat_out, 1e-5); 260s assert (paramci, paramci_out, 1e-5); 260s ***** test 260s paramhat = loglfit ([1:5]); 260s paramhat_out = [1.01124, 0.336449]; 260s assert (paramhat, paramhat_out, 1e-5); 260s ***** test 260s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 260s paramhat_out = [1.01124, 0.336449]; 260s assert (paramhat, paramhat_out, 1e-4); 260s ***** test 260s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 260s paramhat_out = loglfit ([1:5, 5]); 260s assert (paramhat, paramhat_out, 1e-4); 260s ***** error loglfit (ones (2,5)); 260s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 260s ***** error loglfit ([1, 2, 3, 4, 5], 0); 260s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 260s ***** error ... 260s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 260s ***** error ... 260s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 260s ***** error ... 260s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 260s ***** error ... 260s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 260s ***** error ... 260s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 260s 13 tests, 13 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/gplike.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gplike.m 260s ***** test 260s k = 0.8937; sigma = 1.3230; theta = 1; 260s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 260s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 260s [nlogL, acov] = gplike ([k, sigma, theta], x); 260s assert (nlogL, 21.736, 1e-3); 260s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 260s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 260s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 260s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 260s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 260s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 260s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 260s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 260s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 260s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 260s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 260s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 260s ***** error gplike () 260s ***** error gplike (1) 260s ***** error gplike ([1, 2, 0], []) 260s ***** error gplike ([1, 2, 0], ones (2)) 260s ***** error gplike (2, [1:10]) 260s ***** error gplike ([2, 3], [1:10]) 260s ***** error ... 260s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 260s ***** error ... 260s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 260s 20 tests, 20 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/gevfit_lmom.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gevfit_lmom.m 260s ***** xtest <31070> 260s data = 1:50; 260s [pfit, pci] = gevfit_lmom (data); 260s expected_p = [-0.28 15.01 20.22]'; 260s assert (pfit, expected_p, 0.1); 260s 1 test, 1 passed, 0 known failure, 0 skipped 260s [inst/dist_fit/gamfit.m] 260s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gamfit.m 260s ***** demo 260s ## Sample 3 populations from different Gamma distibutions 260s randg ("seed", 5); # for reproducibility 260s r1 = gamrnd (1, 2, 2000, 1); 260s randg ("seed", 2); # for reproducibility 260s r2 = gamrnd (2, 2, 2000, 1); 260s randg ("seed", 7); # for reproducibility 260s r3 = gamrnd (7.5, 1, 2000, 1); 260s r = [r1, r2, r3]; 260s 260s ## Plot them normalized and fix their colors 260s hist (r, 75, 4); 260s h = findobj (gca, "Type", "patch"); 260s set (h(1), "facecolor", "c"); 260s set (h(2), "facecolor", "g"); 260s set (h(3), "facecolor", "r"); 260s ylim ([0, 0.62]); 260s xlim ([0, 12]); 260s hold on 260s 260s ## Estimate their α and β parameters 260s a_bA = gamfit (r(:,1)); 260s a_bB = gamfit (r(:,2)); 260s a_bC = gamfit (r(:,3)); 260s 260s ## Plot their estimated PDFs 260s x = [0.01,0.1:0.2:18]; 260s y = gampdf (x, a_bA(1), a_bA(2)); 260s plot (x, y, "-pr"); 260s y = gampdf (x, a_bB(1), a_bB(2)); 260s plot (x, y, "-sg"); 260s y = gampdf (x, a_bC(1), a_bC(2)); 260s plot (x, y, "-^c"); 260s hold off 260s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 260s "Normalized HIST of sample 2 with α=2 and β=2", ... 260s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 260s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 260s a_bA(1), a_bA(2)), ... 260s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 260s a_bB(1), a_bB(2)), ... 260s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 260s a_bC(1), a_bC(2))}) 260s title ("Three population samples from different Gamma distibutions") 260s hold off 260s ***** shared x 260s 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]; 260s ***** test 260s [paramhat, paramci] = gamfit (x); 260s assert (paramhat, [3.4248, 0.9752], 1e-4); 260s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 260s ***** test 260s [paramhat, paramci] = gamfit (x, 0.01); 260s assert (paramhat, [3.4248, 0.9752], 1e-4); 260s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 260s ***** test 260s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 260s [paramhat, paramci] = gamfit (x, [], [], freq); 260s assert (paramhat, [3.3025, 1.0615], 1e-4); 260s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 260s ***** test 260s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 260s assert (paramhat, [4.4484, 0.9689], 1e-4); 260s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 260s ***** test 260s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 260s assert (paramhat, [4.4484, 0.9689], 1e-4); 260s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 260s ***** test 260s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 260s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 260s assert (paramhat, [4.7537, 0.9308], 1e-4); 260s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 261s ***** test 261s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 261s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 261s [paramhat, paramci] = gamfit (x, [], cens, freq); 261s assert (paramhat, [3.4736, 1.0847], 1e-4); 261s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 261s ***** test 261s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 261s assert (paramhat, [Inf, 0]); 261s assert (paramci, [Inf, 0; Inf, 0]); 261s ***** test 261s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 261s assert (paramhat, [NaN, NaN]); 261s assert (paramci, [NaN, NaN; NaN, NaN]); 261s ***** test 261s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 261s assert (paramhat, [Inf, 0]); 261s assert (paramci, [Inf, 0; Inf, 0]); 261s ***** assert (class (gamfit (single (x))), "single") 261s ***** error gamfit (ones (2)) 261s ***** error gamfit (x, 1) 261s ***** error gamfit (x, -1) 261s ***** error gamfit (x, {0.05}) 261s ***** error gamfit (x, "a") 261s ***** error gamfit (x, i) 261s ***** error gamfit (x, [0.01 0.02]) 261s ***** error 261s gamfit ([1 2 3], 0.05, [], [1 5]) 261s ***** error 261s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 261s ***** error ... 261s gamfit ([1:10], 0.05, [], [], 5) 261s ***** error gamfit ([1 2 3 -4]) 261s ***** error ... 261s gamfit ([1 2 0], [], [1 0 0]) 261s 23 tests, 23 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/burrlike.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/burrlike.m 261s ***** error burrlike (3.25) 261s ***** error burrlike ([1, 2, 3], ones (2)) 261s ***** error burrlike ([1, 2, 3], [-1, 3]) 261s ***** error ... 261s burrlike ([1, 2], [1, 3, 5, 7]) 261s ***** error ... 261s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 261s ***** error ... 261s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 261s ***** error ... 261s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 261s ***** error ... 261s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 261s 8 tests, 8 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/nakafit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/nakafit.m 261s ***** demo 261s ## Sample 3 populations from different Nakagami distibutions 261s randg ("seed", 5) # for reproducibility 261s r1 = nakarnd (0.5, 1, 2000, 1); 261s randg ("seed", 2) # for reproducibility 261s r2 = nakarnd (5, 1, 2000, 1); 261s randg ("seed", 7) # for reproducibility 261s r3 = nakarnd (2, 2, 2000, 1); 261s r = [r1, r2, r3]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, [0.05:0.1:3.5], 10); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s set (h(3), "facecolor", "r"); 261s ylim ([0, 2.5]); 261s xlim ([0, 3.0]); 261s hold on 261s 261s ## Estimate their MU and LAMBDA parameters 261s mu_omegaA = nakafit (r(:,1)); 261s mu_omegaB = nakafit (r(:,2)); 261s mu_omegaC = nakafit (r(:,3)); 261s 261s ## Plot their estimated PDFs 261s x = [0.01:0.1:3.01]; 261s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 261s plot (x, y, "-pr"); 261s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 261s plot (x, y, "-sg"); 261s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 261s plot (x, y, "-^c"); 261s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 261s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 261s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 261s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 261s mu_omegaA(1), mu_omegaA(2)), ... 261s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 261s mu_omegaB(1), mu_omegaB(2)), ... 261s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 261s mu_omegaC(1), mu_omegaC(2))}) 261s title ("Three population samples from different Nakagami distibutions") 261s hold off 261s ***** test 261s paramhat = nakafit ([1:50]); 261s paramhat_out = [0.7355, 858.5]; 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** test 261s paramhat = nakafit ([1:5]); 261s paramhat_out = [1.1740, 11]; 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** test 261s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 261s paramhat_out = [1.1740, 11]; 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** test 261s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 261s paramhat_out = nakafit ([1:5, 5]); 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** error nakafit (ones (2,5)); 261s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 261s ***** error nakafit ([1, 2, 3, 4, 5], 0); 261s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 261s ***** error ... 261s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 261s 15 tests, 15 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/invgfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/invgfit.m 261s ***** demo 261s ## Sample 3 populations from different inverse Gaussian distibutions 261s rand ("seed", 5); randn ("seed", 5); # for reproducibility 261s r1 = invgrnd (1, 0.2, 2000, 1); 261s rand ("seed", 2); randn ("seed", 2); # for reproducibility 261s r2 = invgrnd (1, 3, 2000, 1); 261s rand ("seed", 7); randn ("seed", 7); # for reproducibility 261s r3 = invgrnd (3, 1, 2000, 1); 261s r = [r1, r2, r3]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, [0.1:0.1:3.2], 9); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s set (h(3), "facecolor", "r"); 261s ylim ([0, 3]); 261s xlim ([0, 3]); 261s hold on 261s 261s ## Estimate their MU and LAMBDA parameters 261s mu_lambdaA = invgfit (r(:,1)); 261s mu_lambdaB = invgfit (r(:,2)); 261s mu_lambdaC = invgfit (r(:,3)); 261s 261s ## Plot their estimated PDFs 261s x = [0:0.1:3]; 261s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 261s plot (x, y, "-pr"); 261s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 261s plot (x, y, "-sg"); 261s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 261s plot (x, y, "-^c"); 261s hold off 261s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 261s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 261s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 261s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 261s mu_lambdaA(1), mu_lambdaA(2)), ... 261s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 261s mu_lambdaB(1), mu_lambdaB(2)), ... 261s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 261s mu_lambdaC(1), mu_lambdaC(2))}) 261s title ("Three population samples from different inverse Gaussian distibutions") 261s hold off 261s ***** test 261s paramhat = invgfit ([1:50]); 261s paramhat_out = [25.5, 19.6973]; 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** test 261s paramhat = invgfit ([1:5]); 261s paramhat_out = [3, 8.1081]; 261s assert (paramhat, paramhat_out, 1e-4); 261s ***** error invgfit (ones (2,5)); 261s ***** error invgfit ([-1 2 3 4]); 261s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 261s ***** error invgfit ([1, 2, 3, 4, 5], 0); 261s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 261s ***** error ... 261s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 261s ***** error ... 261s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 261s ***** error ... 261s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 261s ***** error ... 261s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 261s ***** error ... 261s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 261s 12 tests, 12 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/gpfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gpfit.m 261s ***** demo 261s ## Sample 2 populations from different generalized Pareto distibutions 261s ## Assume location parameter θ is known 261s theta = 0; 261s rand ("seed", 5); # for reproducibility 261s r1 = gprnd (1, 2, theta, 20000, 1); 261s rand ("seed", 2); # for reproducibility 261s r2 = gprnd (3, 1, theta, 20000, 1); 261s r = [r1, r2]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, [0.1:0.2:100], 5); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "r"); 261s set (h(2), "facecolor", "c"); 261s ylim ([0, 1]); 261s xlim ([0, 5]); 261s hold on 261s 261s ## Estimate their α and β parameters 261s k_sigmaA = gpfit (r(:,1), theta); 261s k_sigmaB = gpfit (r(:,2), theta); 261s 261s ## Plot their estimated PDFs 261s x = [0.01, 0.1:0.2:18]; 261s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 261s plot (x, y, "-pc"); 261s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 261s plot (x, y, "-sr"); 261s hold off 261s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 261s "Normalized HIST of sample 2 with k=2 and σ=2", ... 261s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 261s k_sigmaA(1), k_sigmaA(2)), ... 261s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 261s k_sigmaB(1), k_sigmaB(2))}) 261s title ("Three population samples from different generalized Pareto distibutions") 261s text (2, 0.7, "Known location parameter θ = 0") 261s hold off 261s ***** test 261s k = 0.8937; sigma = 1.3230; theta = 1; 261s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 261s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 261s [hat, ci] = gpfit (x, theta); 261s assert (hat, [k, sigma, theta], 1e-4); 261s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 261s ***** error gpfit () 261s ***** error gpfit (1) 261s ***** error gpfit ([0.2, 0.5+i], 0); 261s ***** error gpfit (ones (2,2) * 0.5, 0); 261s ***** error ... 261s gpfit ([0.5, 1.2], [0, 1]); 261s ***** error ... 261s gpfit ([0.5, 1.2], 5+i); 261s ***** error ... 261s gpfit ([1:5], 2); 261s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 261s ***** error gpfit ([0.01:0.1:0.99], 0, i); 261s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 261s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 261s ***** error 261s gpfit ([1 2 3], 0, [], [1 5]) 261s ***** error 261s gpfit ([1 2 3], 0, [], [1 5 -1]) 261s ***** error ... 261s gpfit ([1:10], 1, 0.05, [], 5) 261s 15 tests, 15 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/normfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/normfit.m 261s ***** demo 261s ## Sample 3 populations from 3 different normal distibutions 261s randn ("seed", 1); # for reproducibility 261s r1 = normrnd (2, 5, 5000, 1); 261s randn ("seed", 2); # for reproducibility 261s r2 = normrnd (5, 2, 5000, 1); 261s randn ("seed", 3); # for reproducibility 261s r3 = normrnd (9, 4, 5000, 1); 261s r = [r1, r2, r3]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, 15, 0.4); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s set (h(3), "facecolor", "r"); 261s hold on 261s 261s ## Estimate their mu and sigma parameters 261s [muhat, sigmahat] = normfit (r); 261s 261s ## Plot their estimated PDFs 261s x = [min(r(:)):max(r(:))]; 261s y = normpdf (x, muhat(1), sigmahat(1)); 261s plot (x, y, "-pr"); 261s y = normpdf (x, muhat(2), sigmahat(2)); 261s plot (x, y, "-sg"); 261s y = normpdf (x, muhat(3), sigmahat(3)); 261s plot (x, y, "-^c"); 261s ylim ([0, 0.5]) 261s xlim ([-20, 20]) 261s hold off 261s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 261s "Normalized HIST of sample 2 with mu=5, σ=2", ... 261s "Normalized HIST of sample 3 with mu=9, σ=4", ... 261s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 261s muhat(1), sigmahat(1)), ... 261s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 261s muhat(2), sigmahat(2)), ... 261s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 261s muhat(3), sigmahat(3))}, "location", "northwest") 261s title ("Three population samples from different normal distibutions") 261s hold off 261s ***** test 261s load lightbulb 261s idx = find (lightbulb(:,2) == 0); 261s censoring = lightbulb(idx,3) == 1; 261s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 261s assert (muHat, 9496.59586737857, 1e-11); 261s assert (sigmaHat, 3064.021012796456, 2e-12); 261s ***** test 261s randn ("seed", 234); 261s x = normrnd (3, 5, [1000, 1]); 261s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 261s assert (muCI(1) < 3); 261s assert (muCI(2) > 3); 261s assert (sigmaCI(1) < 5); 261s assert (sigmaCI(2) > 5); 261s ***** error ... 261s normfit (ones (3,3,3)) 261s ***** error ... 261s normfit (ones (20,3), [], zeros (20,1)) 261s ***** error normfit (ones (20,1), 0) 261s ***** error normfit (ones (20,1), -0.3) 261s ***** error normfit (ones (20,1), 1.2) 261s ***** error normfit (ones (20,1), [0.05 0.1]) 261s ***** error normfit (ones (20,1), 0.02+i) 261s ***** error ... 261s normfit (ones (20,1), [], zeros(15,1)) 261s ***** error ... 261s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 261s ***** error ... 261s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 261s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 261s 13 tests, 13 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/hnlike.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/hnlike.m 261s ***** test 261s x = 1:20; 261s paramhat = hnfit (x, 0); 261s [nlogL, acov] = hnlike (paramhat, x); 261s assert (nlogL, 64.179177404891300, 1e-14); 261s ***** test 261s x = 1:20; 261s paramhat = hnfit (x, 0); 261s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 261s assert (nlogL, 64.179177404891300, 1e-14); 261s ***** error ... 261s hnlike ([12, 15]); 261s ***** error hnlike ([12, 15, 3], [1:50]); 261s ***** error hnlike ([3], [1:50]); 261s ***** error ... 261s hnlike ([0, 3], ones (2)); 261s ***** error ... 261s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 261s ***** error ... 261s hnlike ([1, 2], ones (10, 1), ones (8,1)) 261s ***** error ... 261s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 261s 9 tests, 9 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/evfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/evfit.m 261s ***** demo 261s ## Sample 3 populations from different extreme value distibutions 261s rand ("seed", 1); # for reproducibility 261s r1 = evrnd (2, 5, 400, 1); 261s rand ("seed", 12); # for reproducibility 261s r2 = evrnd (-5, 3, 400, 1); 261s rand ("seed", 13); # for reproducibility 261s r3 = evrnd (14, 8, 400, 1); 261s r = [r1, r2, r3]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, 25, 0.4); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s set (h(3), "facecolor", "r"); 261s ylim ([0, 0.28]) 261s xlim ([-30, 30]); 261s hold on 261s 261s ## Estimate their MU and SIGMA parameters 261s mu_sigmaA = evfit (r(:,1)); 261s mu_sigmaB = evfit (r(:,2)); 261s mu_sigmaC = evfit (r(:,3)); 261s 261s ## Plot their estimated PDFs 261s x = [min(r(:)):max(r(:))]; 261s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 261s plot (x, y, "-pr"); 261s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 261s plot (x, y, "-sg"); 261s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 261s plot (x, y, "-^c"); 261s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 261s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 261s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 261s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 261s mu_sigmaA(1), mu_sigmaA(2)), ... 261s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 261s mu_sigmaB(1), mu_sigmaB(2)), ... 261s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 261s mu_sigmaC(1), mu_sigmaC(2))}) 261s title ("Three population samples from different extreme value distibutions") 261s hold off 261s ***** test 261s x = 1:50; 261s [paramhat, paramci] = evfit (x); 261s paramhat_out = [32.6811, 13.0509]; 261s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 261s assert (paramhat, paramhat_out, 1e-4); 261s assert (paramci, paramci_out, 1e-4); 261s ***** test 261s x = 1:50; 261s [paramhat, paramci] = evfit (x, 0.01); 261s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 261s assert (paramci, paramci_out, 1e-4); 261s ***** error evfit (ones (2,5)); 261s ***** error evfit (single (ones (1,5))); 261s ***** error evfit ([1, 2, 3, 4, NaN]); 261s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 261s ***** error 261s evfit ([1 2 3], 0.05, [], [1 5]) 261s ***** error 261s evfit ([1 2 3], 0.05, [], [1 5 -1]) 261s ***** error ... 261s evfit ([1:10], 0.05, [], [], 5) 261s 9 tests, 9 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/unidfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/unidfit.m 261s ***** demo 261s ## Sample 2 populations from different discrete uniform distibutions 261s rand ("seed", 1); # for reproducibility 261s r1 = unidrnd (5, 1000, 1); 261s rand ("seed", 2); # for reproducibility 261s r2 = unidrnd (9, 1000, 1); 261s r = [r1, r2]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, 0:0.5:20.5, 1); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s hold on 261s 261s ## Estimate their probability of success 261s NhatA = unidfit (r(:,1)); 261s NhatB = unidfit (r(:,2)); 261s 261s ## Plot their estimated PDFs 261s x = [0:10]; 261s y = unidpdf (x, NhatA); 261s plot (x, y, "-pg"); 261s y = unidpdf (x, NhatB); 261s plot (x, y, "-sc"); 261s xlim ([0, 10]) 261s ylim ([0, 0.4]) 261s legend ({"Normalized HIST of sample 1 with N=5", ... 261s "Normalized HIST of sample 2 with N=9", ... 261s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 261s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 261s title ("Two population samples from different discrete uniform distibutions") 261s hold off 261s ***** test 261s x = 0:5; 261s [Nhat, Nci] = unidfit (x); 261s assert (Nhat, 5); 261s assert (Nci, [5; 9]); 261s ***** test 261s x = 0:5; 261s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 261s assert (Nhat, 5); 261s assert (Nci, [5; 9]); 261s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 261s ***** error unidfit () 261s ***** error unidfit (-1, [1 2 3 3]) 261s ***** error unidfit (1, 0) 261s ***** error unidfit (1, 1.2) 261s ***** error unidfit (1, [0.02 0.05]) 261s ***** error ... 261s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 261s ***** error ... 261s unidfit ([1.5, 0.2], [], [1, 1, 1]) 261s ***** error ... 261s unidfit ([1.5, 0.2], [], [1, -1]) 261s 11 tests, 11 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/wbllike.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/wbllike.m 261s ***** test 261s x = 1:50; 261s [nlogL, acov] = wbllike ([2.3, 1.2], x); 261s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 261s assert (nlogL, 945.9589180651594, 1e-12); 261s assert (acov, avar_out, 1e-4); 261s ***** test 261s x = 1:50; 261s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 261s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 261s assert (nlogL, 424.9879809704742, 6e-14); 261s assert (acov, avar_out, 1e-4); 261s ***** test 261s x = 1:50; 261s [nlogL, acov] = wbllike ([21, 15], x); 261s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 261s assert (nlogL, 1635190.328991511, 1e-8); 261s assert (acov, avar_out, 1e-8); 261s ***** error wbllike ([12, 15]); 261s ***** error wbllike ([12, 15, 3], [1:50]); 261s ***** error wbllike ([12, 3], ones (10, 2)); 261s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 261s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 261s ***** error ... 261s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 261s 9 tests, 9 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/hnfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/hnfit.m 261s ***** demo 261s ## Sample 2 populations from different half-normal distibutions 261s rand ("seed", 1); # for reproducibility 261s r1 = hnrnd (0, 5, 5000, 1); 261s rand ("seed", 2); # for reproducibility 261s r2 = hnrnd (0, 2, 5000, 1); 261s r = [r1, r2]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, [0.5:20], 1); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s hold on 261s 261s ## Estimate their shape parameters 261s mu_sigmaA = hnfit (r(:,1), 0); 261s mu_sigmaB = hnfit (r(:,2), 0); 261s 261s ## Plot their estimated PDFs 261s x = [0:0.2:10]; 261s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 261s plot (x, y, "-pr"); 261s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 261s plot (x, y, "-sg"); 261s xlim ([0, 10]) 261s ylim ([0, 0.5]) 261s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 261s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 261s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 261s mu_sigmaA(1), mu_sigmaA(2)), ... 261s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 261s mu_sigmaB(1), mu_sigmaB(2))}) 261s title ("Two population samples from different half-normal distibutions") 261s hold off 261s ***** test 261s x = 1:20; 261s [paramhat, paramci] = hnfit (x, 0); 261s assert (paramhat, [0, 11.9791], 1e-4); 261s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 261s ***** test 261s x = 1:20; 261s [paramhat, paramci] = hnfit (x, 0, 0.01); 261s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 261s ***** error hnfit () 261s ***** error hnfit (1) 261s ***** error hnfit ([0.2, 0.5+i], 0); 261s ***** error hnfit (ones (2,2) * 0.5, 0); 261s ***** error ... 261s hnfit ([0.5, 1.2], [0, 1]); 261s ***** error ... 261s hnfit ([0.5, 1.2], 5+i); 261s ***** error ... 261s hnfit ([1:5], 2); 261s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 261s ***** error hnfit ([0.01:0.1:0.99], 0, i); 261s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 261s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 261s ***** error 261s hnfit ([1 2 3], 0, [], [1 5]) 261s ***** error 261s hnfit ([1 2 3], 0, [], [1 5 -1]) 261s 15 tests, 15 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/logllike.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/logllike.m 261s ***** test 261s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 261s assert (nlogL, 211.2965, 1e-4); 261s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 261s ***** test 261s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 261s assert (nlogL, 9.2206, 1e-4); 261s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 261s ***** error logllike (3.25) 261s ***** error logllike ([5, 0.2], ones (2)) 261s ***** error ... 261s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 261s ***** error ... 261s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 261s ***** error ... 261s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 261s ***** error ... 261s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 261s 8 tests, 8 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/bisalike.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/bisalike.m 261s ***** test 261s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 261s assert (nlogL, 215.5905, 1e-4); 261s ***** test 261s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 261s assert (nlogL, 8.9950, 1e-4); 261s ***** error bisalike (3.25) 261s ***** error bisalike ([5, 0.2], ones (2)) 261s ***** error bisalike ([5, 0.2], [-1, 3]) 261s ***** error ... 261s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 261s ***** error ... 261s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 261s ***** error ... 261s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 261s ***** error ... 261s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 261s 9 tests, 9 passed, 0 known failure, 0 skipped 261s [inst/dist_fit/lognfit.m] 261s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/lognfit.m 261s ***** demo 261s ## Sample 3 populations from 3 different log-normal distibutions 261s randn ("seed", 1); # for reproducibility 261s r1 = lognrnd (0, 0.25, 1000, 1); 261s randn ("seed", 2); # for reproducibility 261s r2 = lognrnd (0, 0.5, 1000, 1); 261s randn ("seed", 3); # for reproducibility 261s r3 = lognrnd (0, 1, 1000, 1); 261s r = [r1, r2, r3]; 261s 261s ## Plot them normalized and fix their colors 261s hist (r, 30, 2); 261s h = findobj (gca, "Type", "patch"); 261s set (h(1), "facecolor", "c"); 261s set (h(2), "facecolor", "g"); 261s set (h(3), "facecolor", "r"); 261s hold on 261s 261s ## Estimate their mu and sigma parameters 261s mu_sigmaA = lognfit (r(:,1)); 261s mu_sigmaB = lognfit (r(:,2)); 261s mu_sigmaC = lognfit (r(:,3)); 261s 261s ## Plot their estimated PDFs 261s x = [0:0.1:6]; 261s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 261s plot (x, y, "-pr"); 261s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 261s plot (x, y, "-sg"); 261s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 261s plot (x, y, "-^c"); 261s ylim ([0, 2]) 261s xlim ([0, 6]) 261s hold off 261s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 261s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 261s "Normalized HIST of sample 3 with mu=0, σ=1", ... 261s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 261s mu_sigmaA(1), mu_sigmaA(2)), ... 261s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 261s mu_sigmaB(1), mu_sigmaB(2)), ... 261s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 261s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 261s title ("Three population samples from different log-normal distibutions") 261s hold off 261s ***** test 261s randn ("seed", 1); 261s x = lognrnd (3, 5, [1000, 1]); 261s [paramhat, paramci] = lognfit (x, 0.01); 261s assert (paramci(1,1) < 3); 261s assert (paramci(1,2) > 3); 261s assert (paramci(2,1) < 5); 261s assert (paramci(2,2) > 5); 262s ***** error ... 262s lognfit (ones (20,3)) 262s ***** error ... 262s lognfit ({1, 2, 3, 4, 5}) 262s ***** error ... 262s lognfit ([-1, 2, 3, 4, 5]) 262s ***** error lognfit (ones (20,1), 0) 262s ***** error lognfit (ones (20,1), -0.3) 262s ***** error lognfit (ones (20,1), 1.2) 262s ***** error lognfit (ones (20,1), [0.05, 0.1]) 262s ***** error lognfit (ones (20,1), 0.02+i) 262s ***** error ... 262s lognfit (ones (20,1), [], zeros(15,1)) 262s ***** error ... 262s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 262s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 262s 12 tests, 12 passed, 0 known failure, 0 skipped 262s [inst/dist_fit/lognlike.m] 262s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/lognlike.m 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = lognlike ([0, 0.25], x); 262s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 262s assert (nlogL, 3962.330333301793, 1e-10); 262s assert (avar, avar_out, 1e-7); 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 262s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 262s assert (nlogL, 2473.183051225747, 1e-10); 262s assert (avar, avar_out, 1e-7); 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = lognlike ([0, 0.5], x); 262s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 262s assert (nlogL, 1119.072424020455, 1e-12); 262s assert (avar, avar_out, 1e-6); 262s ***** test 262s x = 1:50; 262s censor = ones (1, 50); 262s censor([2, 4, 6, 8, 12, 14]) = 0; 262s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 262s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 262s assert (nlogL, 1091.746371145497, 1e-12); 262s assert (avar, avar_out, 1e-6); 262s ***** test 262s x = 1:50; 262s censor = ones (1, 50); 262s censor([2, 4, 6, 8, 12, 14]) = 0; 262s [nlogL, avar] = lognlike ([0, 1], x, censor); 262s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 262s assert (nlogL, 349.3969104144271, 1e-12); 262s assert (avar, avar_out, 1e-6); 262s ***** error ... 262s lognlike ([12, 15]); 262s ***** error lognlike ([12, 15], ones (2)); 262s ***** error ... 262s lognlike ([12, 15, 3], [1:50]); 262s ***** error ... 262s lognlike ([12, 15], [1:50], [1, 2, 3]); 262s ***** error ... 262s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 262s 10 tests, 10 passed, 0 known failure, 0 skipped 262s [inst/dist_fit/gumbellike.m] 262s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gumbellike.m 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 262s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 262s assert (nlogL, 3.242264755689906e+17, 1e-14); 262s assert (avar, avar_out, 1e-3); 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 262s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 262s assert (nlogL, 481898704.0472211, 1e-6); 262s assert (avar, avar_out, 1e-3); 262s ***** test 262s x = 1:50; 262s [nlogL, avar] = gumbellike ([21, 15], x); 262s avar_out = [11.73913876598908, -5.9546128523121216; ... 262s -5.954612852312121, 3.708060045170236]; 262s assert (nlogL, 223.7612479380652, 1e-13); 262s assert (avar, avar_out, 1e-14); 262s ***** error gumbellike ([12, 15]); 262s ***** error gumbellike ([12, 15, 3], [1:50]); 262s ***** error gumbellike ([12, 3], ones (10, 2)); 262s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 262s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 262s 8 tests, 8 passed, 0 known failure, 0 skipped 262s [inst/dist_fit/burrfit.m] 262s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/burrfit.m 262s ***** demo 262s ## Sample 3 populations from different Burr type XII distibutions 262s rand ("seed", 4); # for reproducibility 262s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 262s rand ("seed", 2); # for reproducibility 262s r2 = burrrnd (1, 3, 1, 10000, 1); 262s rand ("seed", 9); # for reproducibility 262s r3 = burrrnd (0.5, 2, 3, 10000, 1); 262s r = [r1, r2, r3]; 262s 262s ## Plot them normalized and fix their colors 262s hist (r, [0.1:0.2:20], [18, 5, 3]); 262s h = findobj (gca, "Type", "patch"); 262s set (h(1), "facecolor", "c"); 262s set (h(2), "facecolor", "g"); 262s set (h(3), "facecolor", "r"); 262s ylim ([0, 3]); 262s xlim ([0, 5]); 262s hold on 262s 262s ## Estimate their α and β parameters 262s lambda_c_kA = burrfit (r(:,1)); 262s lambda_c_kB = burrfit (r(:,2)); 262s lambda_c_kC = burrfit (r(:,3)); 262s 262s ## Plot their estimated PDFs 262s x = [0.01:0.15:15]; 262s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 262s plot (x, y, "-pr"); 262s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 262s plot (x, y, "-sg"); 262s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 262s plot (x, y, "-^c"); 262s hold off 262s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 262s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 262s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 262s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 262s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 262s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 262s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 262s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 262s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 262s title ("Three population samples from different Burr type XII distibutions") 262s hold off 262s ***** test 262s l = 1; c = 2; k = 3; 262s r = burrrnd (l, c, k, 100000, 1); 262s lambda_c_kA = burrfit (r); 262s assert (lambda_c_kA(1), l, 0.2); 262s assert (lambda_c_kA(2), c, 0.2); 262s assert (lambda_c_kA(3), k, 0.3); 264s ***** test 264s l = 0.5; c = 1; k = 3; 264s r = burrrnd (l, c, k, 100000, 1); 264s lambda_c_kA = burrfit (r); 264s assert (lambda_c_kA(1), l, 0.2); 264s assert (lambda_c_kA(2), c, 0.2); 264s assert (lambda_c_kA(3), k, 0.3); 266s ***** test 266s l = 1; c = 3; k = 1; 266s r = burrrnd (l, c, k, 100000, 1); 266s lambda_c_kA = burrfit (r); 266s assert (lambda_c_kA(1), l, 0.2); 266s assert (lambda_c_kA(2), c, 0.2); 266s assert (lambda_c_kA(3), k, 0.3); 268s ***** test 268s l = 3; c = 2; k = 1; 268s r = burrrnd (l, c, k, 100000, 1); 268s lambda_c_kA = burrfit (r); 268s assert (lambda_c_kA(1), l, 0.2); 268s assert (lambda_c_kA(2), c, 0.2); 268s assert (lambda_c_kA(3), k, 0.3); 270s ***** test 270s l = 4; c = 2; k = 4; 270s r = burrrnd (l, c, k, 100000, 1); 270s lambda_c_kA = burrfit (r); 270s assert (lambda_c_kA(1), l, 0.2); 270s assert (lambda_c_kA(2), c, 0.2); 270s assert (lambda_c_kA(3), k, 0.3); 271s ***** error burrfit (ones (2,5)); 271s ***** error burrfit ([-1 2 3 4]); 271s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 271s ***** error burrfit ([1, 2, 3, 4, 5], 0); 272s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 272s ***** error ... 272s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 272s ***** error ... 272s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 272s ***** error 272s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 272s ***** error 272s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 272s ***** error ... 272s burrfit ([1:10], 0.05, [], [], 5) 272s 15 tests, 15 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/gamlike.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gamlike.m 272s ***** test 272s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 272s assert (nlogL, 19.4426, 1e-4); 272s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 272s ***** test 272s [nlogL, acov] = gamlike([2, 3], [5:45]); 272s assert (nlogL, 305.8070, 1e-4); 272s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 272s ***** test 272s [nlogL, acov] = gamlike([2, 13], [5:45]); 272s assert (nlogL, 163.2261, 1e-4); 272s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 272s ***** error ... 272s gamlike ([12, 15]) 272s ***** error gamlike ([12, 15, 3], [1:50]) 272s ***** error gamlike ([12, 3], ones (10, 2)) 272s ***** error ... 272s gamlike ([12, 15], [1:50], [1, 2, 3]) 272s ***** error ... 272s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 272s 8 tests, 8 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/evlike.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/evlike.m 272s ***** test 272s x = 1:50; 272s [nlogL, acov] = evlike ([2.3, 1.2], x); 272s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 272s assert (nlogL, 3.242264755689906e+17, 1e-14); 272s assert (acov, avar_out, 1e-3); 272s ***** test 272s x = 1:50; 272s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 272s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 272s assert (nlogL, 481898704.0472211, 1e-6); 272s assert (acov, avar_out, 1e-3); 272s ***** test 272s x = 1:50; 272s [nlogL, acov] = evlike ([21, 15], x); 272s avar_out = [11.73913876598908, -5.9546128523121216; ... 272s -5.954612852312121, 3.708060045170236]; 272s assert (nlogL, 223.7612479380652, 1e-13); 272s assert (acov, avar_out, 1e-14); 272s ***** error evlike ([12, 15]) 272s ***** error evlike ([12, 15, 3], [1:50]) 272s ***** error evlike ([12, 3], ones (10, 2)) 272s ***** error ... 272s evlike ([12, 15], [1:50], [1, 2, 3]) 272s ***** error ... 272s evlike ([12, 15], [1:50], [], [1, 2, 3]) 272s 8 tests, 8 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/unifit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/unifit.m 272s ***** demo 272s ## Sample 2 populations from different continuous uniform distibutions 272s rand ("seed", 5); # for reproducibility 272s r1 = unifrnd (2, 5, 2000, 1); 272s rand ("seed", 6); # for reproducibility 272s r2 = unifrnd (3, 9, 2000, 1); 272s r = [r1, r2]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, 0:0.5:10, 2); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s hold on 272s 272s ## Estimate their probability of success 272s a_bA = unifit (r(:,1)); 272s a_bB = unifit (r(:,2)); 272s 272s ## Plot their estimated PDFs 272s x = [0:10]; 272s y = unifpdf (x, a_bA(1), a_bA(2)); 272s plot (x, y, "-pg"); 272s y = unifpdf (x, a_bB(1), a_bB(2)); 272s plot (x, y, "-sc"); 272s xlim ([1, 10]) 272s ylim ([0, 0.5]) 272s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 272s "Normalized HIST of sample 2 with a=3 and b=9", ... 272s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 272s a_bA(1), a_bA(2)), ... 272s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 272s a_bB(1), a_bB(2))}) 272s title ("Two population samples from different continuous uniform distibutions") 272s hold off 272s ***** test 272s x = 0:5; 272s [paramhat, paramci] = unifit (x); 272s assert (paramhat, [0, 5]); 272s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 272s ***** test 272s x = 0:5; 272s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 272s assert (paramhat, [0, 5]); 272s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 272s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 272s ***** error unifit () 272s ***** error unifit (-1, [1 2 3 3]) 272s ***** error unifit (1, 0) 272s ***** error unifit (1, 1.2) 272s ***** error unifit (1, [0.02 0.05]) 272s ***** error ... 272s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 272s ***** error ... 272s unifit ([1.5, 0.2], [], [1, -1]) 272s ***** error ... 272s unifit ([1.5, 0.2], [], [1, 1, 1]) 272s 11 tests, 11 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/rayllike.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/rayllike.m 272s ***** test 272s x = [1 3 2 4 5 4 3 4]; 272s [nlogL, acov] = rayllike (3.25, x); 272s assert (nlogL, 14.7442, 1e-4) 272s ***** test 272s x = [1 2 3 4 5]; 272s f = [1 1 2 3 1]; 272s [nlogL, acov] = rayllike (3.25, x, [], f); 272s assert (nlogL, 14.7442, 1e-4) 272s ***** test 272s x = [1 2 3 4 5 6]; 272s f = [1 1 2 3 1 0]; 272s [nlogL, acov] = rayllike (3.25, x, [], f); 272s assert (nlogL, 14.7442, 1e-4) 272s ***** test 272s x = [1 2 3 4 5 6]; 272s c = [0 0 0 0 0 1]; 272s f = [1 1 2 3 1 0]; 272s [nlogL, acov] = rayllike (3.25, x, c, f); 272s assert (nlogL, 14.7442, 1e-4) 272s ***** error rayllike (1) 272s ***** error rayllike ([1 2 3], [1 2]) 272s ***** error ... 272s rayllike (3.25, ones (10, 2)) 272s ***** error ... 272s rayllike (3.25, [1 2 3 -4 5]) 272s ***** error ... 272s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 272s ***** error ... 272s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 272s ***** error ... 272s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 272s ***** error ... 272s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 272s ***** error ... 272s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 272s 13 tests, 13 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/expfit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/expfit.m 272s ***** demo 272s ## Sample 3 populations from 3 different exponential distibutions 272s rande ("seed", 1); # for reproducibility 272s r1 = exprnd (2, 4000, 1); 272s rande ("seed", 2); # for reproducibility 272s r2 = exprnd (5, 4000, 1); 272s rande ("seed", 3); # for reproducibility 272s r3 = exprnd (12, 4000, 1); 272s r = [r1, r2, r3]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, 48, 0.52); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s set (h(3), "facecolor", "r"); 272s hold on 272s 272s ## Estimate their mu parameter 272s muhat = expfit (r); 272s 272s ## Plot their estimated PDFs 272s x = [0:max(r(:))]; 272s y = exppdf (x, muhat(1)); 272s plot (x, y, "-pr"); 272s y = exppdf (x, muhat(2)); 272s plot (x, y, "-sg"); 272s y = exppdf (x, muhat(3)); 272s plot (x, y, "-^c"); 272s ylim ([0, 0.6]) 272s xlim ([0, 40]) 272s legend ({"Normalized HIST of sample 1 with μ=2", ... 272s "Normalized HIST of sample 2 with μ=5", ... 272s "Normalized HIST of sample 3 with μ=12", ... 272s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 272s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 272s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 272s title ("Three population samples from different exponential distibutions") 272s hold off 272s ***** assert (expfit (1), 1) 272s ***** assert (expfit (1:3), 2) 272s ***** assert (expfit ([1:3]'), 2) 272s ***** assert (expfit (1:3, []), 2) 272s ***** assert (expfit (1:3, [], [], []), 2) 272s ***** assert (expfit (magic (3)), [5 5 5]) 272s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 272s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 272s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 272s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 272s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 272s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 272s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 272s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 272s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 272s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 272s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 272s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 272s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 272s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 272s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 272s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 272s [1.75 4.75 7.75]) 272s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 272s [1.75 4.75 7.75]) 272s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 272s [3.5 19/3 31/3]) 272s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 272s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 272s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 272s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 272s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 272s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 272s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 272s 1000*eps) 272s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 272s [0.953017262058213; 7.337731146400207], 1000*eps) 272s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 272s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 272s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 272s 1000*eps) 272s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 272s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 272s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 272s 1000*eps) 272s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 272s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 272s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 272s 1000*eps) 272s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 272s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 272s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 272s 1000*eps) 272s ***** test 272s x = reshape (1:8, [4 2]); 272s x(4) = NaN; 272s [muhat,muci] = expfit (x); 272s assert ({muhat, muci}, {[NaN, 6.5], ... 272s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 272s ***** test 272s x = magic (3); 272s censor = [0 1 0; 0 1 0; 0 1 0]; 272s freq = [1 1 0; 1 1 0; 1 1 0]; 272s [muhat,muci] = expfit (x, [], censor, freq); 272s assert ({muhat, muci}, {[5 NaN NaN], ... 272s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 272s ***** error expfit () 272s ***** error expfit (1,2,3,4,5) 272s ***** error [a b censor] = expfit (1) 272s ***** error expfit (1, [1 2]) 272s ***** error expfit ([-1 2 3 4 5]) 272s ***** error expfit ([1:5], [], "test") 272s ***** error expfit ([1:5], [], [], "test") 272s ***** error expfit ([1:5], [], [0 0 0 0]) 272s ***** error expfit ([1:5], [], [], [1 1 1 1]) 272s 47 tests, 47 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/betafit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/betafit.m 272s ***** demo 272s ## Sample 2 populations from different Beta distibutions 272s randg ("seed", 1); # for reproducibility 272s r1 = betarnd (2, 5, 500, 1); 272s randg ("seed", 2); # for reproducibility 272s r2 = betarnd (2, 2, 500, 1); 272s r = [r1, r2]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, 12, 15); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s hold on 272s 272s ## Estimate their shape parameters 272s a_b_A = betafit (r(:,1)); 272s a_b_B = betafit (r(:,2)); 272s 272s ## Plot their estimated PDFs 272s x = [min(r(:)):0.01:max(r(:))]; 272s y = betapdf (x, a_b_A(1), a_b_A(2)); 272s plot (x, y, "-pr"); 272s y = betapdf (x, a_b_B(1), a_b_B(2)); 272s plot (x, y, "-sg"); 272s ylim ([0, 4]) 272s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 272s "Normalized HIST of sample 2 with α=2 and β=2", ... 272s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 272s a_b_A(1), a_b_A(2)), ... 272s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 272s a_b_B(1), a_b_B(2))}) 272s title ("Two population samples from different Beta distibutions") 272s hold off 272s ***** test 272s x = 0.01:0.02:0.99; 272s [paramhat, paramci] = betafit (x); 272s paramhat_out = [1.0199, 1.0199]; 272s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 272s assert (paramhat, paramhat_out, 1e-4); 272s assert (paramci, paramci_out, 1e-4); 272s ***** test 272s x = 0.01:0.02:0.99; 272s [paramhat, paramci] = betafit (x, 0.01); 272s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 272s assert (paramci, paramci_out, 1e-4); 272s ***** test 272s x = 0.00:0.02:1; 272s [paramhat, paramci] = betafit (x); 272s paramhat_out = [0.0875, 0.1913]; 272s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 272s assert (paramhat, paramhat_out, 1e-4); 272s assert (paramci, paramci_out, 1e-4); 272s ***** error betafit ([0.2, 0.5+i]); 272s ***** error betafit (ones (2,2) * 0.5); 272s ***** error betafit ([0.5, 1.2]); 272s ***** error betafit ([0.1, 0.1]); 272s ***** error betafit ([0.01:0.1:0.99], 1.2); 272s ***** error ... 272s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 272s ***** error ... 272s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 272s ***** error ... 272s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 272s ***** error ... 272s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 272s ***** error ... 272s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 272s 13 tests, 13 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/poisslike.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/poisslike.m 272s ***** test 272s x = [1 3 2 4 5 4 3 4]; 272s [nlogL, avar] = poisslike (3.25, x); 272s assert (nlogL, 13.9533, 1e-4) 272s ***** test 272s x = [1 2 3 4 5]; 272s f = [1 1 2 3 1]; 272s [nlogL, avar] = poisslike (3.25, x, f); 272s assert (nlogL, 13.9533, 1e-4) 272s ***** error poisslike (1) 272s ***** error poisslike ([1 2 3], [1 2]) 272s ***** error ... 272s poisslike (3.25, ones (10, 2)) 272s ***** error ... 272s poisslike (3.25, [1 2 3 -4 5]) 272s ***** error ... 272s poisslike (3.25, ones (10, 1), ones (8,1)) 272s ***** error ... 272s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 272s 8 tests, 8 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/geofit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/geofit.m 272s ***** demo 272s ## Sample 2 populations from different geometric distibutions 272s rande ("seed", 1); # for reproducibility 272s r1 = geornd (0.15, 1000, 1); 272s rande ("seed", 2); # for reproducibility 272s r2 = geornd (0.5, 1000, 1); 272s r = [r1, r2]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, 0:0.5:20.5, 1); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s hold on 272s 272s ## Estimate their probability of success 272s pshatA = geofit (r(:,1)); 272s pshatB = geofit (r(:,2)); 272s 272s ## Plot their estimated PDFs 272s x = [0:15]; 272s y = geopdf (x, pshatA); 272s plot (x, y, "-pg"); 272s y = geopdf (x, pshatB); 272s plot (x, y, "-sc"); 272s xlim ([0, 15]) 272s ylim ([0, 0.6]) 272s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 272s "Normalized HIST of sample 2 with ps=0.50", ... 272s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 272s mean (pshatA)), ... 272s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 272s mean (pshatB))}) 272s title ("Two population samples from different geometric distibutions") 272s hold off 272s ***** test 272s x = 0:5; 272s [pshat, psci] = geofit (x); 272s assert (pshat, 0.2857, 1e-4); 272s assert (psci, [0.092499; 0.478929], 1e-5); 272s ***** test 272s x = 0:5; 272s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 272s assert (pshat, 0.2857, 1e-4); 272s assert (psci, [0.092499; 0.478929], 1e-5); 272s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 272s ***** error geofit () 272s ***** error geofit (-1, [1 2 3 3]) 272s ***** error geofit (1, 0) 272s ***** error geofit (1, 1.2) 272s ***** error geofit (1, [0.02 0.05]) 272s ***** error ... 272s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 272s ***** error ... 272s geofit ([1.5, 0.2], [], [1, 1, 1]) 272s 10 tests, 10 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/tlsfit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/tlsfit.m 272s ***** demo 272s ## Sample 3 populations from 3 different location-scale T distibutions 272s randn ("seed", 1); # for reproducibility 272s randg ("seed", 2); # for reproducibility 272s r1 = tlsrnd (-4, 3, 1, 2000, 1); 272s randn ("seed", 3); # for reproducibility 272s randg ("seed", 4); # for reproducibility 272s r2 = tlsrnd (0, 3, 1, 2000, 1); 272s randn ("seed", 5); # for reproducibility 272s randg ("seed", 6); # for reproducibility 272s r3 = tlsrnd (5, 5, 4, 2000, 1); 272s r = [r1, r2, r3]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, [-21:21], [1, 1, 1]); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s set (h(3), "facecolor", "r"); 272s ylim ([0, 0.25]); 272s xlim ([-20, 20]); 272s hold on 272s 272s ## Estimate their lambda parameter 272s mu_sigma_nuA = tlsfit (r(:,1)); 272s mu_sigma_nuB = tlsfit (r(:,2)); 272s mu_sigma_nuC = tlsfit (r(:,3)); 272s 272s ## Plot their estimated PDFs 272s x = [-20:0.1:20]; 272s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 272s plot (x, y, "-pr"); 272s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 272s plot (x, y, "-sg"); 272s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 272s plot (x, y, "-^c"); 272s hold off 272s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 272s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 272s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 272s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 272s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 272s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 272s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 272s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 272s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 272s title ("Three population samples from different location-scale T distibutions") 272s hold off 272s ***** test 272s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 272s [paramhat, paramci] = tlsfit (x); 272s paramhat_out = [0.035893, 0.862711, 0.649261]; 272s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 272s assert (paramhat, paramhat_out, 1e-6); 272s assert (paramci, paramci_out, 1e-5); 272s ***** test 272s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 272s [paramhat, paramci] = tlsfit (x, 0.01); 272s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 272s assert (paramci, paramci_out, 1e-4); 272s ***** error tlsfit (ones (2,5)); 272s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 272s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 272s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 272s ***** error ... 272s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 272s 12 tests, 12 passed, 0 known failure, 0 skipped 272s [inst/dist_fit/bisafit.m] 272s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/bisafit.m 272s ***** demo 272s ## Sample 3 populations from different Birnbaum-Saunders distibutions 272s rand ("seed", 5); # for reproducibility 272s r1 = bisarnd (1, 0.5, 2000, 1); 272s rand ("seed", 2); # for reproducibility 272s r2 = bisarnd (2, 0.3, 2000, 1); 272s rand ("seed", 7); # for reproducibility 272s r3 = bisarnd (4, 0.5, 2000, 1); 272s r = [r1, r2, r3]; 272s 272s ## Plot them normalized and fix their colors 272s hist (r, 80, 4.2); 272s h = findobj (gca, "Type", "patch"); 272s set (h(1), "facecolor", "c"); 272s set (h(2), "facecolor", "g"); 272s set (h(3), "facecolor", "r"); 272s ylim ([0, 1.1]); 272s xlim ([0, 8]); 272s hold on 272s 272s ## Estimate their α and β parameters 272s beta_gammaA = bisafit (r(:,1)); 272s beta_gammaB = bisafit (r(:,2)); 272s beta_gammaC = bisafit (r(:,3)); 272s 272s ## Plot their estimated PDFs 272s x = [0:0.1:8]; 272s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 272s plot (x, y, "-pr"); 272s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 272s plot (x, y, "-sg"); 272s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 272s plot (x, y, "-^c"); 272s hold off 272s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 272s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 272s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 272s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 272s beta_gammaA(1), beta_gammaA(2)), ... 272s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 272s beta_gammaB(1), beta_gammaB(2)), ... 272s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 272s beta_gammaC(1), beta_gammaC(2))}) 272s title ("Three population samples from different Birnbaum-Saunders distibutions") 272s hold off 272s ***** test 272s paramhat = bisafit ([1:50]); 272s paramhat_out = [16.2649, 1.0156]; 272s assert (paramhat, paramhat_out, 1e-4); 273s ***** test 273s paramhat = bisafit ([1:5]); 273s paramhat_out = [2.5585, 0.5839]; 273s assert (paramhat, paramhat_out, 1e-4); 273s ***** error bisafit (ones (2,5)); 273s ***** error bisafit ([-1 2 3 4]); 273s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 273s ***** error bisafit ([1, 2, 3, 4, 5], 0); 273s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 273s ***** error ... 273s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 273s ***** error ... 273s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 273s ***** error ... 273s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 273s ***** error ... 273s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 273s ***** error ... 273s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 273s 12 tests, 12 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/betalike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/betalike.m 273s ***** test 273s x = 0.01:0.02:0.99; 273s [nlogL, avar] = betalike ([2.3, 1.2], x); 273s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 273s assert (nlogL, 17.873477715879040, 3e-14); 273s assert (avar, avar_out, 1e-7); 273s ***** test 273s x = 0.01:0.02:0.99; 273s [nlogL, avar] = betalike ([1, 4], x); 273s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 273s assert (nlogL, 79.648061114839550, 1e-13); 273s assert (avar, avar_out, 1e-7); 273s ***** test 273s x = 0.00:0.02:1; 273s [nlogL, avar] = betalike ([1, 4], x); 273s avar_out = [0.00000801564765, 0.00000131397245; ... 273s 0.00000131397245, 0.00070827639442]; 273s assert (nlogL, 573.2008434477486, 1e-10); 273s assert (avar, avar_out, 1e-14); 273s ***** error ... 273s betalike ([12, 15]); 273s ***** error betalike ([12, 15, 3], [1:50]); 273s ***** error ... 273s betalike ([12, 15], ones (10, 1), ones (8,1)) 273s ***** error ... 273s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 273s ***** error ... 273s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 273s 8 tests, 8 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/normlike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/normlike.m 273s ***** error normlike ([12, 15]); 273s ***** error normlike ([12, 15], ones (2)); 273s ***** error ... 273s normlike ([12, 15, 3], [1:50]); 273s ***** error ... 273s normlike ([12, 15], [1:50], [1, 2, 3]); 273s ***** error ... 273s normlike ([12, 15], [1:50], [], [1, 2, 3]); 273s ***** error ... 273s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 273s ***** test 273s x = 1:50; 273s [nlogL, avar] = normlike ([2.3, 1.2], x); 273s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 273s assert (nlogL, 13014.95883783327, 1e-10); 273s assert (avar, avar_out, 1e-4); 273s ***** test 273s x = 1:50; 273s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 273s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 273s assert (nlogL, 2854.802587833265, 1e-10); 273s assert (avar, avar_out, 1e-4); 273s ***** test 273s x = 1:50; 273s [nlogL, avar] = normlike ([21, 15], x); 273s avar_out = [5.460474308300396, -1.600790513833993; ... 273s -1.600790513833993, 2.667984189723321]; 273s assert (nlogL, 206.738325604233, 1e-12); 273s assert (avar, avar_out, 1e-14); 273s ***** test 273s x = 1:50; 273s censor = ones (1, 50); 273s censor([2, 4, 6, 8, 12, 14]) = 0; 273s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 273s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 273s assert (nlogL, Inf); 273s assert (avar, [NaN, NaN; NaN, NaN]); 273s ***** test 273s x = 1:50; 273s censor = ones (1, 50); 273s censor([2, 4, 6, 8, 12, 14]) = 0; 273s [nlogL, avar] = normlike ([21, 15], x, censor); 273s avar_out = [24.4824488866131, -10.6649544179636; ... 273s -10.6649544179636, 6.22827849965737]; 273s assert (nlogL, 86.9254371829733, 1e-12); 273s assert (avar, avar_out, 8e-14); 273s 11 tests, 11 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/ricefit.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/ricefit.m 273s ***** demo 273s ## Sample 3 populations from different Gamma distibutions 273s randg ("seed", 5); # for reproducibility 273s randp ("seed", 6); 273s r1 = ricernd (1, 2, 3000, 1); 273s randg ("seed", 2); # for reproducibility 273s randp ("seed", 8); 273s r2 = ricernd (2, 4, 3000, 1); 273s randg ("seed", 7); # for reproducibility 273s randp ("seed", 9); 273s r3 = ricernd (7.5, 1, 3000, 1); 273s r = [r1, r2, r3]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, 75, 4); 273s h = findobj (gca, "Type", "patch"); 273s set (h(1), "facecolor", "c"); 273s set (h(2), "facecolor", "g"); 273s set (h(3), "facecolor", "r"); 273s ylim ([0, 0.7]); 273s xlim ([0, 12]); 273s hold on 273s 273s ## Estimate their α and β parameters 273s s_sigmaA = ricefit (r(:,1)); 273s s_sigmaB = ricefit (r(:,2)); 273s s_sigmaC = ricefit (r(:,3)); 273s 273s ## Plot their estimated PDFs 273s x = [0.01,0.1:0.2:18]; 273s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 273s plot (x, y, "-pr"); 273s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 273s plot (x, y, "-sg"); 273s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 273s plot (x, y, "-^c"); 273s hold off 273s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 273s "Normalized HIST of sample 2 with s=2 and σ=4", ... 273s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 273s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 273s s_sigmaA(1), s_sigmaA(2)), ... 273s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 273s s_sigmaB(1), s_sigmaB(2)), ... 273s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 273s s_sigmaC(1), s_sigmaC(2))}) 273s title ("Three population samples from different Rician distibutions") 273s hold off 273s ***** test 273s [paramhat, paramci] = ricefit ([1:50]); 273s assert (paramhat, [15.3057, 17.6668], 1e-4); 273s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 273s ***** test 273s [paramhat, paramci] = ricefit ([1:50], 0.01); 273s assert (paramhat, [15.3057, 17.6668], 1e-4); 273s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 273s ***** test 273s [paramhat, paramci] = ricefit ([1:5]); 273s assert (paramhat, [2.3123, 1.6812], 1e-4); 273s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 273s ***** test 273s [paramhat, paramci] = ricefit ([1:5], 0.01); 273s assert (paramhat, [2.3123, 1.6812], 1e-4); 273s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 273s ***** test 273s freq = [1 1 1 1 5]; 273s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 273s assert (paramhat, [3.5181, 1.5565], 1e-4); 273s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 273s ***** test 273s censor = [1 0 0 0 0]; 273s [paramhat, paramci] = ricefit ([1:5], [], censor); 273s assert (paramhat, [3.2978, 1.1527], 1e-4); 273s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 273s ***** assert (class (ricefit (single ([1:50]))), "single") 273s ***** error ricefit (ones (2)) 273s ***** error ricefit ([1:50], 1) 273s ***** error ricefit ([1:50], -1) 273s ***** error ricefit ([1:50], {0.05}) 273s ***** error ricefit ([1:50], "k") 273s ***** error ricefit ([1:50], i) 273s ***** error ricefit ([1:50], [0.01 0.02]) 273s ***** error ricefit ([1:50], [], [1 1]) 273s ***** error ricefit ([1:50], [], [], [1 1]) 273s ***** error ... 273s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 273s ***** error ricefit ([1 2 3 -4]) 273s ***** error ricefit ([1 2 0], [], [1 0 0]) 273s 19 tests, 19 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/logilike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/logilike.m 273s ***** test 273s nlogL = logilike ([25.5, 8.7725], [1:50]); 273s assert (nlogL, 206.6769, 1e-4); 273s ***** test 273s nlogL = logilike ([3, 0.8645], [1:5]); 273s assert (nlogL, 9.0699, 1e-4); 273s ***** error logilike (3.25) 273s ***** error logilike ([5, 0.2], ones (2)) 273s ***** error ... 273s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 273s ***** error ... 273s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 273s ***** error ... 273s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 273s ***** error ... 273s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 273s 8 tests, 8 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/invglike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/invglike.m 273s ***** test 273s nlogL = invglike ([25.5, 19.6973], [1:50]); 273s assert (nlogL, 219.1516, 1e-4); 273s ***** test 273s nlogL = invglike ([3, 8.1081], [1:5]); 273s assert (nlogL, 9.0438, 1e-4); 273s ***** error invglike (3.25) 273s ***** error invglike ([5, 0.2], ones (2)) 273s ***** error invglike ([5, 0.2], [-1, 3]) 273s ***** error ... 273s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 273s ***** error ... 273s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 273s ***** error ... 273s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 273s ***** error ... 273s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 273s 9 tests, 9 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/tlslike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/tlslike.m 273s ***** test 273s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 273s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 273s acov_out = [0.2525, 0.0670, 0.0288; ... 273s 0.0670, 0.5724, 0.1786; ... 273s 0.0288, 0.1786, 0.1789]; 273s assert (nlogL, 17.9979636579, 1e-10); 273s assert (acov, acov_out, 1e-4); 273s ***** error tlslike ([12, 15, 1]); 273s ***** error tlslike ([12, 15], [1:50]); 273s ***** error tlslike ([12, 3, 1], ones (10, 2)); 273s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 273s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 273s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 273s 7 tests, 7 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/explike.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/explike.m 273s ***** test 273s x = 12; 273s beta = 5; 273s [L, V] = explike (beta, x); 273s expected_L = 4.0094; 273s expected_V = 6.5789; 273s assert (L, expected_L, 0.001); 273s assert (V, expected_V, 0.001); 273s ***** test 273s x = 1:5; 273s beta = 2; 273s [L, V] = explike (beta, x); 273s expected_L = 10.9657; 273s expected_V = 0.4; 273s assert (L, expected_L, 0.001); 273s assert (V, expected_V, 0.001); 273s ***** error explike () 273s ***** error explike (2) 273s ***** error explike ([12, 3], [1:50]) 273s ***** error explike (3, ones (10, 2)) 273s ***** error ... 273s explike (3, [1:50], [1, 2, 3]) 273s ***** error ... 273s explike (3, [1:50], [], [1, 2, 3]) 273s 8 tests, 8 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/nbinfit.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/nbinfit.m 273s ***** demo 273s ## Sample 2 populations from different negative binomial distibutions 273s randp ("seed", 5); randg ("seed", 5); # for reproducibility 273s r1 = nbinrnd (2, 0.15, 5000, 1); 273s randp ("seed", 8); randg ("seed", 8); # for reproducibility 273s r2 = nbinrnd (5, 0.2, 5000, 1); 273s r = [r1, r2]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, [0:51], 1); 273s h = findobj (gca, "Type", "patch"); 273s set (h(1), "facecolor", "c"); 273s set (h(2), "facecolor", "g"); 273s hold on 273s 273s ## Estimate their probability of success 273s r_psA = nbinfit (r(:,1)); 273s r_psB = nbinfit (r(:,2)); 273s 273s ## Plot their estimated PDFs 273s x = [0:40]; 273s y = nbinpdf (x, r_psA(1), r_psA(2)); 273s plot (x, y, "-pg"); 273s x = [min(r(:,2)):max(r(:,2))]; 273s y = nbinpdf (x, r_psB(1), r_psB(2)); 273s plot (x, y, "-sc"); 273s ylim ([0, 0.1]) 273s xlim ([0, 50]) 273s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 273s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 273s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 273s r_psA(1), r_psA(2)), ... 273s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 273s r_psB(1), r_psB(2))}) 273s title ("Two population samples from negative different binomial distibutions") 273s hold off 273s ***** test 273s [paramhat, paramci] = nbinfit ([1:50]); 273s assert (paramhat, [2.420857, 0.086704], 1e-6); 273s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 273s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 273s ***** test 273s [paramhat, paramci] = nbinfit ([1:20]); 273s assert (paramhat, [3.588233, 0.254697], 1e-6); 273s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 273s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 273s ***** test 273s [paramhat, paramci] = nbinfit ([1:10]); 273s assert (paramhat, [8.8067, 0.6156], 1e-4); 273s assert (paramci(:,1), [0; 30.7068], 1e-4); 273s assert (paramci(:,2), [0.0217; 1], 1e-4); 273s ***** test 273s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 273s assert (paramhat, [8.8067, 0.6156], 1e-4); 273s assert (paramci(:,1), [0; 30.7068], 1e-4); 273s assert (paramci(:,2), [0.0217; 1], 1e-4); 273s ***** test 273s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 273s assert (paramhat, [8.8067, 0.6156], 1e-4); 273s assert (paramci(:,1), [0; 30.7068], 1e-4); 273s assert (paramci(:,2), [0.0217; 1], 1e-4); 273s ***** error nbinfit ([-1 2 3 3]) 273s ***** error nbinfit (ones (2)) 273s ***** error nbinfit ([1 2 1.2 3]) 273s ***** error nbinfit ([1 2 3], 0) 273s ***** error nbinfit ([1 2 3], 1.2) 273s ***** error nbinfit ([1 2 3], [0.02 0.05]) 273s ***** error ... 273s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 273s ***** error ... 273s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 273s ***** error ... 273s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 273s ***** error ... 273s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 273s ***** error ... 273s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 273s 16 tests, 16 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/logifit.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/logifit.m 273s ***** demo 273s ## Sample 3 populations from different logistic distibutions 273s rand ("seed", 5) # for reproducibility 273s r1 = logirnd (2, 1, 2000, 1); 273s rand ("seed", 2) # for reproducibility 273s r2 = logirnd (5, 2, 2000, 1); 273s rand ("seed", 7) # for reproducibility 273s r3 = logirnd (9, 4, 2000, 1); 273s r = [r1, r2, r3]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, [-6:20], 1); 273s h = findobj (gca, "Type", "patch"); 273s set (h(1), "facecolor", "c"); 273s set (h(2), "facecolor", "g"); 273s set (h(3), "facecolor", "r"); 273s ylim ([0, 0.3]); 273s xlim ([-5, 20]); 273s hold on 273s 273s ## Estimate their MU and LAMBDA parameters 273s mu_sA = logifit (r(:,1)); 273s mu_sB = logifit (r(:,2)); 273s mu_sC = logifit (r(:,3)); 273s 273s ## Plot their estimated PDFs 273s x = [-5:0.5:20]; 273s y = logipdf (x, mu_sA(1), mu_sA(2)); 273s plot (x, y, "-pr"); 273s y = logipdf (x, mu_sB(1), mu_sB(2)); 273s plot (x, y, "-sg"); 273s y = logipdf (x, mu_sC(1), mu_sC(2)); 273s plot (x, y, "-^c"); 273s hold off 273s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 273s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 273s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 273s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 273s mu_sA(1), mu_sA(2)), ... 273s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 273s mu_sB(1), mu_sB(2)), ... 273s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 273s mu_sC(1), mu_sC(2))}) 273s title ("Three population samples from different logistic distibutions") 273s hold off 273s ***** test 273s paramhat = logifit ([1:50]); 273s paramhat_out = [25.5, 8.7724]; 273s assert (paramhat, paramhat_out, 1e-4); 273s ***** test 273s paramhat = logifit ([1:5]); 273s paramhat_out = [3, 0.8645]; 273s assert (paramhat, paramhat_out, 1e-4); 273s ***** test 273s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 273s paramhat_out = [3, 0.8645]; 273s assert (paramhat, paramhat_out, 1e-4); 273s ***** test 273s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 273s paramhat_out = logifit ([1:5, 5]); 273s assert (paramhat, paramhat_out, 1e-4); 273s ***** error logifit (ones (2,5)); 273s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 273s ***** error logifit ([1, 2, 3, 4, 5], 0); 273s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 273s ***** error ... 273s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 273s ***** error ... 273s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 273s ***** error ... 273s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 273s ***** error ... 273s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 273s ***** error ... 273s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 273s 13 tests, 13 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/gevfit.m] 273s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gevfit.m 273s ***** demo 273s ## Sample 2 populations from 2 different exponential distibutions 273s rand ("seed", 1); # for reproducibility 273s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 273s rand ("seed", 2); # for reproducibility 273s r2 = gevrnd (0, 1, -4, 5000, 1); 273s r = [r1, r2]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, 50, 5); 273s h = findobj (gca, "Type", "patch"); 273s set (h(1), "facecolor", "c"); 273s set (h(2), "facecolor", "g"); 273s hold on 273s 273s ## Estimate their k, sigma, and mu parameters 273s k_sigma_muA = gevfit (r(:,1)); 273s k_sigma_muB = gevfit (r(:,2)); 273s 273s ## Plot their estimated PDFs 273s x = [-10:0.5:20]; 273s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 273s plot (x, y, "-pr"); 273s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 273s plot (x, y, "-sg"); 273s ylim ([0, 0.7]) 273s xlim ([-7, 5]) 273s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 273s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 273s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 273s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 273s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 273s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 273s title ("Two population samples from different exponential distibutions") 273s hold off 273s ***** test 273s x = 1:50; 273s [pfit, pci] = gevfit (x); 273s pfit_out = [-0.4407, 15.1923, 21.5309]; 273s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 273s assert (pfit, pfit_out, 1e-3); 273s assert (pci, pci_out, 1e-3); 274s ***** test 274s x = 1:2:50; 274s [pfit, pci] = gevfit (x); 274s pfit_out = [-0.4434, 15.2024, 21.0532]; 274s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 274s assert (pfit, pfit_out, 1e-3); 274s assert (pci, pci_out, 1e-3); 274s ***** error gevfit (ones (2,5)); 274s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 274s ***** error gevfit ([1, 2, 3, 4, 5], 0); 274s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 274s ***** error ... 274s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 274s ***** error ... 274s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 274s ***** error ... 274s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 274s ***** error ... 274s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 274s ***** error ... 274s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 274s 11 tests, 11 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/ricelike.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/ricelike.m 274s ***** test 274s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 274s assert (nlogL, 204.5230311010569, 1e-12); 274s ***** test 274s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 274s assert (nlogL, 8.65562164930058, 1e-12); 274s ***** error ricelike (3.25) 274s ***** error ricelike ([5, 0.2], ones (2)) 274s ***** error ... 274s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 274s ***** error ... 274s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 274s ***** error ... 274s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 274s ***** error ... 274s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 274s ***** error ... 274s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 274s 9 tests, 9 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/binofit.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/binofit.m 274s ***** demo 274s ## Sample 2 populations from different binomial distibutions 274s rand ("seed", 1); # for reproducibility 274s r1 = binornd (50, 0.15, 1000, 1); 274s rand ("seed", 2); # for reproducibility 274s r2 = binornd (100, 0.5, 1000, 1); 274s r = [r1, r2]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 23, 0.35); 274s h = findobj (gca, "Type", "patch"); 274s set (h(1), "facecolor", "c"); 274s set (h(2), "facecolor", "g"); 274s hold on 274s 274s ## Estimate their probability of success 274s pshatA = binofit (r(:,1), 50); 274s pshatB = binofit (r(:,2), 100); 274s 274s ## Plot their estimated PDFs 274s x = [min(r(:,1)):max(r(:,1))]; 274s y = binopdf (x, 50, mean (pshatA)); 274s plot (x, y, "-pg"); 274s x = [min(r(:,2)):max(r(:,2))]; 274s y = binopdf (x, 100, mean (pshatB)); 274s plot (x, y, "-sc"); 274s ylim ([0, 0.2]) 274s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 274s "Normalized HIST of sample 2 with ps=0.50", ... 274s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 274s mean (pshatA)), ... 274s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 274s mean (pshatB))}) 274s title ("Two population samples from different binomial distibutions") 274s hold off 274s ***** test 274s x = 0:3; 274s [pshat, psci] = binofit (x, 3); 274s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 274s assert (psci(1,:), [0, 0.7076], 1e-4); 274s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 274s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 274s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 274s ***** error ... 274s binofit ([1 2 3 4]) 274s ***** error ... 274s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 274s ***** error binofit (ones(2), [1, 2, 3, 3]) 274s ***** error ... 274s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 274s ***** error ... 274s binofit ([1, 4, 3, 2], [5, 5, 5]) 274s ***** error ... 274s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 274s ***** error binofit ([1, 2, 1], 3, 1.2); 274s ***** error binofit ([1, 2, 1], 3, 0); 274s ***** error binofit ([1, 2, 1], 3, "alpha"); 274s 10 tests, 10 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/poissfit.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/poissfit.m 274s ***** demo 274s ## Sample 3 populations from 3 different Poisson distibutions 274s randp ("seed", 2); # for reproducibility 274s r1 = poissrnd (1, 1000, 1); 274s randp ("seed", 2); # for reproducibility 274s r2 = poissrnd (4, 1000, 1); 274s randp ("seed", 3); # for reproducibility 274s r3 = poissrnd (10, 1000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [0:20], 1); 274s h = findobj (gca, "Type", "patch"); 274s set (h(1), "facecolor", "c"); 274s set (h(2), "facecolor", "g"); 274s set (h(3), "facecolor", "r"); 274s hold on 274s 274s ## Estimate their lambda parameter 274s lambdahat = poissfit (r); 274s 274s ## Plot their estimated PDFs 274s x = [0:20]; 274s y = poisspdf (x, lambdahat(1)); 274s plot (x, y, "-pr"); 274s y = poisspdf (x, lambdahat(2)); 274s plot (x, y, "-sg"); 274s y = poisspdf (x, lambdahat(3)); 274s plot (x, y, "-^c"); 274s xlim ([0, 20]) 274s ylim ([0, 0.4]) 274s legend ({"Normalized HIST of sample 1 with λ=1", ... 274s "Normalized HIST of sample 2 with λ=4", ... 274s "Normalized HIST of sample 3 with λ=10", ... 274s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 274s lambdahat(1)), ... 274s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 274s lambdahat(2)), ... 274s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 274s lambdahat(3))}) 274s title ("Three population samples from different Poisson distibutions") 274s hold off 274s ***** test 274s x = [1 3 2 4 5 4 3 4]; 274s [lhat, lci] = poissfit (x); 274s assert (lhat, 3.25) 274s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 274s ***** test 274s x = [1 3 2 4 5 4 3 4]; 274s [lhat, lci] = poissfit (x, 0.01); 274s assert (lhat, 3.25) 274s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 274s ***** test 274s x = [1 2 3 4 5]; 274s f = [1 1 2 3 1]; 274s [lhat, lci] = poissfit (x, [], f); 274s assert (lhat, 3.25) 274s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 274s ***** test 274s x = [1 2 3 4 5]; 274s f = [1 1 2 3 1]; 274s [lhat, lci] = poissfit (x, 0.01, f); 274s assert (lhat, 3.25) 274s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 274s ***** error poissfit ([1 2 -1 3]) 274s ***** error poissfit ([1 2 3], 0) 274s ***** error poissfit ([1 2 3], 1.2) 274s ***** error poissfit ([1 2 3], [0.02 0.05]) 274s ***** error 274s poissfit ([1 2 3], [], [1 5]) 274s ***** error 274s poissfit ([1 2 3], [], [1 5 -1]) 274s 10 tests, 10 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/gevlike.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/gevlike.m 274s ***** test 274s x = 1; 274s k = 0.2; 274s sigma = 0.3; 274s mu = 0.5; 274s [L, C] = gevlike ([k sigma mu], x); 274s expected_L = 0.75942; 274s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 274s assert (L, expected_L, 0.001); 274s assert (C, inv (expected_C), 0.001); 274s ***** test 274s x = 1; 274s k = 0; 274s sigma = 0.3; 274s mu = 0.5; 274s [L, C] = gevlike ([k sigma mu], x); 274s expected_L = 0.65157; 274s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 274s assert (L, expected_L, 0.001); 274s assert (C, inv (expected_C), 0.001); 274s ***** test 274s x = -5:-1; 274s k = -0.2; 274s sigma = 0.3; 274s mu = 0.5; 274s [L, C] = gevlike ([k sigma mu], x); 274s expected_L = 3786.4; 274s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 274s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 274s 8.7297e-05, 1.2034e-05, -0.0019125]; 274s assert (L, expected_L, -0.001); 274s assert (C, expected_C, -0.001); 274s ***** test 274s x = -5:0; 274s k = -0.2; 274s sigma = 0.3; 274s mu = 0.5; 274s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 274s expected_L = 3786.4; 274s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 274s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 274s 8.7297e-05, 1.2034e-05, -0.0019125]; 274s assert (L, expected_L, -0.001); 274s assert (C, expected_C, -0.001); 274s ***** error gevlike (3.25) 274s ***** error gevlike ([1, 2, 3], ones (2)) 274s ***** error ... 274s gevlike ([1, 2], [1, 3, 5, 7]) 274s ***** error ... 274s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 274s ***** error ... 274s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 274s ***** error ... 274s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 274s ***** error ... 274s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 274s 11 tests, 11 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/raylfit.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/raylfit.m 274s ***** demo 274s ## Sample 3 populations from 3 different Rayleigh distibutions 274s rand ("seed", 2); # for reproducibility 274s r1 = raylrnd (1, 1000, 1); 274s rand ("seed", 2); # for reproducibility 274s r2 = raylrnd (2, 1000, 1); 274s rand ("seed", 3); # for reproducibility 274s r3 = raylrnd (4, 1000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [0.5:0.5:10.5], 2); 274s h = findobj (gca, "Type", "patch"); 274s set (h(1), "facecolor", "c"); 274s set (h(2), "facecolor", "g"); 274s set (h(3), "facecolor", "r"); 274s hold on 274s 274s ## Estimate their lambda parameter 274s sigmaA = raylfit (r(:,1)); 274s sigmaB = raylfit (r(:,2)); 274s sigmaC = raylfit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [0:0.1:10]; 274s y = raylpdf (x, sigmaA); 274s plot (x, y, "-pr"); 274s y = raylpdf (x, sigmaB); 274s plot (x, y, "-sg"); 274s y = raylpdf (x, sigmaC); 274s plot (x, y, "-^c"); 274s xlim ([0, 10]) 274s ylim ([0, 0.7]) 274s legend ({"Normalized HIST of sample 1 with σ=1", ... 274s "Normalized HIST of sample 2 with σ=2", ... 274s "Normalized HIST of sample 3 with σ=4", ... 274s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 274s sigmaA), ... 274s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 274s sigmaB), ... 274s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 274s sigmaC)}) 274s title ("Three population samples from different Rayleigh distibutions") 274s hold off 274s ***** test 274s x = [1 3 2 4 5 4 3 4]; 274s [shat, sci] = raylfit (x); 274s assert (shat, 2.4495, 1e-4) 274s assert (sci, [1.8243; 3.7279], 1e-4) 274s ***** test 274s x = [1 3 2 4 5 4 3 4]; 274s [shat, sci] = raylfit (x, 0.01); 274s assert (shat, 2.4495, 1e-4) 274s assert (sci, [1.6738; 4.3208], 1e-4) 274s ***** test 274s x = [1 2 3 4 5]; 274s f = [1 1 2 3 1]; 274s [shat, sci] = raylfit (x, [], [], f); 274s assert (shat, 2.4495, 1e-4) 274s assert (sci, [1.8243; 3.7279], 1e-4) 274s ***** test 274s x = [1 2 3 4 5]; 274s f = [1 1 2 3 1]; 274s [shat, sci] = raylfit (x, 0.01, [], f); 274s assert (shat, 2.4495, 1e-4) 274s assert (sci, [1.6738; 4.3208], 1e-4) 274s ***** test 274s x = [1 2 3 4 5 6]; 274s c = [0 0 0 0 0 1]; 274s f = [1 1 2 3 1 1]; 274s [shat, sci] = raylfit (x, 0.01, c, f); 274s assert (shat, 2.4495, 1e-4) 274s assert (sci, [1.6738; 4.3208], 1e-4) 274s ***** error raylfit (ones (2,5)); 274s ***** error raylfit ([1 2 -1 3]) 274s ***** error raylfit ([1 2 3], 0) 274s ***** error raylfit ([1 2 3], 1.2) 274s ***** error raylfit ([1 2 3], [0.02 0.05]) 274s ***** error ... 274s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 274s ***** error ... 274s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 274s ***** error ... 274s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 274s ***** error ... 274s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 274s ***** error 274s raylfit ([1 2 3], [], [], [1 5]) 274s ***** error 274s raylfit ([1 2 3], [], [], [1 5 -1]) 274s 16 tests, 16 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/wblfit.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/wblfit.m 274s ***** demo 274s ## Sample 3 populations from 3 different Weibull distibutions 274s rande ("seed", 1); # for reproducibility 274s r1 = wblrnd(2, 4, 2000, 1); 274s rande ("seed", 2); # for reproducibility 274s r2 = wblrnd(5, 2, 2000, 1); 274s rande ("seed", 5); # for reproducibility 274s r3 = wblrnd(1, 5, 2000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 30, [2.5 2.1 3.2]); 274s h = findobj (gca, "Type", "patch"); 274s set (h(1), "facecolor", "c"); 274s set (h(2), "facecolor", "g"); 274s set (h(3), "facecolor", "r"); 274s ylim ([0, 2]); 274s xlim ([0, 10]); 274s hold on 274s 274s ## Estimate their lambda parameter 274s lambda_kA = wblfit (r(:,1)); 274s lambda_kB = wblfit (r(:,2)); 274s lambda_kC = wblfit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [0:0.1:15]; 274s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 274s plot (x, y, "-pr"); 274s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 274s plot (x, y, "-sg"); 274s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 274s plot (x, y, "-^c"); 274s hold off 274s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 274s "Normalized HIST of sample 2 with λ=5 and k=2", ... 274s "Normalized HIST of sample 3 with λ=1 and k=5", ... 274s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 274s lambda_kA(1), lambda_kA(2)), ... 274s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 274s lambda_kB(1), lambda_kB(2)), ... 274s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 274s lambda_kC(1), lambda_kC(2))}) 274s title ("Three population samples from different Weibull distibutions") 274s hold off 274s ***** test 274s x = 1:50; 274s [paramhat, paramci] = wblfit (x); 274s paramhat_out = [28.3636, 1.7130]; 274s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 274s assert (paramhat, paramhat_out, 1e-4); 274s assert (paramci, paramci_out, 1e-4); 274s ***** test 274s x = 1:50; 274s [paramhat, paramci] = wblfit (x, 0.01); 274s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 274s assert (paramci, paramci_out, 1e-4); 274s ***** error wblfit (ones (2,5)); 274s ***** error wblfit ([-1 2 3 4]); 274s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 274s ***** error wblfit ([1, 2, 3, 4, 5], 0); 274s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 274s ***** error ... 274s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 274s 13 tests, 13 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/nbinlike.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fit/nbinlike.m 274s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 274s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 274s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 274s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 274s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 274s ***** error nbinlike (3.25) 274s ***** error nbinlike ([5, 0.2], ones (2)) 274s ***** error nbinlike ([5, 0.2], [-1, 3]) 274s ***** error ... 274s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 274s ***** error nbinlike ([-5, 0.2], [1:15]) 274s ***** error nbinlike ([0, 0.2], [1:15]) 274s ***** error nbinlike ([5, 1.2], [3, 5]) 274s ***** error nbinlike ([5, -0.2], [3, 5]) 274s ***** error ... 274s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 274s ***** error ... 274s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 274s ***** error ... 274s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 274s 16 tests, 16 passed, 0 known failure, 0 skipped 274s [inst/cmdscale.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cmdscale.m 274s ***** shared m, n, X, D 274s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 274s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 274s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 274s 2 tests, 2 passed, 0 known failure, 0 skipped 274s [inst/geomean.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/geomean.m 274s ***** test 274s x = [0:10]; 274s y = [x;x+5;x+10]; 274s assert (geomean (x), 0); 274s m = [0 9.462942809849169 14.65658770861967]; 274s assert (geomean (y, 2), m', 4e-14); 274s assert (geomean (y, "all"), 0); 274s y(2,4) = NaN; 274s m(2) = 9.623207231679554; 274s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 274s assert (geomean (y', "omitnan"), m, 4e-14); 274s z = y + 20; 274s assert (geomean (z, "all"), NaN); 274s assert (geomean (z, "all", "includenan"), NaN); 274s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 274s m = [24.79790781765634 NaN 34.85638839503932]; 274s assert (geomean (z'), m, 4e-14); 274s assert (geomean (z', "includenan"), m, 4e-14); 274s m(2) = 30.02181156156319; 274s assert (geomean (z', "omitnan"), m, 4e-14); 274s assert (geomean (z, 2, "omitnan"), m', 4e-14); 274s ***** test 274s x = repmat ([1:20;6:25], [5 2 6 3]); 274s assert (size (geomean (x, [3 2])), [10 1 1 3]); 274s assert (size (geomean (x, [1 2])), [1 1 6 3]); 274s assert (size (geomean (x, [1 2 4])), [1 1 6]); 274s assert (size (geomean (x, [1 4 3])), [1 40]); 274s assert (size (geomean (x, [1 2 3 4])), [1 1]); 274s ***** test 274s x = repmat ([1:20;6:25], [5 2 6 3]); 274s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 274s assert (geomean (x, [3 2]), m, 4e-13); 274s x(2,5,6,3) = NaN; 274s m(2,3) = NaN; 274s assert (geomean (x, [3 2]), m, 4e-13); 274s m(2,3) = 14.3292729579901; 274s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 274s ***** error geomean ("char") 274s ***** error geomean ([1 -1 3]) 274s ***** error ... 274s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 274s ***** error ... 274s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 274s ***** error ... 274s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 274s 8 tests, 8 passed, 0 known failure, 0 skipped 274s [inst/fitrgam.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitrgam.m 274s ***** demo 274s # Train a RegressionGAM Model for synthetic values 274s 274s f1 = @(x) cos (3 *x); 274s f2 = @(x) x .^ 3; 274s 274s # generate x1 and x2 for f1 and f2 274s x1 = 2 * rand (50, 1) - 1; 274s x2 = 2 * rand (50, 1) - 1; 274s 274s # calculate y 274s y = f1(x1) + f2(x2); 274s 274s # add noise 274s y = y + y .* 0.2 .* rand (50,1); 274s X = [x1, x2]; 274s 274s # create an object 274s a = fitrgam (X, y, "tol", 1e-3) 274s ***** test 274s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 274s y = [1; 2; 3; 4]; 274s a = fitrgam (x, y); 274s assert ({a.X, a.Y}, {x, y}) 274s assert ({a.BaseModel.Intercept}, {2.5000}) 274s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 274s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 274s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 274s assert ({a.Formula}, {[]}) 274s ***** test 274s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 274s y = [1; 2; 3; 4]; 274s pnames = {"A", "B", "C", "D"}; 274s formula = "Y ~ A + B + C + D + A:C"; 274s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 274s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 274s assert ({a.IntMatrix}, {intMat}) 274s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 274s assert ({a.Formula}, {formula}) 274s ***** error fitrgam () 274s ***** error fitrgam (ones(10,2)) 274s ***** error 274s fitrgam (ones (4,2), ones (4, 1), "K") 274s ***** error 274s fitrgam (ones (4,2), ones (3, 1)) 274s ***** error 274s fitrgam (ones (4,2), ones (3, 1), "K", 2) 274s 7 tests, 7 passed, 0 known failure, 0 skipped 274s [inst/evalclusters.m] 274s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/evalclusters.m 274s ***** demo 274s load fisheriris; 274s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 274s plot (eva) 274s ***** error evalclusters () 275s ***** error evalclusters ([1 1;0 1]) 275s ***** error evalclusters ([1 1;0 1], "kmeans") 275s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 275s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 275s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 275s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 275s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 275s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 275s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 275s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 275s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 275s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 275s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 275s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 275s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 275s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 275s "distance", "a") 275s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 275s "distance", "a") 275s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 275s "clusterpriors", "equal") 275s ***** error evalclusters ([1 1;0 1], [1; 2], ... 275s "silhouette", "clusterpriors", "xxx") 275s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 275s ***** test 275s load fisheriris; 275s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 275s assert (isa (eva, "CalinskiHarabaszEvaluation")); 275s assert (eva.NumObservations, 150); 275s assert (eva.OptimalK, 3); 275s assert (eva.InspectedK, [1 2 3 4 5 6]); 275s 22 tests, 22 passed, 0 known failure, 0 skipped 275s [inst/x2fx.m] 275s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/x2fx.m 275s ***** test 275s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 275s D = x2fx(X,'quadratic'); 275s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 275s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 275s ***** test 275s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 275s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 275s D = x2fx(X,model); 275s assert (D(1,:) , [1, 1, 10, 10, 1]); 275s assert (D(2,:) , [1, 2, 20, 40, 4]); 275s assert (D(4,:) , [1, 4, 20, 80, 16]); 275s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 275s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 275s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 275s 5 tests, 5 passed, 0 known failure, 0 skipped 275s [inst/grp2idx.m] 275s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/grp2idx.m 275s ***** test 275s in = [true false false true]; 275s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 275s assert (nthargout (1:3, @grp2idx, in), out) 275s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 275s ***** test 275s assert (nthargout (1:3, @grp2idx, [false, true]), 275s {[1; 2] {"0"; "1"} [false; true]}); 275s assert (nthargout (1:3, @grp2idx, [true, false]), 275s {[1; 2] {"1"; "0"} [true; false]}); 275s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 275s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 275s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 275s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 275s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 275s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 275s [1; -3; -2; 2; -1; 3]}); 275s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 275s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 275s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 275s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 275s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 275s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 275s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 275s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 275s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 275s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 275s 10 tests, 10 passed, 0 known failure, 0 skipped 275s [inst/canoncorr.m] 275s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/canoncorr.m 275s ***** shared X,Y,A,B,r,U,V,k 275s k = 10; 275s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 275s [A,B,r,U,V,stats] = canoncorr (X,Y); 275s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 275s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 275s ***** assert (r, [0.99590 0.26754], 1E-5); 275s ***** assert (U, center(X) * A, 10*eps); 275s ***** assert (V, center(Y) * B, 10*eps); 275s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 275s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 275s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 275s ***** assert (r, ones(1, 5), 10*eps); 275s 8 tests, 8 passed, 0 known failure, 0 skipped 275s [inst/ecdf.m] 275s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ecdf.m 275s ***** demo 275s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 275s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 275s t = min (y, d); ## we observe the minimum of these times 275s censored = (y > d); ## we also observe whether the subject failed 275s 275s ## Calculate and plot the empirical cdf and confidence bounds 275s [f, x, flo, fup] = ecdf (t, "censoring", censored); 275s stairs (x, f); 275s hold on; 275s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 275s 275s ## Superimpose a plot of the known true cdf 275s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 275s hold off; 275s ***** demo 275s R = wblrnd (100, 2, 100, 1); 275s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 275s hold on 275s x = 1:1:250; 275s wblsurv = 1 - cdf ("weibull", x, 100, 2); 275s plot (x, wblsurv, "g-", "LineWidth", 2) 275s legend ("Empirical survivor function", "Lower confidence bound", ... 275s "Upper confidence bound", "Weibull survivor function", ... 275s "Location", "northeast"); 275s hold off 275s ***** error ecdf (); 275s ***** error ecdf (randi (15,2)); 275s ***** error ecdf ([3,2,4,3+2i,5]); 275s ***** error kstest ([2,3,4,5,6],"tail"); 275s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 275s ***** error kstest ([2,3,4,5,6],"function", ""); 275s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 275s ***** error kstest ([2,3,4,5,6],"tail", 0); 275s ***** error kstest ([2,3,4,5,6],"alpha", 0); 275s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 275s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 275s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 275s ***** test 275s hf = figure ("visible", "off"); 275s unwind_protect 275s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 275s [F, x, Flo, Fup] = ecdf (x); 275s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 275s assert (F, F_out, ones (10,1) * 1e-4); 275s x_out = [0 0 2 3 4 5 6 7 8 9]'; 275s assert (x, x_out); 275s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 275s assert (Flo, Flo_out, ones (10,1) * 1e-4); 275s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 275s assert (Fup, Fup_out, ones (10,1) * 1e-4); 275s unwind_protect_cleanup 275s close (hf); 275s end_unwind_protect 275s ***** test 275s hf = figure ("visible", "off"); 275s unwind_protect 275s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 275s ecdf (x); 275s unwind_protect_cleanup 275s close (hf); 275s end_unwind_protect 275s 14 tests, 14 passed, 0 known failure, 0 skipped 275s [inst/fillmissing.m] 275s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fillmissing.m 275s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 275s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 275s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 275s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 275s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 275s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 275s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 275s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 275s ***** test 275s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 275s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 275s assert (fillmissing (x, "constant", 99), y); 275s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 275s assert (fillmissing (x, "constant", [94:99]), y); 275s assert (fillmissing (x, "constant", [94:99]'), y); 275s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 275s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 275s assert (fillmissing (x, "constant", [94:99], 1), y); 275s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 275s assert (fillmissing (x, "constant", [96:99], 2), y); 275s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 275s assert (fillmissing (x, "constant", [94:99], 3), y); 275s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 275s assert (fillmissing (x, "constant", [88:99], 99), y); 275s ***** test 275s x = reshape ([1:24], 4, 3, 2); 275s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 275s y = x; 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 275s assert (fillmissing (x, "constant", [94:99], 1), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 275s assert (fillmissing (x, "constant", [92:99], 2), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 275s assert (fillmissing (x, "constant", [88:99], 3), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 275s assert (fillmissing (x, "constant", [76:99], 99), y); 275s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 275s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 275s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 275s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 275s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 275s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 275s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 275s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 275s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 275s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 275s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 275s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 275s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 275s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 275s ***** test 275s x = reshape ([1:24], 3, 4, 2); 275s y = x; 275s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 275s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 275s y([8]) = 99; 275s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 275s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 275s y = x; 275s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 275s y([6, 18, 20, 21]) = 99; 275s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 275s y(y == 99) = 88; 275s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 275s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 275s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 275s y([8]) = 94; 275s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 275s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 275s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 275s y = x; 275s y(isnan (y)) = 88; 275s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 275s y = x; 275s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 275s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 275s y = x; 275s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 275s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 275s y = x; 275s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 275s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 275s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 275s ***** test 275s x = reshape ([1:24],4,3,2); 275s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 275s y = x; 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 275s assert (fillmissing (x, "constant", [94:99], 1), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 275s assert (fillmissing (x, "constant", [92:99], 2), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 275s assert (fillmissing (x, "constant", [88:99], 3), y); 275s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 275s assert (fillmissing (x, "constant", [76:99], 99), y); 276s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 276s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** test 276s x = reshape ([1:24], 4, 3, 2); 276s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 276s y = x; 276s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 276s assert (fillmissing (x, "next", 1), y); 276s y = x; 276s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 276s assert (fillmissing (x, "next", 2), y); 276s y = x; 276s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 276s assert (fillmissing (x, "next", 3), y); 276s assert (fillmissing (x, "next", 99), x); 276s y = x; 276s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 276s assert (fillmissing (x, "previous", 1), y); 276s y = x; 276s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 276s assert (fillmissing (x, "previous", 2), y); 276s y = x; 276s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 276s assert (fillmissing (x, "previous", 3), y); 276s assert (fillmissing (x, "previous", 99), x); 276s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 276s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 276s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 276s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 276s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 276s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 276s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 276s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 276s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 276s y = x; 276s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 276s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 276s y = x; 276s y([16, 19, 21]) = [4, 7, 9]; 276s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 276s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 276s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 276s y = x; 276s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 276s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 276s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 276s y = x; 276s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 276s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 276s y = x; 276s y([2, 5]) = [14, 17]; 276s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 276s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 276s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 276s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 276s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 276s ***** test 276s x = reshape ([1:24], 4, 3, 2); 276s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 276s y = x; 276s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 276s assert (fillmissing (x, "nearest", 1), y); 276s y = x; 276s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 276s assert (fillmissing (x, "nearest", 2), y); 276s y = x; 276s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 276s assert (fillmissing (x, "nearest", 3), y); 276s assert (fillmissing (x, "nearest", 99), x); 276s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 276s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 276s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 276s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 276s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 276s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 276s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 276s y = x; 276s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 276s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 276s y = x; 276s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 276s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 276s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 276s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 276s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 276s ***** test 276s x = reshape ([1:24], 4, 3, 2); 276s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 276s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 276s y = reshape ([1:24], 4, 3, 2); 276s y([1, 9, 14, 19, 22, 23]) = NaN; 276s assert (fillmissing (x, "linear", 2), y); 276s y = reshape ([1:24], 4, 3, 2); 276s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 276s assert (fillmissing (x, "linear", 3), y); 276s assert (fillmissing (x, "linear", 99), x); 276s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 276s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 276s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 276s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 276s y(8) = 8; 276s assert (fillmissing (x, "linear", "endvalues", 0), y); 276s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 276s y = x; 276s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 276s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 276s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 276s y = x; 276s y(isnan(y)) = 0; 276s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 276s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 276s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 276s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 276s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 276s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 276s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 276s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 276s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 276s ***** test <60965> 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 276s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 276s !!!!! known bug: https://octave.org/testfailure/?60965 276s interp1: invalid METHOD 'makima' 276s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 276s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 276s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 276s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 276s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 276s ***** 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]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 276s assert (fillmissing (x, "movmean", 3), y); 276s assert (fillmissing (x, "movmean", [1, 1]), y); 276s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 276s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 276s y = x; 276s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 276s assert (fillmissing (x, "movmean", 3, 2), y); 276s assert (fillmissing (x, "movmean", [1, 1], 2), y); 276s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 276s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 276s y([1, 18]) = NaN; 276s y(6) = 9; 276s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 276s y = x; 276s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 276s y(8) = 8; 276s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 276s y = x; 276s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 276s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 276s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 276s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 276s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 276s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 276s ***** 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]) 276s ***** test 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 276s assert (fillmissing (x, "movmedian", 3), y); 276s assert (fillmissing (x, "movmedian", [1, 1]), y); 276s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 276s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 276s y = x; 276s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 276s assert (fillmissing (x, "movmedian", 3, 2), y); 276s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 276s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 276s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 276s y([1,18]) = NaN; 276s y(6) = 9; 276s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 276s y = x; 276s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 276s y(8) = 8; 276s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 276s y = x; 276s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 276s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 276s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 276s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 276s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 276s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 276s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 276s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 276s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 276s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 276s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 276s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 276s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 276s ***** function A = testfcn (x, y, z) 276s if (isempty (y)) 276s A = z; 276s elseif (numel (y) == 1) 276s A = repelem (x(1), numel(z)); 276s else 276s A = interp1 (y, x, z, "linear", "extrap"); 276s endif 276s ***** endfunction 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 276s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 276s ***** 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] 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 276s ***** 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]' 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 276s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 276s ***** 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) 276s ***** 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] 276s ***** test 276s ***** function A = testfcn (x, y, z) 276s if (isempty (y)) 276s A = z; 276s elseif (numel (y) == 1) 276s A = repelem (x(1), numel(z)); 276s else 276s A = interp1 (y, x, z, "linear", "extrap"); 276s endif 276s ***** endfunction 276s x = reshape ([1:24], 3, 4, 2); 276s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 276s y = x; 276s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 276s assert (fillmissing (x, @testfcn, 3), y); 276s assert (fillmissing (x, @testfcn, [1, 1]), y); 276s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 276s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 276s y= x; 276s y(isnan (x)) = 99; 276s y(8) = 8; 276s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 276s y = x; 276s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 276s assert (fillmissing (x, @testfcn, 3, 2), y); 276s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 276s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 276s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 276s y(1) = NaN; 276s y([6, 18, 21]) = [9, 24, 24]; 276s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 276s y = x; 276s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 276s y(8) = 8; 276s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 276s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 276s y(8) = 99; 276s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 276s y([6, 18, 20, 21]) = 99; 276s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 276s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 276s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 276s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 276s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 276s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 276s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 276s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 276s ***** 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]) 276s ***** test 276s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 276s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 276s y = x; 276s y([4, 7, 12]) = 0; 276s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 276s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 276s y = x; 276s y([5, 7, 12]) = 0; 276s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 276s y = x; 276s y([4, 5, 7]) = 0; 276s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 277s ***** test 277s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 277s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 277s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 277s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 277s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 277s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 277s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 277s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 277s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 277s ***** test 277s x = [NaN, 2, 3]; 277s [~, idx] = fillmissing (x, "previous"); 277s assert (idx, logical ([0, 0, 0])); 277s [~, idx] = fillmissing (x, "movmean", 1); 277s assert (idx, logical ([0, 0, 0])); 277s x = [1:3; 4:6; 7:9]; 277s x([2, 4, 7, 9]) = NaN; 277s [~, idx] = fillmissing (x, "linear"); 277s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 277s [~, idx] = fillmissing (x, "movmean", 2); 277s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 277s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 277s assert (A, [1, 2, 3, 3, NaN]); 277s assert (idx, logical ([0, 0, 0, 1, 0])); 277s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 277s assert (A, [1, 2, 3, 3, NaN]); 277s assert (idx, logical ([0, 0, 0, 1, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 277s assert (A, [1, 2, 3, 3, NaN]); 277s assert (idx, logical ([0, 0, 0, 1, 0])); 277s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 277s assert (A, [1, 2, 1, 4, 1]); 277s assert (idx, logical ([0, 1, 0, 1, 0])); 277s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 277s assert (A, [1, NaN, 1, NaN, 1]); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 277s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 277s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 277s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 277s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 277s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 277s ***** test 277s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 277s assert (idx, logical ([0, 1, 1, 1, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 277s assert (A, [1, 2, 2, NaN, NaN]); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 277s assert (A, [1, 1, 1, 1, 1]); 277s assert (idx, logical ([0, 1, 0, 1, 1])); 277s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 277s assert (A, [1, NaN, 1, NaN, NaN]); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s ***** test 277s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 277s assert (A, [1, 3, 5]); 277s assert (idx, logical ([0, 1, 0])); 277s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 277s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 277s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 277s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 277s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 277s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 277s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 277s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 277s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 277s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 277s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 277s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 277s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 277s ***** test 277s [A, idx] = fillmissing (" a b c", "constant", " "); 277s assert (A, " a b c"); 277s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 277s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 277s assert (A, {"foo", "", "bar", ""}); 277s assert (idx, logical ([0, 0, 0, 0])); 277s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 277s assert (A, {"foo", "", "bar", ""}); 277s assert (idx, logical ([0, 0, 0, 0])); 277s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 277s assert (A, "afaoaoa"); 277s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 277s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 277s assert (A, " f o o "); 277s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 277s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 277s assert (A, {"a", "foo", "a"}); 277s assert (idx, logical ([1, 0, 1])); 277s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 277s assert (A, {"", "foo", ""}); 277s assert (idx, logical ([0, 0, 0])); 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 277s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 277s ***** 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])) 277s ***** 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])) 277s ***** test 277s x = logical ([1, 0, 1, 0, 1]); 277s [~, idx] = fillmissing (x, "constant", true); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([0, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 0])); 277s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 277s assert (idx, logical ([0, 0, 0, 0, 0])) 277s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])) 277s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([0, 0, 1, 0, 1])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 277s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 277s ***** 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])) 277s ***** 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])) 277s ***** test 277s x = int32 ([1, 2, 3, 4, 5]); 277s [~, idx] = fillmissing (x, "constant", 0); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 277s assert (idx, logical ([0, 0, 1, 0, 0])); 277s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([0, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 0])); 277s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 277s assert (idx, logical ([0, 0, 0, 0, 0])); 277s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([1, 0, 1, 0, 1])); 277s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 277s assert (idx, logical ([0, 0, 1, 0, 1])); 277s ***** test 277s [A, idx] = fillmissing ([struct, struct], "constant", 1); 277s assert (A, [struct, struct]) 277s assert (idx, [false, false]) 277s ***** error fillmissing () 277s ***** error fillmissing (1) 277s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 277s ***** error fillmissing (1, 2) 277s ***** error fillmissing (1, "foo") 277s ***** error fillmissing (1, @(x) x, 1) 277s ***** error fillmissing (1, @(x,y) x+y, 1) 277s ***** error fillmissing ("a b c", "linear") 277s ***** error fillmissing ({"a", "b"}, "linear") 277s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 277s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 277s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 277s ***** error fillmissing (1, "constant", []) 277s ***** error fillmissing (1, "constant", "a") 277s ***** error fillmissing ("a", "constant", 1) 277s ***** error fillmissing ("a", "constant", {"foo"}) 277s ***** error fillmissing ({"foo"}, "constant", 1) 277s ***** error fillmissing (1, "movmean") 277s ***** error fillmissing (1, "movmedian") 277s ***** error fillmissing (1, "constant", 1, 0) 277s ***** error fillmissing (1, "constant", 1, -1) 277s ***** error fillmissing (1, "constant", 1, [1, 2]) 277s ***** error fillmissing (1, "constant", 1, "samplepoints") 277s ***** error fillmissing (1, "constant", 1, "foo") 277s ***** error fillmissing (1, "constant", 1, 1, "foo") 277s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 277s ***** error fillmissing ("foo", "next", "endvalues", 1) 277s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 277s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 277s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 277s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 277s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 277s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 277s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 277s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 277s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 277s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 277s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 277s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 277s ***** error fillmissing (true, "linear", "missinglocations", true) 277s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 277s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 277s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 277s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 277s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 277s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 277s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 277s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 277s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 277s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 277s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 277s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 277s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 277s ***** error fillmissing (1, @(x,y,z) x+y+z) 277s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 277s 380 tests, 379 passed, 0 known failure, 1 skipped 277s [inst/silhouette.m] 277s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/silhouette.m 277s ***** demo 277s load fisheriris; 277s X = meas(:,3:4); 277s cidcs = kmeans (X, 3, "Replicates", 5); 277s silhouette (X, cidcs); 277s y_labels(cidcs([1 51 101])) = unique (species); 277s set (gca, "yticklabel", y_labels); 277s title ("Fisher's iris data"); 277s ***** error silhouette (); 278s ***** error silhouette ([1 2; 1 1]); 278s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 278s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 278s 4 tests, 4 passed, 0 known failure, 0 skipped 278s [inst/fishertest.m] 278s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fishertest.m 278s ***** demo 278s ## A Fisher's exact test example 278s 278s x = [3, 1; 1, 3] 278s [h, p, stats] = fishertest(x) 278s ***** assert (fishertest ([3, 4; 5, 7]), false); 278s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 278s ***** test 278s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 278s assert (pval, 1, 1e-14); 278s assert (stats.OddsRatio, 1.05); 278s CI = [0.159222057151289, 6.92429189601808]; 278s assert (stats.ConfidenceInterval, CI, 1e-14) 278s ***** test 278s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 278s assert (pval, 0.08080808080808080, 1e-14); 278s assert (stats.OddsRatio, 0); 278s assert (stats.ConfidenceInterval, [-Inf, Inf]) 278s ***** error fishertest (); 278s ***** error fishertest (1, 2, 3, 4, 5, 6); 278s ***** error ... 278s fishertest (ones (2, 2, 2)); 278s ***** error ... 278s fishertest ([1, 2; -3, 4]); 278s ***** error ... 278s fishertest ([1, 2; 3, 4+i]); 278s ***** error ... 278s fishertest ([1, 2; 3, 4.2]); 278s ***** error ... 278s fishertest ([NaN, 2; 3, 4]); 278s ***** error ... 278s fishertest ([1, Inf; 3, 4]); 278s ***** error ... 278s fishertest (ones (2) * 1e8); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "alpha", 0); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "alpha", 1.2); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "alpha", "val"); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "tail", "val"); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 278s ***** error ... 278s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 278s 19 tests, 19 passed, 0 known failure, 0 skipped 278s [inst/ttest2.m] 278s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ttest2.m 278s ***** test 278s a = 1:5; 278s b = 6:10; 278s b(5) = NaN; 278s [h,p,ci,stats] = ttest2 (a,b); 278s assert (h, 1); 278s assert (p, 0.002535996080258229, 1e-14); 278s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 278s assert (stats.tstat, -4.582575694955839, 1e-14); 278s assert (stats.df, 7); 278s assert (stats.sd, 1.4638501094228, 1e-13); 278s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 278s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 278s 3 tests, 3 passed, 0 known failure, 0 skipped 278s [inst/normplot.m] 278s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/normplot.m 278s ***** demo 278s h = normplot([1:20]); 278s ***** demo 278s h = normplot([1:20;5:2:44]'); 278s ***** demo 278s ax = newplot(); 278s h = normplot(ax, [1:20]); 278s ax = gca; 278s h = normplot(ax, [-10:10]); 278s set (ax, "xlim", [-11, 21]); 278s ***** error normplot (); 278s ***** error normplot (23); 278s ***** error normplot (23, [1:20]); 278s ***** error normplot (ones(3,4,5)); 278s ***** test 278s hf = figure ("visible", "off"); 278s unwind_protect 278s ax = newplot (hf); 278s h = normplot (ax, [1:20]); 278s ax = gca; 278s h = normplot(ax, [-10:10]); 278s set (ax, "xlim", [-11, 21]); 278s unwind_protect_cleanup 278s close (hf); 278s end_unwind_protect 278s ***** test 278s hf = figure ("visible", "off"); 278s unwind_protect 278s h = normplot([1:20;5:2:44]'); 278s unwind_protect_cleanup 278s close (hf); 278s end_unwind_protect 278s 6 tests, 6 passed, 0 known failure, 0 skipped 278s [inst/multcompare.m] 278s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/multcompare.m 278s ***** demo 278s 278s ## Demonstration using balanced one-way ANOVA from anova1 278s 278s x = ones (50, 4) .* [-2, 0, 1, 5]; 278s randn ("seed", 1); # for reproducibility 278s x = x + normrnd (0, 2, 50, 4); 278s groups = {"A", "B", "C", "D"}; 278s [p, tbl, stats] = anova1 (x, groups, "off"); 278s multcompare (stats); 278s ***** demo 278s 278s ## Demonstration using unbalanced one-way ANOVA example from anovan 278s 278s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 278s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 278s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 278s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 278s 25.694 ]'; 278s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 278s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 278s 278s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 278s "ControlGroup", 1, "display", "on") 278s 278s ***** demo 278s 278s ## Demonstration using factorial ANCOVA example from anovan 278s 278s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 278s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 278s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 278s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 278s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 278s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 278s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 278s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 278s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 278s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 278s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 278s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 278s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 278s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 278s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 278s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 278s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 278s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 278s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 278s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 278s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 278s 278s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 278s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 278s "sstype", "h", "display", "off", "contrasts", ... 278s {"simple","poly",""}); 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 278s "display", "on") 278s 278s ***** demo 278s 278s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 278s ## squares to account for heteroskedasticity. 278s 278s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 278s 2, 2, 2, 2, 2, 2, 2, 2, ... 278s 3, 3, 3, 3, 3, 3, 3, 3]'; 278s 278s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 278s 10, 25, 66, 43, 47, 56, 6, 39, ... 278s 11, 39, 26, 35, 25, 14, 24, 17]'; 278s 278s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 278s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 278s b = polyfit (fitted, abs (STATS.resid), 1); 278s v = polyval (b, fitted); # Variance as a function of the fitted values 278s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 278s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 278s ***** demo 278s 278s ## Demonstration of p-value adjustments to control the false discovery rate 278s ## Data from Westfall (1997) JASA. 92(437):299-306 278s 278s p = [.005708; .023544; .024193; .044895; ... 278s .048805; .221227; .395867; .693051; .775755]; 278s 278s padj = multcompare(p,'ctype','fdr') 278s ***** test 278s 278s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 278s 278s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 278s 278s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 278s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 278s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 278s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 278s 25.694 ]'; 278s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 278s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 278s 278s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 278s "display", "off"); 278s assert (C(1,6), 2.85812420217898e-05, 1e-09); 278s assert (C(2,6), 5.22936741204085e-07, 1e-09); 278s assert (C(3,6), 2.12794763209146e-08, 1e-09); 278s assert (C(4,6), 7.82091664406946e-15, 1e-09); 278s assert (C(5,6), 0.546591417210693, 1e-09); 278s assert (C(6,6), 0.0845897945254446, 1e-09); 278s assert (C(7,6), 9.47436557975328e-08, 1e-09); 278s assert (C(8,6), 0.188873478781067, 1e-09); 278s assert (C(9,6), 4.08974010364197e-08, 1e-09); 278s assert (C(10,6), 4.44427348175241e-06, 1e-09); 278s assert (M(1,1), 10, 1e-09); 278s assert (M(2,1), 18, 1e-09); 278s assert (M(3,1), 19, 1e-09); 278s assert (M(4,1), 21.0001428571429, 1e-09); 278s assert (M(5,1), 29.0001111111111, 1e-09); 278s assert (M(1,2), 1.0177537954095, 1e-09); 278s assert (M(2,2), 1.28736803631001, 1e-09); 278s assert (M(3,2), 1.0177537954095, 1e-09); 278s assert (M(4,2), 1.0880245732889, 1e-09); 278s assert (M(5,2), 0.959547480416536, 1e-09); 278s 278s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 278s "display", "off"); 278s assert (C(1,6), 4.08303457454140e-05, 1e-09); 278s assert (C(2,6), 1.04587348240817e-06, 1e-09); 278s assert (C(3,6), 1.06397381604573e-07, 1e-09); 278s assert (C(4,6), 7.82091664406946e-14, 1e-09); 278s assert (C(5,6), 5.46591417210693e-01, 1e-09); 278s assert (C(6,6), 1.05737243156806e-01, 1e-09); 278s assert (C(7,6), 2.36859139493832e-07, 1e-09); 278s assert (C(8,6), 2.09859420867852e-01, 1e-09); 278s assert (C(9,6), 1.36324670121399e-07, 1e-09); 278s assert (C(10,6), 7.40712246958735e-06, 1e-09); 278s 278s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 278s "display", "off"); 278s assert (C(1,6), 1.14324968087159e-04, 1e-09); 278s assert (C(2,6), 3.13762044722451e-06, 1e-09); 278s assert (C(3,6), 1.91515286888231e-07, 1e-09); 278s assert (C(4,6), 7.82091664406946e-14, 1e-09); 278s assert (C(5,6), 5.46591417210693e-01, 1e-09); 278s assert (C(6,6), 2.53769383576334e-01, 1e-09); 278s assert (C(7,6), 6.63205590582730e-07, 1e-09); 278s assert (C(8,6), 3.77746957562134e-01, 1e-09); 278s assert (C(9,6), 3.27179208291358e-07, 1e-09); 278s assert (C(10,6), 2.22213674087620e-05, 1e-09); 278s 278s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 278s "display", "off"); 278s assert (C(1,6), 1.14324968087159e-04, 1e-09); 278s assert (C(2,6), 3.13762044722451e-06, 1e-09); 278s assert (C(3,6), 1.91515286888231e-07, 1e-09); 278s assert (C(4,6), 7.82091664406946e-14, 1e-09); 278s assert (C(5,6), 5.46591417210693e-01, 1e-09); 278s assert (C(6,6), 2.53769383576334e-01, 1e-09); 278s assert (C(7,6), 6.63205590582730e-07, 1e-09); 278s assert (C(8,6), 3.77746957562134e-01, 1e-09); 278s assert (C(9,6), 3.27179208291358e-07, 1e-09); 278s assert (C(10,6), 2.22213674087620e-05, 1e-09); 278s 278s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 278s "display", "off"); 278s assert (C(1,6), 0.00108105386141085, 1e-09); 278s assert (C(2,6), 2.7779386789517e-05, 1e-09); 278s assert (C(3,6), 1.3599854038198e-06, 1e-09); 278s assert (C(4,6), 7.58830197867751e-13, 1e-09); 278s assert (C(5,6), 0.984039948220281, 1e-09); 278s assert (C(6,6), 0.539077018557706, 1e-09); 278s assert (C(7,6), 5.59475764460574e-06, 1e-09); 278s assert (C(8,6), 0.771173490574105, 1e-09); 278s assert (C(9,6), 2.52838425729905e-06, 1e-09); 278s assert (C(10,6), 0.000200719143889168, 1e-09); 278s 278s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 278s 278s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 278s "display", "off"); 278s assert (C(1,6), 2.85812420217898e-04, 1e-09); 278s assert (C(2,6), 5.22936741204085e-06, 1e-09); 278s assert (C(3,6), 2.12794763209146e-07, 1e-09); 278s assert (C(4,6), 7.82091664406946e-14, 1e-09); 278s assert (C(5,6), 1.00000000000000e+00, 1e-09); 278s assert (C(6,6), 8.45897945254446e-01, 1e-09); 278s assert (C(7,6), 9.47436557975328e-07, 1e-09); 278s assert (C(8,6), 1.00000000000000e+00, 1e-09); 278s assert (C(9,6), 4.08974010364197e-07, 1e-09); 278s assert (C(10,6), 4.44427348175241e-05, 1e-09); 278s 278s ## Test for anova1 ("equal")- comparison of results from Matlab 278s 278s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 278s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 2.85812420217898e-05, 1e-09); 278s assert (C(2,6), 5.22936741204085e-07, 1e-09); 278s assert (C(3,6), 2.12794763209146e-08, 1e-09); 278s assert (C(4,6), 7.82091664406946e-15, 1e-09); 278s assert (C(5,6), 0.546591417210693, 1e-09); 278s assert (C(6,6), 0.0845897945254446, 1e-09); 278s assert (C(7,6), 9.47436557975328e-08, 1e-09); 278s assert (C(8,6), 0.188873478781067, 1e-09); 278s assert (C(9,6), 4.08974010364197e-08, 1e-09); 278s assert (C(10,6), 4.44427348175241e-06, 1e-09); 278s assert (M(1,1), 10, 1e-09); 278s assert (M(2,1), 18, 1e-09); 278s assert (M(3,1), 19, 1e-09); 278s assert (M(4,1), 21.0001428571429, 1e-09); 278s assert (M(5,1), 29.0001111111111, 1e-09); 278s assert (M(1,2), 1.0177537954095, 1e-09); 278s assert (M(2,2), 1.28736803631001, 1e-09); 278s assert (M(3,2), 1.0177537954095, 1e-09); 278s assert (M(4,2), 1.0880245732889, 1e-09); 278s assert (M(5,2), 0.959547480416536, 1e-09); 278s 278s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 278s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 278s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 0.001247025266382, 1e-09); 278s assert (C(2,6), 0.000018037115146, 1e-09); 278s assert (C(3,6), 0.000002974595187, 1e-09); 278s assert (C(4,6), 0.000000000786046, 1e-09); 278s assert (C(5,6), 0.5693192886650109, 1e-09); 278s assert (C(6,6), 0.110501699029776, 1e-09); 278s assert (C(7,6), 0.000131226488700, 1e-09); 278s assert (C(8,6), 0.1912101409715992, 1e-09); 278s assert (C(9,6), 0.000005385256394, 1e-09); 278s assert (C(10,6), 0.000074089106171, 1e-09); 278s ***** test 278s 278s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 278s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 278s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 278s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 278s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 278s "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 1.49311100811177e-05, 1e-09); 278s assert (C(2,6), 2.20506904243535e-07, 1e-09); 278s assert (C(3,6), 0.00449897860490058, 1e-09); 278s assert (M(1,1), 6.25, 1e-09); 278s assert (M(2,1), 4.75, 1e-09); 278s assert (M(3,1), 4, 1e-09); 278s assert (M(1,2), 0.152145154862547, 1e-09); 278s assert (M(2,2), 0.152145154862547, 1e-09); 278s assert (M(3,2), 0.152145154862547, 1e-09); 278s ***** test 278s 278s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 278s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 278s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 278s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 278s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 278s "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 0.000020799832702, 1e-09); 278s assert (C(2,6), 0.000000035812410, 1e-09); 278s assert (C(3,6), 0.003038942449215, 1e-09); 278s ***** test 278s 278s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 278s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 278s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 278s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 278s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 278s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 278s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 278s "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 0.261031111511073, 1e-09); 278s assert (C(2,6), 0.065879755907745, 1e-09); 278s assert (C(3,6), 0.241874613529270, 1e-09); 278s ***** shared visibility_setting 278s visibility_setting = get (0, "DefaultFigureVisible"); 278s ***** test 278s set (0, "DefaultFigureVisible", "off"); 278s 278s ## Test for kruskalwallis - comparison with results from MATLAB 278s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 278s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 278s group = [1:3] .* ones (10,3); 278s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 278s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 0.000163089828959986, 1e-09); 278s assert (C(2,6), 0.630298044801257, 1e-09); 278s assert (C(3,6), 0.00100567660695682, 1e-09); 278s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 278s assert (C(1,6), 0.000489269486879958, 1e-09); 278s assert (C(2,6), 1, 1e-09); 278s assert (C(3,6), 0.00301702982087047, 1e-09); 278s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 278s assert (C(1,6), 0.000819054880289573, 1e-09); 278s assert (C(2,6), 0.890628039849261, 1e-09); 278s assert (C(3,6), 0.00447816059021654, 1e-09); 278s set (0, "DefaultFigureVisible", visibility_setting); 278s ***** test 278s set (0, "DefaultFigureVisible", "off"); 278s ## Test for friedman - comparison with results from MATLAB 278s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 278s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 278s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 278s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 0.227424558028569, 1e-09); 278s assert (C(2,6), 0.0327204848315735, 1e-09); 278s assert (C(3,6), 0.353160353315988, 1e-09); 278s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 278s assert (C(1,6), 0.682273674085708, 1e-09); 278s assert (C(2,6), 0.0981614544947206, 1e-09); 278s assert (C(3,6), 1, 1e-09); 278s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 278s assert (C(1,6), 0.482657360384373, 1e-09); 278s assert (C(2,6), 0.102266573027672, 1e-09); 278s assert (C(3,6), 0.649836502233148, 1e-09); 278s set (0, "DefaultFigureVisible", visibility_setting); 278s ***** test 278s set (0, "DefaultFigureVisible", "off"); 278s ## Test for fitlm - same comparisons as for first anovan example 278s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 278s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 278s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 278s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 278s 25.694 ]'; 278s 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]'; 278s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 278s "contrasts","simple"); 278s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 278s assert (C(1,6), 2.85812420217898e-05, 1e-09); 278s assert (C(2,6), 5.22936741204085e-07, 1e-09); 278s assert (C(3,6), 2.12794763209146e-08, 1e-09); 278s assert (C(4,6), 7.82091664406946e-15, 1e-09); 278s assert (C(5,6), 0.546591417210693, 1e-09); 278s assert (C(6,6), 0.0845897945254446, 1e-09); 278s assert (C(7,6), 9.47436557975328e-08, 1e-09); 278s assert (C(8,6), 0.188873478781067, 1e-09); 278s assert (C(9,6), 4.08974010364197e-08, 1e-09); 278s assert (C(10,6), 4.44427348175241e-06, 1e-09); 278s assert (M(1,1), 10, 1e-09); 278s assert (M(2,1), 18, 1e-09); 278s assert (M(3,1), 19, 1e-09); 278s assert (M(4,1), 21.0001428571429, 1e-09); 278s assert (M(5,1), 29.0001111111111, 1e-09); 278s assert (M(1,2), 1.0177537954095, 1e-09); 278s assert (M(2,2), 1.28736803631001, 1e-09); 278s assert (M(3,2), 1.0177537954095, 1e-09); 278s assert (M(4,2), 1.0880245732889, 1e-09); 278s assert (M(5,2), 0.959547480416536, 1e-09); 278s set (0, "DefaultFigureVisible", visibility_setting); 279s ***** test 279s ## Test p-value adjustments compared to R stats package function p.adjust 279s ## Data from Westfall (1997) JASA. 92(437):299-306 279s p = [.005708; .023544; .024193; .044895; ... 279s .048805; .221227; .395867; .693051; .775755]; 279s padj = multcompare (p); 279s assert (padj(1), 0.051372, 1e-06); 279s assert (padj(2), 0.188352, 1e-06); 279s assert (padj(3), 0.188352, 1e-06); 279s assert (padj(4), 0.269370, 1e-06); 279s assert (padj(5), 0.269370, 1e-06); 279s assert (padj(6), 0.884908, 1e-06); 279s assert (padj(7), 1.000000, 1e-06); 279s assert (padj(8), 1.000000, 1e-06); 279s assert (padj(9), 1.000000, 1e-06); 279s padj = multcompare(p,'ctype','holm'); 279s assert (padj(1), 0.051372, 1e-06); 279s assert (padj(2), 0.188352, 1e-06); 279s assert (padj(3), 0.188352, 1e-06); 279s assert (padj(4), 0.269370, 1e-06); 279s assert (padj(5), 0.269370, 1e-06); 279s assert (padj(6), 0.884908, 1e-06); 279s assert (padj(7), 1.000000, 1e-06); 279s assert (padj(8), 1.000000, 1e-06); 279s assert (padj(9), 1.000000, 1e-06); 279s padj = multcompare(p,'ctype','hochberg'); 279s assert (padj(1), 0.051372, 1e-06); 279s assert (padj(2), 0.169351, 1e-06); 279s assert (padj(3), 0.169351, 1e-06); 279s assert (padj(4), 0.244025, 1e-06); 279s assert (padj(5), 0.244025, 1e-06); 279s assert (padj(6), 0.775755, 1e-06); 279s assert (padj(7), 0.775755, 1e-06); 279s assert (padj(8), 0.775755, 1e-06); 279s assert (padj(9), 0.775755, 1e-06); 279s padj = multcompare(p,'ctype','fdr'); 279s assert (padj(1), 0.0513720, 1e-07); 279s assert (padj(2), 0.0725790, 1e-07); 279s assert (padj(3), 0.0725790, 1e-07); 279s assert (padj(4), 0.0878490, 1e-07); 279s assert (padj(5), 0.0878490, 1e-07); 279s assert (padj(6), 0.3318405, 1e-07); 279s assert (padj(7), 0.5089719, 1e-07); 279s assert (padj(8), 0.7757550, 1e-07); 279s assert (padj(9), 0.7757550, 1e-07); 279s 8 tests, 8 passed, 0 known failure, 0 skipped 279s [inst/bar3.m] 279s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/bar3.m 279s ***** demo 279s ## Ploting 5 bars in the same series. 279s 279s z = [50; 40; 30; 20; 10]; 279s bar3 (z); 279s ***** demo 279s ## Ploting 5 bars in different groups. 279s 279s z = [50, 40, 30, 20, 10]; 279s bar3 (z); 279s ***** demo 279s ## A 3D bar graph with each series corresponding to a column in z. 279s 279s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 279s bar3 (z); 279s ***** demo 279s ## Specify y-axis locations as tick names. y must be a column vector! 279s 279s y = [1950, 1960, 1970, 1980, 1990]'; 279s z = [16, 8, 4, 2, 1]'; 279s bar3 (y, z); 279s ***** demo 279s ## Plot 3 series as a grouped plot without any space between the grouped bars 279s 279s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 279s bar3 (z, 1, 'grouped'); 279s ***** demo 279s ## Plot a stacked style 3D bar graph 279s 279s z = [19, 30, 21, 30; 40, 16, 32, 12]; 279s b = bar3 (z, 0.5, 'stacked'); 279s ***** error bar3 ("A") 279s ***** error bar3 ({2,3,4,5}) 279s ***** error ... 279s bar3 ([1,2,3]', ones (2)) 279s ***** error ... 279s bar3 ([1:5], 1.2) 279s ***** error ... 279s bar3 ([1:5]', ones (5), 1.2) 279s ***** error ... 279s bar3 ([1:5]', ones (5), [0.8, 0.7]) 279s ***** error ... 279s bar3 (ones (5), 'width') 279s ***** error ... 279s bar3 (ones (5), 'width', 1.2) 279s ***** error ... 279s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 279s ***** error ... 279s bar3 (ones (5), 'color') 279s ***** error ... 279s bar3 (ones (5), 'color', [0.8, 0.8]) 279s ***** error ... 279s bar3 (ones (5), 'color', "brown") 279s ***** error ... 279s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 279s ***** error ... 279s bar3 (ones (5), 'xlabel') 279s ***** error ... 279s bar3 (ones (5), 'xlabel', 4) 279s ***** error ... 279s bar3 (ones (5), 'ylabel') 279s ***** error ... 279s bar3 (ones (5), 'ylabel', 4) 279s ***** error bar3 (ones (5), 'this', 4) 279s ***** error ... 279s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 279s ***** error ... 279s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 279s 20 tests, 20 passed, 0 known failure, 0 skipped 279s [inst/optimalleaforder.m] 279s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/optimalleaforder.m 279s ***** demo 279s randn ("seed", 5) # for reproducibility 279s X = randn (10, 2); 279s D = pdist (X); 279s tree = linkage(D, 'average'); 279s optimalleaforder (tree, D, 'Transformation', 'linear') 279s ***** error optimalleaforder () 279s ***** error optimalleaforder (1) 279s ***** error optimalleaforder (ones (2, 2), 1) 279s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 279s ***** error optimalleaforder ([1 2 1], [1 2 3]) 279s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 279s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 279s 7 tests, 7 passed, 0 known failure, 0 skipped 279s [inst/signrank.m] 279s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/signrank.m 279s ***** test 279s load gradespaired.mat 279s [p, h, stats] = signrank (gradespaired(:,1), ... 279s gradespaired(:,2), 'tail', 'left'); 279s assert (p, 0.0047, 1e-4); 279s assert (h, true); 279s assert (stats.zval, -2.5982, 1e-4); 279s assert (stats.signedrank, 2017.5); 279s ***** test 279s load ('gradespaired.mat'); 279s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 279s 'tail', 'left', 'method', 'exact'); 279s assert (p, 0.0045, 1e-4); 279s assert (h, true); 279s assert (stats.zval, NaN); 279s assert (stats.signedrank, 2017.5); 279s ***** test 279s load mileage 279s [p, h, stats] = signrank (mileage(:,2), 33); 279s assert (p, 0.0312, 1e-4); 279s assert (h, true); 279s assert (stats.zval, NaN); 279s assert (stats.signedrank, 21); 279s ***** test 279s load mileage 279s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 279s assert (p, 0.0156, 1e-4); 279s assert (h, true); 279s assert (stats.zval, NaN); 279s assert (stats.signedrank, 21); 279s ***** test 279s load mileage 279s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 279s 'alpha', 0.01, 'method', 'approximate'); 279s assert (p, 0.0180, 1e-4); 279s assert (h, false); 279s assert (stats.zval, 2.0966, 1e-4); 279s assert (stats.signedrank, 21); 279s ***** error signrank (ones (2)) 279s ***** error ... 279s signrank ([1, 2, 3, 4], ones (2)) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [1, 2, 3]) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'tail') 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'alpha', 0) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'alpha', "a") 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'tail', "some") 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'method', 0.01) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'method', "some") 279s ***** error ... 279s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 279s 22 tests, 22 passed, 0 known failure, 0 skipped 279s [inst/fitcknn.m] 279s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitcknn.m 279s ***** demo 279s ## Train a k-nearest neighbor classifier for k = 10 279s ## and plot the decision boundaries. 279s 279s load fisheriris 279s idx = ! strcmp (species, "setosa"); 279s X = meas(idx,3:4); 279s Y = cast (strcmpi (species(idx), "virginica"), "double"); 279s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 279s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 279s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 279s [x1G, x2G] = meshgrid (x1, x2); 279s XGrid = [x1G(:), x2G(:)]; 279s pred = predict (obj, XGrid); 279s gidx = logical (str2num (cell2mat (pred))); 279s 279s figure 279s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 279s hold on 279s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 279s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 279s xlabel ("Petal length (cm)"); 279s ylabel ("Petal width (cm)"); 279s title ("5-Nearest Neighbor Classifier Decision Boundary"); 279s legend ({"Versicolor Region", "Virginica Region", ... 279s "Sampled Versicolor", "Sampled Virginica"}, ... 279s "location", "northwest") 279s axis tight 279s hold off 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "NSMethod", "exhaustive"); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s k = 10; 279s a = fitcknn (x, y, "NumNeighbors" ,k); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = ones (4, 11); 279s y = ["a"; "a"; "b"; "b"]; 279s k = 10; 279s a = fitcknn (x, y, "NumNeighbors" ,k); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s k = 10; 279s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s k = 10; 279s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s weights = ones (4,1); 279s a = fitcknn (x, y, "Standardize", 1); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.Standardize}, {true}) 279s assert ({a.Sigma}, {std(x, [], 1)}) 279s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s weights = ones (4,1); 279s a = fitcknn (x, y, "Standardize", false); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.Standardize}, {false}) 279s assert ({a.Sigma}, {[]}) 279s assert ({a.Mu}, {[]}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s s = ones (1, 3); 279s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.DistParameter}, {s}) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 279s assert (class (a), "ClassificationKNN"); 279s assert (a.DistParameter, 5) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 279s "NSMethod", "exhaustive"); 279s assert (class (a), "ClassificationKNN"); 279s assert (a.DistParameter, 5) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 279s assert (class (a), "ClassificationKNN"); 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 279s assert ({a.BucketSize}, {20}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "IncludeTies", true); 279s assert (class (a), "ClassificationKNN"); 279s assert (a.IncludeTies, true); 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y); 279s assert (class (a), "ClassificationKNN"); 279s assert (a.IncludeTies, false); 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Prior, [0.5; 0.5]) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s prior = [0.5; 0.5]; 279s a = fitcknn (x, y, "Prior", "empirical"); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Prior, prior) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "a"; "b"]; 279s prior = [0.75; 0.25]; 279s a = fitcknn (x, y, "Prior", "empirical"); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Prior, prior) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "a"; "b"]; 279s prior = [0.5; 0.5]; 279s a = fitcknn (x, y, "Prior", "uniform"); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Prior, prior) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s cost = eye (2); 279s a = fitcknn (x, y, "Cost", cost); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Cost, [1, 0; 0, 1]) 279s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s cost = eye (2); 279s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 279s assert (class (a), "ClassificationKNN") 279s assert (a.Cost, [1, 0; 0, 1]) 279s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 279s assert ({a.BucketSize}, {50}) 279s ***** test 279s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 279s y = ["a"; "a"; "b"; "b"]; 279s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 279s assert (class (a), "ClassificationPartitionedModel"); 279s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 279s assert (a.ModelParameters.NSMethod, "exhaustive") 279s assert (a.ModelParameters.Distance, "euclidean") 279s assert ({a.Trained{1}.BucketSize}, {50}) 279s ***** error fitcknn () 279s ***** error fitcknn (ones (4,1)) 279s ***** error 279s fitcknn (ones (4,2), ones (4, 1), "K") 279s ***** error 279s fitcknn (ones (4,2), ones (3, 1)) 279s ***** error 279s fitcknn (ones (4,2), ones (3, 1), "K", 2) 279s ***** error 279s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 279s ***** error 279s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 279s ***** error ... 279s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 279s 29 tests, 29 passed, 0 known failure, 0 skipped 279s [inst/knnsearch.m] 279s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/knnsearch.m 279s ***** demo 279s ## find 10 nearest neighbour of a point using different distance metrics 279s ## and compare the results by plotting 279s load fisheriris 279s X = meas(:,3:4); 279s Y = species; 279s point = [5, 1.45]; 279s 279s ## calculate 10 nearest-neighbours by minkowski distance 279s [id, d] = knnsearch (X, point, "K", 10); 279s 279s ## calculate 10 nearest-neighbours by minkowski distance 279s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 279s 279s ## calculate 10 nearest-neighbours by chebychev distance 279s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 279s 279s ## plotting the results 279s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 279s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 279s xlabel("Petal length (cm)"); 279s ylabel("Petal width (cm)"); 279s 279s line (point(1), point(2), "marker", "X", "color", "k", ... 279s "linewidth", 2, "displayname", "query point") 279s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 279s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 279s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 279s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 279s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 279s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 279s xlim ([4.5 5.5]); 279s ylim ([1 2]); 279s axis square; 279s ***** demo 279s ## knnsearch on iris dataset using kdtree method 279s load fisheriris 279s X = meas(:,3:4); 279s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 279s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 279s 279s ## new point to be predicted 279s point = [5 1.45]; 279s 279s line (point(1), point(2), "marker", "X", "color", "k", ... 279s "linewidth", 2, "displayname", "query point") 279s 279s ## knnsearch using kdtree method 279s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 279s 279s ## plotting predicted neighbours 279s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 279s "linestyle", "none", "markersize", 10, ... 279s "displayname", "nearest neighbour") 279s xlim ([4 6]) 279s ylim ([1 3]) 279s axis square 279s ## details of predicted labels 279s tabulate (species(idx)) 279s 279s ctr = point - d(end); 279s diameter = 2 * d(end); 279s ## Draw a circle around the 10 nearest neighbors. 279s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 279s 279s ## here only 8 neighbours are plotted instead of 10 since the dataset 279s ## contains duplicate values 279s ***** shared X, Y 279s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 279s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * sqrt (2)); 279s ***** test 279s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 279s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * sqrt (2)); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 279s assert (iscell (idx), true); 279s assert (iscell (D), true) 279s assert (idx {1}, [1]); 279s assert (idx {2}, [1, 2]); 279s assert (D{1}, ones (1, 1) * sqrt (2)); 279s assert (D{2}, ones (1, 2) * sqrt (2)); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 279s assert (idx, [1, 2; 1, 2]); 279s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * sqrt (2)); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 279s assert (idx, [1, 2; 1, 2]); 279s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 279s ***** test 279s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 279s yy = [2, 4; 2, 6]; 279s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 279s assert (idx, [3; 2]); 279s assert (D, [0; 3.162277660168377], 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * sqrt (2)); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 279s assert (idx, [1; 1]); 279s assert (D, [2; 2]); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 279s assert (idx, [1; 1]); 279s assert (D, [1; 1]); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 279s assert (idx, [2; 3]); 279s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 279s assert (idx, [1; 1]); 279s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 279s ***** test 279s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 279s assert (idx, [1; 1]); 279s assert (D, [0.5; 0.5]); 280s ***** test 280s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 280s assert (idx, [1; 1]); 280s assert (D, [0.5; 0.5]); 280s ***** test 280s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 280s assert (idx, [1, 2; 1, 2]); 280s assert (D, [0.5, 1; 0.5, 0.5]); 280s ***** test 280s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 280s b = [1, 1]; 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 280s assert (iscell (idx), true); 280s assert (iscell (D), true) 280s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 280s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 280s ***** test 280s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 280s b = [1, 1]; 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 280s assert (iscell (idx), true); 280s assert (iscell (D), true) 280s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 280s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 280s ***** test 280s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 280s b = [1, 1]; 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 280s assert (iscell (idx), false); 280s assert (iscell (D), false) 280s assert (idx, [4, 2, 3, 6, 1]); 280s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 280s ***** test 280s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 280s b = [1, 1]; 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 280s assert (iscell (idx), false); 280s assert (iscell (D), false) 280s assert (idx, [4, 2, 3, 6, 1]); 280s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 280s ***** test 280s load fisheriris 280s a = meas; 280s b = min(meas); 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 280s assert (idx, [42, 9, 14, 39, 13]); 280s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 280s ***** test 280s load fisheriris 280s a = meas; 280s b = mean(meas); 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 280s assert (idx, [65, 83, 89, 72, 100]); 280s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 280s ***** test 280s load fisheriris 280s a = meas; 280s b = max(meas); 280s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 280s assert (idx, [118, 132, 110, 106, 136]); 280s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 280s 280s ***** test 280s load fisheriris 280s a = meas; 280s b = max(meas); 280s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 280s assert ( iscell (idx), true); 280s assert ( iscell (D), true); 280s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 280s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 280s ***** error knnsearch (1) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (4)) 280s ***** error ... 280s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 280s ***** error ... 280s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 280s 42 tests, 42 passed, 0 known failure, 0 skipped 280s [inst/hist3.m] 280s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hist3.m 280s ***** demo 280s X = [ 280s 1 1 280s 1 1 280s 1 10 280s 1 10 280s 5 5 280s 5 5 280s 5 5 280s 5 5 280s 5 5 280s 7 3 280s 7 3 280s 7 3 280s 10 10 280s 10 10]; 280s hist3 (X) 280s ***** test 280s N_exp = [ 0 0 0 5 20 280s 0 0 10 15 0 280s 0 15 10 0 0 280s 20 5 0 0 0]; 280s 280s n = 100; 280s x = [1:n]'; 280s y = [n:-1:1]'; 280s D = [x y]; 280s N = hist3 (D, [4 5]); 280s assert (N, N_exp); 280s ***** test 280s N_exp = [0 0 0 0 1 280s 0 0 0 0 1 280s 0 0 0 0 1 280s 1 1 1 1 93]; 280s 280s n = 100; 280s x = [1:n]'; 280s y = [n:-1:1]'; 280s D = [x y]; 280s C{1} = [1 1.7 3 4]; 280s C{2} = [1:5]; 280s N = hist3 (D, C); 280s assert (N, N_exp); 280s ***** test 280s D = [1 1; 3 1; 3 3; 3 1]; 280s [c, nn] = hist3 (D, {0:4, 0:4}); 280s exp_c = zeros (5); 280s exp_c([7 9 19]) = [1 2 1]; 280s assert (c, exp_c); 280s assert (nn, {0:4, 0:4}); 280s ***** test 280s for i = 10 280s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 280s endfor 280s ***** test 280s edge_1 = linspace (0, 10, 10); 280s edge_2 = linspace (0, 50, 10); 280s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 280s exp_c = zeros (10, 10); 280s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 280s assert (c, exp_c); 280s 280s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 280s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 280s ***** shared X 280s X = [ 280s 5 2 280s 5 3 280s 1 4 280s 5 3 280s 4 4 280s 1 2 280s 2 3 280s 3 3 280s 5 4 280s 5 3]; 280s ***** test 280s N = zeros (10); 280s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 280s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 280s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 280s ***** test 280s N = zeros (5, 7); 280s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 280s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 280s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 280s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 280s ***** test 280s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 280s C = {(2:5), (2.5:1:4.5)}; 280s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 280s ***** test 280s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 280s C = {(1.2:3.2), (0:5)}; 280s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 280s assert (nthargout ([1 2], @hist3, X, C), {N C}) 280s ***** test 280s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 280s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 280s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 280s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 280s assert (C, C_exp, eps*10^2) 280s ***** test 280s Xv = repmat ([1:10]', [1 2]); 280s 280s ## Test Centers 280s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 280s 280s N_exp = eye (6); 280s N_exp([1 end]) = 3; 280s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 280s 280s N_exp = zeros (8, 6); 280s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 280s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 280s 280s ## Test Edges 280s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 280s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 280s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 280s 280s N_exp = zeros (14); 280s N_exp(3:12, 3:12) = eye (10); 280s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 280s 280s ## Test for Nbins 280s assert (hist3 (Xv), eye (10)) 280s assert (hist3 (Xv, [10 10]), eye (10)) 280s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 280s assert (hist3 (Xv, [5 5]), eye (5) * 2) 280s 280s N_exp = zeros (7, 5); 280s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 280s assert (hist3 (Xv, [7 5]), N_exp) 280s ***** test # bug #51059 280s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 280s [c, nn] = hist3 (D, {0:4, 0:4}); 280s exp_c = zeros (5); 280s exp_c([7 9 19]) = [1 2 1]; 280s assert (c, exp_c) 280s assert (nn, {0:4, 0:4}) 280s ***** test 280s [c, nn] = hist3 ([1 8]); 280s exp_c = zeros (10, 10); 280s exp_c(6, 6) = 1; 280s exp_nn = {-4:5, 3:12}; 280s assert (c, exp_c) 280s assert (nn, exp_nn, eps) 280s 280s [c, nn] = hist3 ([1 8], [10 11]); 280s exp_c = zeros (10, 11); 280s exp_c(6, 6) = 1; 280s exp_nn = {-4:5, 3:13}; 280s assert (c, exp_c) 280s assert (nn, exp_nn, eps) 280s ***** test 280s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 280s exp_c = zeros (10, 10); 280s exp_c(2, 1) = 1; 280s exp_c(8, 10) = 1; 280s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 280s assert (c, exp_c) 280s assert (nn, exp_nn, eps*100) 280s ***** test 280s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 280s exp_c = zeros (10, 10); 280s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 280s assert (c, exp_c) 280s assert (nn, exp_nn, eps*100) 280s ***** test 280s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 280s exp_c = zeros (10, 10); 280s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 280s assert (c, exp_c) 280s assert (nn, exp_nn, eps*100) 280s 16 tests, 16 passed, 0 known failure, 0 skipped 280s [inst/anova1.m] 280s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/anova1.m 280s ***** demo 280s x = meshgrid (1:6); 280s randn ("seed", 15); # for reproducibility 280s x = x + normrnd (0, 1, 6, 6); 280s anova1 (x, [], 'off'); 280s ***** demo 280s x = meshgrid (1:6); 280s randn ("seed", 15); # for reproducibility 280s x = x + normrnd (0, 1, 6, 6); 280s [p, atab] = anova1(x); 280s ***** demo 280s x = ones (50, 4) .* [-2, 0, 1, 5]; 280s randn ("seed", 13); # for reproducibility 280s x = x + normrnd (0, 2, 50, 4); 280s groups = {"A", "B", "C", "D"}; 280s anova1 (x, groups); 280s ***** demo 280s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 280s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 280s anova1 (y(:), g(:), "on", "unequal"); 280s ***** test 280s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 280s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 280s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 280s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 280s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 280s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 280s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 280s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 280s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 280s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 280s group = [1:10] .* ones (10,10); 280s group = group(:); 280s [p, tbl] = anova1 (data, group, "off"); 280s assert (p, 0.022661, 1e-6); 280s assert (tbl{2,5}, 2.2969, 1e-4); 280s assert (tbl{2,3}, 9, 0); 280s assert (tbl{4,2}, 0.003903, 1e-6); 280s data = reshape (data, 10, 10); 280s [p, tbl, stats] = anova1 (data, [], "off"); 280s assert (p, 0.022661, 1e-6); 280s assert (tbl{2,5}, 2.2969, 1e-4); 280s assert (tbl{2,3}, 9, 0); 280s assert (tbl{4,2}, 0.003903, 1e-6); 280s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 280s N = 10 * ones (1, 10); 280s assert (stats.means, means, 1e-6); 280s assert (length (stats.gnames), 10, 0); 280s assert (stats.n, N, 0); 280s ***** test 280s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 280s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 280s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 280s assert (p, 0.00004163, 1e-6); 280s assert (tbl{2,5}, 22.573418, 1e-6); 280s assert (tbl{2,3}, 2, 0); 280s assert (tbl{3,3}, 14, 0); 280s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 280s assert (p, 0.00208877, 1e-8); 280s assert (tbl{2,5}, 15.523192, 1e-6); 280s assert (tbl{2,3}, 2, 0); 280s assert (tbl{2,4}, 7.5786897, 1e-6); 280s 2 tests, 2 passed, 0 known failure, 0 skipped 280s [inst/fullfact.m] 280s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fullfact.m 280s ***** demo 280s ## Full factorial design with 3 binary variables 280s fullfact (3) 280s ***** demo 280s ## Full factorial design with 3 ordinal variables 280s fullfact ([2, 3, 4]) 280s ***** error fullfact (); 280s ***** error fullfact (2, 5); 280s ***** error fullfact (2.5); 280s ***** error fullfact (0); 280s ***** error fullfact (-3); 280s ***** error fullfact (3+2i); 280s ***** error fullfact (Inf); 280s ***** error fullfact (NaN); 280s ***** error fullfact ([1, 2, -3]); 280s ***** error fullfact ([0, 1, 2]); 280s ***** error fullfact ([1, 2, NaN]); 280s ***** error fullfact ([1, 2, Inf]); 280s ***** test 280s A = fullfact (2); 280s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 280s ***** test 280s A = fullfact ([1, 2]); 280s assert (A, [1, 1; 1, 2]); 280s ***** test 280s A = fullfact ([1, 2, 4]); 280s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 280s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 280s assert (A, A_out); 280s 15 tests, 15 passed, 0 known failure, 0 skipped 280s [inst/regression_ftest.m] 280s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/regression_ftest.m 280s ***** error regression_ftest (); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 281s ***** error ... 281s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 281s ***** error ... 281s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 281s 18 tests, 18 passed, 0 known failure, 0 skipped 281s [inst/pdist2.m] 281s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/pdist2.m 281s ***** shared x, y, xx 281s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 281s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 281s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 281s ***** test 281s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 281s assert (pdist2 (x, y), d); 281s ***** test 281s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 281s 3.4641, 2.2361, 3.3166, 5.4772]; 281s i = [3, 1, 1, 1; 2, 3, 3, 2]; 281s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 281s 3.4641, 2.2361, 3.3166, 5.4772]; 281s i = [1, 2, 2, 3;2, 1, 1, 2]; 281s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s yy = [1 2 3;5 6 7;9 5 1]; 281s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 281s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 281s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 281s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s yy = [1 2 3;5 6 7;9 5 1]; 281s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 281s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 281s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s yy = [1 2 3;5 6 7;9 5 1]; 281s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 281s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 281s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 281s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 281s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 281s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 281s ***** test 281s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 281s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 281s i = [2, 2, 2; 3, 4, 4]; 281s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 281s i = [1, 1, 3; 4, 3, 1]; 281s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 281s assert ({D, I}, {d, i}, 1e-4); 281s ***** test 281s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 281s assert (pdist2 (x, y, "cityblock"), d); 281s ***** test 281s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 281s assert (pdist2 (x, y, "chebychev"), d); 281s ***** test 281s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 281s assert (pdist2 (x, y, "cosine"), d, 1e-4); 281s ***** test 281s yy = [1 2 3;5 6 7;9 5 1]; 281s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 281s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 281s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 281s assert ({D, I}, {d, i}, eps); 281s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 281s assert ({D, I}, {d, i}, eps); 281s ***** test 281s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 281s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 281s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 281s assert ({D, I}, {d, i}, eps); 281s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 281s assert ({D, I}, {d, i}, eps); 281s ***** test 281s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 281s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 281s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 281s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 281s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 281s assert ({D, I}, {d, i}); 281s ***** warning ... 281s pdist2 (xx, xx, "mahalanobis"); 281s ***** error pdist2 (1) 281s ***** error ... 281s pdist2 (ones (4, 5), ones (4)) 281s ***** error ... 281s pdist2 (ones (4, 2, 3), ones (3, 2)) 281s ***** error ... 281s pdist2 (ones (3), ones (3), "euclidean", "Largest") 281s ***** error ... 281s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 281s ***** error ... 281s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 281s ***** error ... 281s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 281s ***** error ... 281s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 281s ***** error ... 281s pdist2 (ones (3), ones (3), "seuclidean", 3) 281s ***** error ... 281s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 281s ***** error ... 281s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 281s ***** error ... 281s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 281s ***** error ... 281s pdist2 (ones (3), eye (3), "minkowski", 0) 281s ***** error ... 281s pdist2 (ones (3), eye (3), "minkowski", -5) 281s ***** error ... 281s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 281s ***** error ... 281s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 281s ***** error ... 281s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 281s 33 tests, 33 passed, 0 known failure, 0 skipped 281s [inst/isoutlier.m] 281s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/isoutlier.m 281s ***** demo 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s TF = isoutlier (A, "mean") 281s ***** demo 281s ## Use a moving detection method to detect local outliers in a sine wave 281s 281s x = -2*pi:0.1:2*pi; 281s A = sin(x); 281s A(47) = 0; 281s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 281s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 281s plot (time, A) 281s hold on 281s plot (time(TF), A(TF), "x") 281s datetick ('x', 20, 'keepticks') 281s legend ("Original Data", "Outlier Data") 281s ***** demo 281s ## Locate an outlier in a vector of data and visualize the outlier 281s 281s x = 1:10; 281s A = [60 59 49 49 58 100 61 57 48 58]; 281s [TF, L, U, C] = isoutlier (A); 281s plot (x, A); 281s hold on 281s plot (x(TF), A(TF), "x"); 281s xlim ([1,10]); 281s line ([1,10], [L, L], "Linestyle", ":"); 281s text (1.1, L-2, "Lower Threshold"); 281s line ([1,10], [U, U], "Linestyle", ":"); 281s text (1.1, U-2, "Upper Threshold"); 281s line ([1,10], [C, C], "Linestyle", ":"); 281s text (1.1, C-3, "Center Value"); 281s legend ("Original Data", "Outlier Data"); 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 281s assert (isoutlier (A, "median"), ... 281s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "mean"); 281s assert (L, -109.2459044922864, 1e-12) 281s assert (U, 264.9792378256198, 1e-12) 281s assert (C, 77.8666666666666, 1e-12) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "median"); 281s assert (L, 50.104386688966386, 1e-12) 281s assert (U, 67.895613311033610, 1e-12) 281s assert (C, 59) 281s ***** test 281s A = magic(5) + diag(200*ones(1,5)); 281s T = logical (eye (5)); 281s assert (isoutlier (A, 2), T) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 281s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 281s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 281s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 281s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 281s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 281s assert (L, l, 1e-4) 281s assert (U, u, 1e-4) 281s assert (C, c) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 281s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 281s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 281s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 281s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 281s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 281s assert (L, l, 1e-4) 281s assert (U, u, 1e-4) 281s assert (C, c) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "movmean", 5); 281s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 281s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 281s 52.5979, 51.0627]; 281s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 281s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 281s 66.9373]; 281s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 281s 60.6, 59.8, 59.25, 59]; 281s assert (L, l, 1e-4) 281s assert (U, u, 1e-4) 281s assert (C, c, 1e-4) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 281s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 281s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 281s 52.5979, 51.0627]; 281s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 281s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 281s 66.9373]; 281s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 281s 60.6, 59.8, 59.25, 59]; 281s assert (L, l, 1e-4) 281s assert (U, u, 1e-4) 281s assert (C, c, 1e-4) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "gesd"); 281s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 34.235977035439944, 1e-12) 281s assert (U, 89.764022964560060, 1e-12) 281s assert (C, 62) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 281s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 31.489256770616173, 1e-12) 281s assert (U, 92.510743229383820, 1e-12) 281s assert (C, 62) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 281s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 23.976664158788935, 1e-12) 281s assert (U, 100.02333584121110, 1e-12) 281s assert (C, 62) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "grubbs"); 281s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 54.642809574646606, 1e-12) 281s assert (U, 63.511036579199555, 1e-12) 281s assert (C, 59.076923076923080, 1e-12) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 281s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 54.216083184201850, 1e-12) 281s assert (U, 63.937762969644310, 1e-12) 281s assert (C, 59.076923076923080, 1e-12) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 281s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 281s assert (L, 57) 281s assert (U, 100) 281s assert (C, 78.5) 281s ***** test 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 281s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 281s assert (L, 57.5) 281s assert (U, 62) 281s assert (C, 59.75) 281s ***** shared A 281s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 281s ***** error ... 281s isoutlier (A, "movmedian", 0); 281s ***** error ... 281s isoutlier (A, "movmedian", []); 281s ***** error ... 281s isoutlier (A, "movmedian", [2 3 4]); 281s ***** error ... 281s isoutlier (A, "movmedian", 1.4); 281s ***** error ... 281s isoutlier (A, "movmedian", [0 1]); 281s ***** error ... 281s isoutlier (A, "movmedian", [2 -1]); 281s ***** error ... 281s isoutlier (A, "movmedian", {2 3}); 281s ***** error ... 281s isoutlier (A, "movmedian", "char"); 281s 281s ***** error ... 281s isoutlier (A, "movmean", 0); 281s ***** error ... 281s isoutlier (A, "movmean", []); 281s ***** error ... 281s isoutlier (A, "movmean", [2 3 4]); 281s ***** error ... 281s isoutlier (A, "movmean", 1.4); 281s ***** error ... 281s isoutlier (A, "movmean", [0 1]); 281s ***** error ... 281s isoutlier (A, "movmean", [2 -1]); 281s ***** error ... 281s isoutlier (A, "movmean", {2 3}); 281s ***** error ... 281s isoutlier (A, "movmean", "char"); 281s 281s ***** error ... 281s isoutlier (A, "percentiles", [-1 90]); 281s ***** error ... 281s isoutlier (A, "percentiles", [10 -90]); 281s ***** error ... 281s isoutlier (A, "percentiles", [90]); 281s ***** error ... 281s isoutlier (A, "percentiles", [90 20]); 281s ***** error ... 281s isoutlier (A, "percentiles", [90 20]); 281s ***** error ... 281s isoutlier (A, "percentiles", [10 20 90]); 281s ***** error ... 281s isoutlier (A, "percentiles", {10 90}); 281s ***** error ... 281s isoutlier (A, "percentiles", "char"); 281s 281s ***** error ... 281s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "SamplePoints", 15); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 281s 281s ***** error ... 281s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 281s ***** error ... 281s isoutlier (A, "gesd", "ThresholdFactor", 3); 281s ***** error ... 281s isoutlier (A, "grubbs", "ThresholdFactor", 3); 281s 281s ***** error ... 281s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 281s ***** error ... 281s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 281s 281s ***** error ... 281s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 281s ***** error isoutlier (A, {1}); 281s ***** error isoutlier (A, true); 281s ***** error isoutlier (A, false); 281s ***** error isoutlier (A, 0); 281s ***** error isoutlier (A, [1 2]); 281s ***** error isoutlier (A, -2); 281s 59 tests, 59 passed, 0 known failure, 0 skipped 281s [inst/nanmax.m] 281s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/nanmax.m 281s ***** demo 281s ## Find the column maximum values and their indices 281s ## for matrix data with missing values. 281s 281s x = magic (3); 281s x([1, 6:9]) = NaN 281s [y, ind] = nanmax (x) 281s ***** demo 281s ## Find the maximum of all the values in an array, ignoring missing values. 281s ## Create a 2-by-5-by-3 array x with some missing values. 281s 281s x = reshape (1:30, [2, 5, 3]); 281s x([10:12, 25]) = NaN 281s 281s ## Find the maximum of the elements of x. 281s 281s y = nanmax (x, [], 'all') 281s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 281s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 281s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 281s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 281s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 281s ***** shared x, y 281s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 281s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 281s y = x; 281s y(2,3,1) = 0.51; 281s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 281s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 281s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 281s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 281s ***** assert (nanmax (x, [], 'all'), 6.77) 281s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 281s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 281s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 281s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 281s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 281s ***** test 281s xx = repmat ([1:20;6:25], [5 2 6 3]); 281s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 281s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 281s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 281s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 281s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 281s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 281s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 281s ***** assert (nanmax (magic (3), [], 3), magic (3)) 281s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 281s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 282s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 282s ***** error ... 282s nanmax (y, [], [1, 1, 2]) 282s ***** error ... 282s [v, idx] = nanmax(x, y, [1 2]) 282s 24 tests, 24 passed, 0 known failure, 0 skipped 282s [inst/kruskalwallis.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/kruskalwallis.m 282s ***** demo 282s x = meshgrid (1:6); 282s x = x + normrnd (0, 1, 6, 6); 282s kruskalwallis (x, [], 'off'); 282s ***** demo 282s x = meshgrid (1:6); 282s x = x + normrnd (0, 1, 6, 6); 282s [p, atab] = kruskalwallis(x); 282s ***** demo 282s x = ones (30, 4) .* [-2, 0, 1, 5]; 282s x = x + normrnd (0, 2, 30, 4); 282s group = {"A", "B", "C", "D"}; 282s kruskalwallis (x, group); 282s ***** test 282s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 282s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 282s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 282s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 282s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 282s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 282s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 282s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 282s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 282s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 282s group = [1:10] .* ones (10,10); 282s group = group(:); 282s [p, tbl] = kruskalwallis (data, group, "off"); 282s assert (p, 0.048229, 1e-6); 282s assert (tbl{2,5}, 17.03124, 1e-5); 282s assert (tbl{2,3}, 9, 0); 282s assert (tbl{4,2}, 82655.5, 1e-16); 282s data = reshape (data, 10, 10); 282s [p, tbl, stats] = kruskalwallis (data, [], "off"); 282s assert (p, 0.048229, 1e-6); 282s assert (tbl{2,5}, 17.03124, 1e-5); 282s assert (tbl{2,3}, 9, 0); 282s assert (tbl{4,2}, 82655.5, 1e-16); 282s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 282s N = 10 * ones (1, 10); 282s assert (stats.meanranks, means, 1e-6); 282s assert (length (stats.gnames), 10, 0); 282s assert (stats.n, N, 0); 282s 1 test, 1 passed, 0 known failure, 0 skipped 282s [inst/gscatter.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/gscatter.m 282s ***** demo 282s load fisheriris; 282s X = meas(:,3:4); 282s cidcs = kmeans (X, 3, "Replicates", 5); 282s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 282s title ("Fisher's iris data"); 282s ***** shared visibility_setting 282s visibility_setting = get (0, "DefaultFigureVisible"); 282s ***** test 282s hf = figure ("visible", "off"); 282s unwind_protect 282s load fisheriris; 282s X = meas(:,3:4); 282s cidcs = kmeans (X, 3, "Replicates", 5); 282s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 282s title ("Fisher's iris data"); 282s unwind_protect_cleanup 282s close (hf); 282s end_unwind_protect 282s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 282s ***** error gscatter (); 282s ***** error gscatter ([1]); 282s ***** error gscatter ([1], [2]); 282s ***** error gscatter ('abc', [1 2 3], [1]); 282s ***** error gscatter ([1 2 3], [1 2], [1]); 282s ***** error gscatter ([1 2 3], 'abc', [1]); 282s ***** error gscatter ([1 2], [1 2], [1]); 282s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 282s 9 tests, 9 passed, 0 known failure, 0 skipped 282s [inst/cholcov.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cholcov.m 282s ***** demo 282s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 282s T = cholcov (C1) 282s C2 = T'*T 282s ***** test 282s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 282s T = cholcov (C1); 282s assert (C1, T'*T, 1e-15 * ones (size (C1))); 282s 1 test, 1 passed, 0 known failure, 0 skipped 282s [inst/rmmissing.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/rmmissing.m 282s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 282s ***** assert (rmmissing ('abcd f'), 'abcdf') 282s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 282s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 282s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 282s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 282s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 282s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 282s ***** test 282s x = [1:6]; 282s x([2,4]) = NaN; 282s [~, idx] = rmmissing (x); 282s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 282s assert (class(idx), 'logical'); 282s x = reshape (x, [2, 3]); 282s [~, idx] = rmmissing (x); 282s assert (idx, logical ([0; 1])); 282s assert (class(idx), 'logical'); 282s [~, idx] = rmmissing (x, 2); 282s assert (idx, logical ([1, 1, 0])); 282s assert (class(idx), 'logical'); 282s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 282s assert (idx, logical ([0; 1])); 282s assert (class(idx), 'logical'); 282s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 282s assert (idx, logical ([0, 0, 0])); 282s assert (class(idx), 'logical'); 282s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 282s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 282s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 282s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 282s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 282s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 282s ***** assert (rmmissing ([]), []) 282s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 282s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 282s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 282s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 282s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 282s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 282s ***** error rmmissing (ones (0,1,2)) 282s ***** error rmmissing () 282s ***** error rmmissing (ones(2,2,2)) 282s ***** error rmmissing ([1 2; 3 4], 5) 282s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 282s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 282s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 282s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 282s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 282s 31 tests, 31 passed, 0 known failure, 0 skipped 282s [inst/glmfit.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/glmfit.m 282s ***** demo 282s rand ("seed", 1); 282s X = rand (100, 1); 282s b_true = [0.5; -1.2]; 282s mu = exp (b_true(1) + b_true(2) * X); 282s randp ("seed", 1); 282s y = poissrnd (mu); 282s ## Fit a GLM model using the poisson distribution 282s [b,dev] = glmfit (X, y, 'poisson'); 282s ***** demo 282s x = [2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300]'; 282s n = [48 42 31 34 31 21 23 23 21 16 17 21]'; 282s y = [1 2 0 3 8 8 14 17 19 15 17 21]'; 282s [b,dev] = glmfit (x,[y n],'binomial','Link','probit'); 282s ***** test 282s rand ("seed", 1); 282s X = rand (50, 1); 282s b_true = [0.4; 1.5]; 282s mu_true = exp (b_true(1) + b_true(2) * X); 282s randp ("seed", 1); 282s y = poissrnd (mu_true); 282s b = glmfit (X, y, "poisson", "link", "log"); 282s assert (b(1), b_true(1), 0.5); 282s assert (b(2), b_true(2), 0.5); 282s ***** test 282s rand ("seed", 1); 282s X1 = rand (50, 1); 282s X2 = rand (50, 1) * 0.5; 282s b_true = [0.4; 1.5; -0.7]; 282s mu_true = exp (b_true(1) + b_true(2) * X1 + b_true(3) * X2); 282s randp ("seed", 1); 282s y = poissrnd(mu_true); 282s [b, dev] = glmfit ([X1, X2], y, "poisson", "link", "log"); 282s assert (b(1), b_true(1), 1); 282s assert (b(2), b_true(2), 1); 282s assert (b(3), b_true(3), 1); 282s assert (dev < 60, true); 282s ***** error glmfit () 282s ***** error glmfit (1) 282s ***** error glmfit (1, 2) 282s ***** error ... 282s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 282s ***** error ... 282s glmfit ('abc', rand (6, 1), 'poisson') 282s ***** error ... 282s glmfit (rand (5, 2), 'abc', 'poisson') 282s ***** error ... 282s glmfit (rand (5, 2), rand (6, 1), 'poisson') 282s ***** error ... 282s glmfit (rand (6, 2), rand (6, 1), 3) 282s ***** error ... 282s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 282s ***** error ... 282s glmfit (rand (5, 2), rand (5, 3), 'binomial') 282s ***** error ... 282s glmfit (rand (5, 2), rand (5, 2), 'normal') 282s ***** error ... 282s glmfit (rand (5, 2), rand (5, 1), 'gamma') 282s ***** error ... 282s glmfit (rand (5, 2), rand (5, 1), 'inverse gaussian') 282s ***** error ... 282s glmfit (rand (5, 2), rand (5, 1), 'loguniform') 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log','dfv','dfgvd'}) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@log, 'derivative', @exp}) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@exp, @log, @(x) eye(e)}) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 2) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 0) 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 'asda') 282s ***** error ... 282s glmfit (rand(5,2), rand(5,1), 'poisson', 'param', 'log', 'constant', 'on') 282s 26 tests, 26 passed, 0 known failure, 0 skipped 282s [inst/boxplot.m] 282s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/boxplot.m 282s ***** demo 282s axis ([0, 3]); 282s randn ("seed", 1); # for reproducibility 282s girls = randn (10, 1) * 5 + 140; 282s randn ("seed", 2); # for reproducibility 282s boys = randn (13, 1) * 8 + 135; 282s boxplot ({girls, boys}); 282s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 282s title ("Grade 3 heights"); 282s ***** demo 282s randn ("seed", 7); # for reproducibility 282s A = randn (10, 1) * 5 + 140; 282s randn ("seed", 8); # for reproducibility 282s B = randn (25, 1) * 8 + 135; 282s randn ("seed", 9); # for reproducibility 282s C = randn (20, 1) * 6 + 165; 282s data = [A; B; C]; 282s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 282s labels = {"Team A", "Team B", "Team C"}; 282s pos = [2, 1, 3]; 282s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 282s "OutlierTags", "on", "BoxStyle", "filled"); 282s title ("Example of Group splitting with paired vectors"); 282s ***** demo 282s randn ("seed", 1); # for reproducibility 282s data = randn (100, 9); 282s boxplot (data, "notch", "on", "boxstyle", "filled", ... 282s "colors", "ygcwkmb", "whisker", 1.2); 282s title ("Example of different colors specified with characters"); 282s ***** demo 282s randn ("seed", 5); # for reproducibility 282s data = randn (100, 13); 282s colors = [0.7 0.7 0.7; ... 282s 0.0 0.4 0.9; ... 282s 0.7 0.4 0.3; ... 282s 0.7 0.1 0.7; ... 282s 0.8 0.7 0.4; ... 282s 0.1 0.8 0.5; ... 282s 0.9 0.9 0.2]; 282s boxplot (data, "notch", "on", "boxstyle", "filled", ... 282s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 282s title ("Example of different colors specified as RGB values"); 282s ***** error boxplot ("a") 282s ***** error boxplot ({[1 2 3], "a"}) 282s ***** error boxplot ([1 2 3], 1, {2, 3}) 282s ***** error boxplot ([1 2 3], {"a", "b"}) 282s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 282s ***** error boxplot ([1:10], "notch", i) 282s ***** error boxplot ([1:10], "notch", {}) 282s ***** error boxplot (1, "symbol", 1) 282s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 282s ***** error boxplot (1, "orientation", {}) 282s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 282s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 282s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 282s ***** error boxplot (3, "OutlierTags", {}) 282s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 282s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 282s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 282s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 282s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 282s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 282s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 282s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 282s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 282s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 282s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 282s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 282s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 282s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 282s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 282s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 282s ***** error boxplot (rand (3, 3), [1 2]) 282s ***** test 282s hf = figure ("visible", "off"); 282s unwind_protect 282s [a, b] = boxplot (rand (10, 3)); 282s assert (size (a), [7, 3]); 282s assert (numel (b.box), 3); 282s assert (numel (b.whisker), 12); 282s assert (numel (b.median), 3); 282s unwind_protect_cleanup 282s close (hf); 282s end_unwind_protect 283s ***** test 283s hf = figure ("visible", "off"); 283s unwind_protect 283s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 283s assert (numel (b.box_fill), 3); 283s unwind_protect_cleanup 283s close (hf); 283s end_unwind_protect 283s ***** test 283s hf = figure ("visible", "off"); 283s unwind_protect 283s hold on 283s [a, b] = boxplot (rand (10, 3)); 283s assert (ishold, true); 283s unwind_protect_cleanup 283s close (hf); 283s end_unwind_protect 283s 34 tests, 34 passed, 0 known failure, 0 skipped 283s [inst/friedman.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/friedman.m 283s ***** demo 283s load popcorn; 283s friedman (popcorn, 3); 283s ***** demo 283s load popcorn; 283s [p, atab] = friedman (popcorn, 3, "off"); 283s disp (p); 283s ***** test 283s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 283s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 283s [p, atab] = friedman (popcorn, 3, "off"); 283s assert (p, 0.001028853354594794, 1e-14); 283s assert (atab{2,2}, 99.75, 1e-14); 283s assert (atab{2,3}, 2, 0); 283s assert (atab{2,4}, 49.875, 1e-14); 283s assert (atab{2,5}, 13.75862068965517, 1e-14); 283s assert (atab{2,6}, 0.001028853354594794, 1e-14); 283s assert (atab{3,2}, 0.08333333333333215, 1e-14); 283s assert (atab{3,4}, 0.04166666666666607, 1e-14); 283s assert (atab{4,3}, 12, 0); 283s ***** test 283s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 283s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 283s [p, atab, stats] = friedman (popcorn, 3, "off"); 283s assert (atab{5,2}, 116, 0); 283s assert (atab{5,3}, 17, 0); 283s assert (stats.source, "friedman"); 283s assert (stats.n, 2); 283s assert (stats.meanranks, [8, 4.75, 2.25], 0); 283s assert (stats.sigma, 2.692582403567252, 1e-14); 283s 2 tests, 2 passed, 0 known failure, 0 skipped 283s [inst/randsample.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/randsample.m 283s ***** test 283s n = 20; 283s k = 5; 283s x = randsample(n, k); 283s assert (size(x), [1 k]); 283s x = randsample(n, k, true); 283s assert (size(x), [1 k]); 283s x = randsample(n, k, false); 283s assert (size(x), [1 k]); 283s x = randsample(n, k, true, ones(n, 1)); 283s assert (size(x), [1 k]); 283s x = randsample(1:n, k); 283s assert (size(x), [1 k]); 283s x = randsample(1:n, k, true); 283s assert (size(x), [1 k]); 283s x = randsample(1:n, k, false); 283s assert (size(x), [1 k]); 283s x = randsample(1:n, k, true, ones(n, 1)); 283s assert (size(x), [1 k]); 283s x = randsample((1:n)', k); 283s assert (size(x), [k 1]); 283s x = randsample((1:n)', k, true); 283s assert (size(x), [k 1]); 283s x = randsample((1:n)', k, false); 283s assert (size(x), [k 1]); 283s x = randsample((1:n)', k, true, ones(n, 1)); 283s assert (size(x), [k 1]); 283s n = 10; 283s k = 100; 283s x = randsample(n, k, true, 1:n); 283s assert (size(x), [1 k]); 283s x = randsample((1:n)', k, true); 283s assert (size(x), [k 1]); 283s x = randsample(k, k, false, 1:k); 283s assert (size(x), [1 k]); 283s 1 test, 1 passed, 0 known failure, 0 skipped 283s [inst/runstest.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/runstest.m 283s ***** test 283s ## NIST beam deflection data 283s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 283s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 283s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 283s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 283s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 283s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 283s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 283s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 283s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 283s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 283s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 283s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 283s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 283s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 283s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 283s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 283s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 283s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 283s [h, p, stats] = runstest (data, median (data)); 283s expected_h = 1; 283s expected_p = 0.008562; 283s expected_z = 2.6229; 283s assert (h, expected_h); 283s assert (p, expected_p, 1E-6); 283s assert (stats.z, expected_z, 1E-4); 283s ***** shared x 283s x = [45, -60, 1.225, 55.4, -9 27]; 283s ***** test 283s [h, p, stats] = runstest (x); 283s assert (h, 0); 283s assert (p, 0.6, 1e-14); 283s assert (stats.nruns, 5); 283s assert (stats.n1, 3); 283s assert (stats.n0, 3); 283s assert (stats.z, 0.456435464587638, 1e-14); 283s ***** test 283s [h, p, stats] = runstest (x, [], "method", "approximate"); 283s assert (h, 0); 283s assert (p, 0.6481, 1e-4); 283s assert (stats.z, 0.456435464587638, 1e-14); 283s ***** test 283s [h, p, stats] = runstest (x, [], "tail", "left"); 283s assert (h, 0); 283s assert (p, 0.9, 1e-14); 283s assert (stats.z, 1.369306393762915, 1e-14); 283s ***** error runstest (ones (2,20)) 283s ***** error runstest (["asdasda"]) 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], "updown") 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "method", "some") 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 283s ***** error ... 283s runstest ([2 3 4 3 2 3 4], [], "option", "some") 283s 14 tests, 14 passed, 0 known failure, 0 skipped 283s [inst/clusterdata.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/clusterdata.m 283s ***** demo 283s randn ("seed", 1) # for reproducibility 283s r1 = randn (10, 2) * 0.25 + 1; 283s randn ("seed", 5) # for reproducibility 283s r2 = randn (20, 2) * 0.5 - 1; 283s X = [r1; r2]; 283s 283s wnl = warning ("off", "Octave:linkage_savemem", "local"); 283s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 283s scatter (X(:,1), X(:,2), 36, T, "filled"); 283s ***** error ... 283s clusterdata () 283s ***** error ... 283s clusterdata (1) 283s ***** error clusterdata ([1 1], "Bogus", 1) 283s ***** error clusterdata ([1 1], "Depth", 1) 283s 4 tests, 4 passed, 0 known failure, 0 skipped 283s [inst/Clustering/ClusterCriterion.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Clustering/ClusterCriterion.m 283s ***** error ... 283s ClusterCriterion ("1", "kmeans", [1:6]) 283s ***** error ... 283s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 283s ***** error ... 283s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 283s ***** error ... 283s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 283s 4 tests, 4 passed, 0 known failure, 0 skipped 283s [inst/Clustering/GapEvaluation.m] 283s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Clustering/GapEvaluation.m 283s ***** test 283s load fisheriris 283s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 283s "referencedistribution", "uniform"); 283s assert (class (eva), "GapEvaluation"); 286s 1 test, 1 passed, 0 known failure, 0 skipped 286s [inst/Clustering/SilhouetteEvaluation.m] 286s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Clustering/SilhouetteEvaluation.m 286s ***** test 286s load fisheriris 286s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 286s assert (class (eva), "SilhouetteEvaluation"); 287s 1 test, 1 passed, 0 known failure, 0 skipped 287s [inst/Clustering/DaviesBouldinEvaluation.m] 287s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Clustering/DaviesBouldinEvaluation.m 287s ***** test 287s load fisheriris 287s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 287s assert (class (eva), "DaviesBouldinEvaluation"); 287s 1 test, 1 passed, 0 known failure, 0 skipped 287s [inst/Clustering/CalinskiHarabaszEvaluation.m] 287s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Clustering/CalinskiHarabaszEvaluation.m 287s ***** test 287s load fisheriris 287s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 287s assert (class (eva), "CalinskiHarabaszEvaluation"); 287s 1 test, 1 passed, 0 known failure, 0 skipped 287s [inst/stepwisefit.m] 287s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/stepwisefit.m 287s ***** test 287s % Sample data from Draper and Smith (n = 13, k = 4) 287s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 287s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 287s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 287s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 287s 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]'; 287s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 287s assert(X_use, [4 1]) 287s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 287s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 287s assert(X_use, [4 1]) 287s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 287s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 287s assert(X_use, [4 1]) 287s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 287s 1 test, 1 passed, 0 known failure, 0 skipped 287s [inst/ttest.m] 287s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ttest.m 287s ***** test 287s x = 8:0.1:12; 287s [h, pval, ci] = ttest (x, 10); 287s assert (h, 0) 287s assert (pval, 1, 10*eps) 287s assert (ci, [9.6219 10.3781], 1E-5) 287s [h, pval, ci0] = ttest (x, 0); 287s assert (h, 1) 287s assert (pval, 0) 287s assert (ci0, ci, 2e-15) 287s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 287s assert (h, 0) 287s assert (pval, 0.5, 10*eps) 287s assert (ci, [9.68498 Inf], 1E-5) 287s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 287s ***** error ttest ([8:0.1:12], 10, "tail", 25); 287s 3 tests, 3 passed, 0 known failure, 0 skipped 287s [inst/mcnemar_test.m] 287s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/mcnemar_test.m 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 287s assert (h, 1); 287s assert (pval, 3.8151e-06, 1e-10); 287s assert (chisq, 21.356, 1e-3); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 287s assert (h, 1); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 287s assert (h, 0); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 287s assert (h, 1); 287s assert (pval, 0.034690, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 287s assert (h, 1); 287s assert (pval, 0.033006, 1e-6); 287s assert (chisq, 4.5455, 1e-4); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 287s assert (h, 0); 287s assert (pval, 0.052479, 1e-6); 287s assert (isempty (chisq), true); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 287s assert (h, 0); 287s assert (pval, 0.055009, 1e-6); 287s assert (chisq, 3.6818, 1e-4); 287s ***** test 287s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 287s assert (h, 1); 287s assert (pval, 0.055009, 1e-6); 287s assert (chisq, 3.6818, 1e-4); 287s ***** error mcnemar_test (59, 6, 16, 80) 287s ***** error mcnemar_test (ones (3, 3)) 287s ***** error ... 287s mcnemar_test ([59,6;16,-80]) 287s ***** error ... 287s mcnemar_test ([59,6;16,4.5]) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], {""}) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], -0.2) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], 1) 287s ***** error ... 287s mcnemar_test ([59,6;16,80], "") 288s 17 tests, 17 passed, 0 known failure, 0 skipped 288s [inst/hmmviterbi.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hmmviterbi.m 288s ***** test 288s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 288s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 288s transprob = [0.8, 0.2; 0.4, 0.6]; 288s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 288s vpath = hmmviterbi (sequence, transprob, outprob); 288s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 288s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 288s assert (vpath, expected); 288s ***** test 288s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 288s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 288s transprob = [0.8, 0.2; 0.4, 0.6]; 288s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 288s symbols = {"A", "B", "C"}; 288s statenames = {"One", "Two"}; 288s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 288s "statenames", statenames); 288s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 288s "One", "One", "One", "One", "One", "One", "One", "Two", ... 288s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 288s assert (vpath, expected); 288s 2 tests, 2 passed, 0 known failure, 0 skipped 288s [inst/sigma_pts.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/sigma_pts.m 288s ***** demo 288s K = [1 0.5; 0.5 1]; # covaraince matrix 288s # calculate and build associated ellipse 288s [R,S,~] = svd (K); 288s theta = atan2 (R(2,1), R(1,1)); 288s v = sqrt (diag (S)); 288s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 288s t = linspace (0, 2*pi, 100).'; 288s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 288s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 288s 288s figure(1); clf; hold on 288s # Plot ellipse and axes 288s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 288s plot (xe,ye,'-r'); 288s 288s col = 'rgb'; 288s l = [-1.8 -1 1.5]; 288s for li = 1:3 288s p = sigma_pts (2, [], K, l(li)); 288s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 288s p(1,1), p(1,2), ['o' col(li)]); 288s h(li) = tmp(1); 288s endfor 288s hold off 288s axis image 288s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 288s ***** test 288s p = sigma_pts (5); 288s assert (mean (p), zeros(1,5), sqrt(eps)); 288s assert (cov (p), eye(5), sqrt(eps)); 288s ***** test 288s m = randn(1, 5); 288s p = sigma_pts (5, m); 288s assert (mean (p), m, sqrt(eps)); 288s assert (cov (p), eye(5), sqrt(eps)); 288s ***** test 288s x = linspace (0,1,5); 288s K = exp (- (x.' - x).^2/ 0.5); 288s p = sigma_pts (5, [], K); 288s assert (mean (p), zeros(1,5), sqrt(eps)); 288s assert (cov (p), K, sqrt(eps)); 288s ***** error sigma_pts(2,1); 288s ***** error sigma_pts(2,[],1); 288s ***** error sigma_pts(2,1,1); 288s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 288s 7 tests, 7 passed, 0 known failure, 0 skipped 288s [inst/ztest2.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ztest2.m 288s ***** error ztest2 (); 288s ***** error ztest2 (1); 288s ***** error ztest2 (1, 2); 288s ***** error ztest2 (1, 2, 3); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha") 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha", 0); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha", 1.2); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha", "val"); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "tail", "val"); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 288s ***** error ... 288s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 288s 11 tests, 11 passed, 0 known failure, 0 skipped 288s [inst/nansum.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/nansum.m 288s ***** assert (nansum ([2 4 NaN 7]), 13) 288s ***** assert (nansum ([2 4 NaN Inf]), Inf) 288s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 288s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 288s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 288s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 288s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 288s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 288s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 288s 9 tests, 9 passed, 0 known failure, 0 skipped 288s [inst/kstest.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/kstest.m 288s ***** demo 288s ## Use the stock return data set to test the null hypothesis that the data 288s ## come from a standard normal distribution against the alternative 288s ## hypothesis that the population CDF of the data is larger that the 288s ## standard normal CDF. 288s 288s load stockreturns; 288s x = stocks(:,2); 288s [h, p, k, c] = kstest (x, "Tail", "larger") 288s 288s ## Compute the empirical CDF and plot against the standard normal CDF 288s [f, x_values] = ecdf (x); 288s h1 = plot (x_values, f); 288s hold on; 288s h2 = plot (x_values, normcdf (x_values), 'r--'); 288s set (h1, "LineWidth", 2); 288s set (h2, "LineWidth", 2); 288s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 288s "Location", "southeast"); 288s title ("Empirical CDF of stock return data against standard normal CDF") 288s ***** error kstest () 288s ***** error kstest (ones (2, 4)) 288s ***** error kstest ([2, 3, 5, 3+3i]) 288s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "tail") 288s ***** error ... 288s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "tail", 0) 288s ***** error ... 288s kstest ([2,3,4,5,6], "tail", "whatever") 288s ***** error ... 288s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 288s ***** error ... 288s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 288s ***** error ... 288s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 288s ***** error ... 288s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 288s ***** test 288s load examgrades 288s [h, p] = kstest (grades(:,1)); 288s assert (h, true); 288s assert (p, 7.58603305206105e-107, 1e-14); 288s ***** test 288s load examgrades 288s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 288s assert (h, false); 288s assert (p, 0.5612, 1e-4); 288s ***** test 288s load examgrades 288s x = grades(:,1); 288s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 288s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 288s assert (h, true); 288s assert (p, 0.0021, 1e-4); 288s ***** test 288s load stockreturns 288s x = stocks(:,3); 288s [h,p,k,c] = kstest (x, "Tail", "larger"); 288s assert (h, true); 288s assert (p, 5.085438806199252e-05, 1e-14); 288s assert (k, 0.2197, 1e-4); 288s assert (c, 0.1207, 1e-4); 288s 21 tests, 21 passed, 0 known failure, 0 skipped 288s [inst/histfit.m] 288s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/histfit.m 288s ***** demo 288s histfit (randn (100, 1)) 288s ***** demo 288s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 288s ***** demo 288s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 288s ***** test 288s hf = figure ("visible", "off"); 288s unwind_protect 288s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 288s histfit (x); 288s unwind_protect_cleanup 288s close (hf); 288s end_unwind_protect 288s ***** test 288s hf = figure ("visible", "off"); 288s unwind_protect 288s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 288s histfit (x); 288s unwind_protect_cleanup 288s close (hf); 288s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 289s histfit (x, 3); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s histfit (randn (100, 1)); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s ax = gca (); 289s histfit (ax, randn (100, 1)); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s ax = gca (); 289s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 289s ***** test 289s hf = figure ("visible", "off"); 289s unwind_protect 289s ax = gca (); 289s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 289s unwind_protect_cleanup 289s close (hf); 289s end_unwind_protect 290s ***** test 290s hf = figure ("visible", "off"); 290s unwind_protect 290s ax = axes ("parent", hf); 290s fail ("histfit (ax)", "histfit: too few input arguments."); 290s unwind_protect_cleanup 290s close (hf); 290s end_unwind_protect 290s ***** error ... 290s histfit ('wer') 290s ***** error histfit ([NaN, NaN, NaN]); 290s ***** error ... 290s histfit (randn (100, 1), 5.6) 290s ***** error ... 290s histfit (randn (100, 1), 8, 5) 290s ***** error ... 290s histfit (randn (100, 1), 8, {'normal'}) 290s ***** error ... 290s histfit (randn (100, 1), 8, 'Kernel') 290s ***** error ... 290s histfit (randn (100, 1), 8, 'ASDASDASD') 290s 17 tests, 17 passed, 0 known failure, 0 skipped 290s [inst/grpstats.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/grpstats.m 290s ***** demo 290s load carsmall; 290s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 290s n = length(m); 290s errorbar((1:n)',m,p(:,2)-m); 290s set (gca, "xtick", 1:n, "xticklabel", g); 290s title ("95% prediction intervals for mean weight by year"); 290s ***** demo 290s load carsmall; 290s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 290s {"mean", "meanci", "gname"}, 0.05) 290s [c,r] = size (m); 290s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 290s set (gca, "xtick", 1:c, "xticklabel", g); 290s title ("95% prediction intervals for mean weight by year"); 290s ***** test 290s load carsmall 290s means = grpstats (Acceleration, Origin); 290s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 290s ***** test 290s load carsmall 290s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 290s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 290s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 290s ***** test 290s load carsmall 290s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 290s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 290s ***** test 290s load carsmall 290s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 290s {"mean", "meanci", "gname"}, 0.05); 290s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 290s [1e-14, 2e-14, 1e-14]'); 290s 4 tests, 4 passed, 0 known failure, 0 skipped 290s [inst/normalise_distribution.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/normalise_distribution.m 290s ***** test 290s v = normalise_distribution ([1 2 3], [], 1); 290s assert (v, [0 0 0]) 290s ***** test 290s v = normalise_distribution ([1 2 3], [], 2); 290s assert (v, norminv ([1 3 5] / 6), 3 * eps) 290s ***** test 290s v = normalise_distribution ([1 2 3]', [], 2); 290s assert (v, [0 0 0]') 290s ***** test 290s v = normalise_distribution ([1 2 3]', [], 1); 290s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 290s ***** test 290s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 290s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 290s ***** test 290s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 290s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 290s ***** test 290s A = randn ( 10 ); 290s N = normalise_distribution (A, @normcdf); 290s assert (A, N, 10000 * eps) 290s ***** test 290s A = exprnd (1, 100); 290s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 290s assert (mean (vec (N)), 0, 0.1) 290s assert (std (vec (N)), 1, 0.1) 290s ***** test 290s A = rand (1000,1); 290s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 290s assert (mean (vec (N)), 0, 0.2) 290s assert (std (vec (N)), 1, 0.1) 290s ***** test 290s A = [rand(1000,1), randn(1000, 1)]; 290s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 290s assert (mean (N), [0, 0], 0.2) 290s assert (std (N), [1, 1], 0.1) 290s ***** test 290s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 290s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 290s assert (mean (N, 2), [0, 0, 0]', 0.2); 290s assert (std (N, [], 2), [1, 1, 1]', 0.1); 290s ***** xtest 290s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 290s N = normalise_distribution (A); 290s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 290s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 290s ***** test 290s ***** error normalise_distribution (zeros (3, 4), ... 290s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 290s 14 tests, 14 passed, 0 known failure, 0 skipped 290s [inst/cophenet.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cophenet.m 290s ***** demo 290s randn ("seed", 5) # for reproducibility 290s X = randn (10,2); 290s y = pdist (X); 290s Z = linkage (y, "average"); 290s cophenet (Z, y) 290s ***** error cophenet () 290s ***** error cophenet (1) 290s ***** error ... 290s cophenet (ones (2,2), 1) 290s ***** error ... 290s cophenet ([1 2 1], "a") 290s ***** error ... 290s cophenet ([1 2 1], [1 2]) 290s 5 tests, 5 passed, 0 known failure, 0 skipped 290s [inst/logit.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/logit.m 290s ***** test 290s p = [0.01:0.01:0.99]; 290s assert (logit (p), log (p ./ (1-p)), 25*eps); 290s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 290s ***** error logit () 290s ***** error logit (1, 2) 290s 4 tests, 4 passed, 0 known failure, 0 skipped 290s [inst/fitcsvm.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitcsvm.m 290s ***** demo 290s ## Use a subset of Fisher's iris data set 290s 290s load fisheriris 290s inds = ! strcmp (species, 'setosa'); 290s X = meas(inds, [3,4]); 290s Y = species(inds); 290s 290s ## Train a linear SVM classifier 290s SVMModel = fitcsvm (X, Y) 290s 290s ## Plot a scatter diagram of the data and circle the support vectors. 290s sv = SVMModel.SupportVectors; 290s figure 290s gscatter (X(:,1), X(:,2), Y) 290s hold on 290s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 290s legend ('versicolor', 'virginica', 'Support Vector') 290s hold off 290s ***** test 290s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 290s y = {"a"; "a"; "b"; "b"}; 290s a = fitcsvm (x, y); 290s assert (class (a), "ClassificationSVM"); 290s assert ({a.X, a.Y}, {x, y}) 290s assert (a.NumObservations, 4) 290s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 290s assert (a.ModelParameters.SVMtype, "c_svc") 290s assert (a.ClassNames, {"a"; "b"}) 290s ***** test 290s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 290s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 290s a = fitcsvm (x, y); 290s assert (class (a), "ClassificationSVM"); 290s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 290s assert (a.ModelParameters.BoxConstraint, 1) 290s assert (a.ModelParameters.KernelOffset, 0) 290s assert (a.ClassNames, [1; -1]) 290s ***** test 290s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 290s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 290s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 290s "KernelOffset", 2); 290s assert (class (a), "ClassificationSVM"); 290s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 290s assert (a.ModelParameters.BoxConstraint, 2) 290s assert (a.ModelParameters.KernelOffset, 2) 290s assert (isempty (a.Alpha), true) 290s assert (isempty (a.Beta), false) 290s ***** test 290s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 290s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 290s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 290s assert (class (a), "ClassificationSVM"); 290s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 290s assert (a.ModelParameters.PolynomialOrder, 3) 290s assert (isempty (a.Alpha), true) 290s assert (isempty (a.Beta), false) 290s ***** test 290s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 290s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 290s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 290s assert (class (a), "ClassificationSVM"); 290s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 290s assert (a.ModelParameters.PolynomialOrder, 3) 290s assert (isempty (a.Alpha), false) 290s assert (isempty (a.Beta), true) 290s ***** test 290s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 290s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 290s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 290s assert (class (a), "ClassificationPartitionedModel"); 290s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 290s assert (a.ModelParameters.PolynomialOrder, 3) 290s assert (isempty (a.Trained{1}.Alpha), false) 290s assert (isempty (a.Trained{1}.Beta), true) 290s ***** error fitcsvm () 290s ***** error fitcsvm (ones (4,1)) 290s ***** error 290s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 290s ***** error 290s fitcsvm (ones (4,2), ones (3, 1)) 290s ***** error 290s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 290s ***** error 290s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 290s ***** error 290s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 290s ***** error ... 290s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 290s 14 tests, 14 passed, 0 known failure, 0 skipped 290s [inst/pca.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/pca.m 290s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 290s ***** test 290s x=[7 4 3 290s 4 1 8 290s 6 3 5 290s 8 6 1 290s 8 5 7 290s 7 2 9 290s 5 3 3 290s 9 5 8 290s 7 4 5 290s 8 2 2]; 290s R = corrcoef (x); 290s [V, lambda] = eig (R); 290s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 290s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 290s ***** 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 290s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 290s F = zscore(x)*B; 290s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 290s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 290s ***** test 290s x=[1,2,3;2,1,3]'; 290s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 290s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 290s m(:,1) = m(:,1)*sign(COEFF(1,1)); 290s m(:,2) = m(:,2)*sign(COEFF(1,2)); 290s ***** assert(COEFF,m(1:2,:),10*eps); 290s ***** assert(SCORE,-m,10*eps); 290s ***** assert(latent,[1.5;.5],10*eps); 290s ***** assert(tsquare,[4;4;4]/3,10*eps); 290s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 290s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 290s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 290s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 290s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 290s !!!!! known failure 290s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 290s 290s Location | Observed | Expected | Reason 290s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 290s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 290s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 290s ***** test 290s x=x'; 290s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 290s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 290s m(:,1) = m(:,1)*sign(COEFF(1,1)); 290s m(:,2) = m(:,2)*sign(COEFF(1,2)); 290s m(:,3) = m(:,3)*sign(COEFF(3,3)); 290s ***** assert(COEFF,m,10*eps); 290s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 290s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 290s ***** assert(latent,[1;0;0],10*eps); 290s ***** assert(tsquare,[0.5;0.5],10*eps) 290s ***** test 290s [COEFF,SCORE,latent,tsquare] = pca(x); 290s ***** assert(COEFF,m(:, 1),10*eps); 290s ***** assert(SCORE,-m(1:2,1),10*eps); 290s ***** assert(latent,[1],10*eps); 290s ***** assert(tsquare,[0.5;0.5],10*eps) 290s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 290s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 290s ***** error pca([1 2; 3 4], "NumComponents", -4) 290s ***** error pca([1 2; 3 4], "Rows", 1) 290s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 290s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 290s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 290s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 290s ***** error pca([1 2; 3 4], "XXX", 1) 290s 32 tests, 31 passed, 1 known failure, 0 skipped 290s [inst/barttest.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/barttest.m 290s ***** error barttest () 290s ***** error barttest ([2,NaN;3,4]) 290s ***** error barttest (ones (30, 4), "alpha") 290s ***** error barttest (ones (30, 4), 0) 290s ***** error barttest (ones (30, 4), 1.2) 290s ***** error barttest (ones (30, 4), [0.2, 0.05]) 290s ***** error barttest (ones (30, 1)) 290s ***** error barttest (ones (30, 1), 0.05) 290s ***** test 290s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 290s [ndim, pval, chisq] = barttest (x); 290s assert (ndim, 2); 290s assert (pval, 0); 290s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 290s ***** test 290s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 290s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 290s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 290s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 290s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 290s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 290s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 290s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 290s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 290s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 290s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 290s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 290s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 290s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 290s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 290s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 290s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 290s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 290s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 290s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 290s [ndim, pval, chisq] = barttest (x); 290s assert (ndim, 3); 290s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 290s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 290s assert (chisq, chisq_out, 1e-4); 290s 10 tests, 10 passed, 0 known failure, 0 skipped 290s [inst/anovan.m] 290s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/anovan.m 290s ***** demo 290s 290s # Two-sample unpaired test on independent samples (equivalent to Student's 290s # t-test). Note that the absolute value of t-statistic can be obtained by 290s # taking the square root of the reported F statistic. In this example, 290s # t = sqrt (1.44) = 1.20. 290s 290s score = [54 23 45 54 45 43 34 65 77 46 65]'; 290s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 290s "female" "female" "female"}'; 290s 290s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 290s ***** demo 290s 290s # Two-sample paired test on dependent or matched samples equivalent to a 290s # paired t-test. As for the first example, the t-statistic can be obtained by 290s # taking the square root of the reported F statistic. Note that the interaction 290s # between treatment x subject was dropped from the full model by assigning 290s # subject as a random factor ('). 290s 290s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 290s treatment = {"before" "after"; "before" "after"; "before" "after"; 290s "before" "after"; "before" "after"}'; 290s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 290s 290s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 290s "model", "full", "random", 2, "sstype", 2, ... 290s "varnames", {"treatment", "subject"}, ... 290s "display", "on"); 290s ***** demo 290s 290s # One-way ANOVA on the data from a study on the strength of structural beams, 290s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 290s 290s strength = [82 86 79 83 84 85 86 87 74 82 ... 290s 78 75 76 77 79 79 77 78 82 79]'; 290s alloy = {"st","st","st","st","st","st","st","st", ... 290s "al1","al1","al1","al1","al1","al1", ... 290s "al2","al2","al2","al2","al2","al2"}'; 290s 290s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 290s "varnames", "alloy"); 290s ***** demo 290s 290s # One-way repeated measures ANOVA on the data from a study on the number of 290s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 290s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 290s # between seconds x subject was dropped from the full model by assigning 290s # subject as a random factor ('). 290s 290s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 290s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 290s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 290s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 290s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 290s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 290s 290s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 290s "model", "full", "random", 2, "sstype", 2, ... 290s "display", "on", "varnames", {"seconds", "subject"}); 290s ***** demo 290s 290s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 290s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 290s # New York: MacMillan 290s 290s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 290s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 290s brands = {"Gourmet", "National", "Generic"; ... 290s "Gourmet", "National", "Generic"; ... 290s "Gourmet", "National", "Generic"; ... 290s "Gourmet", "National", "Generic"; ... 290s "Gourmet", "National", "Generic"; ... 290s "Gourmet", "National", "Generic"}; 290s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 290s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 290s 290s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 290s "display", "on", "model", "full", ... 290s "varnames", {"brands", "popper"}); 290s ***** demo 290s 290s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 290s # gender and having a college degree on salaries of company employees, 290s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 290s 290s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 290s 25 29 27 19 18 21 20 21 22 19]'; 290s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 290s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 290s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 290s 290s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 290s "sstype", 3, "display", "on", "varnames", ... 290s {"gender", "degree"}); 290s ***** demo 290s 290s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 290s # adding sugar and/or milk on the tendency of coffee to make people babble, 290s # in from Navarro (2019): 16.10 290s 290s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 290s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 290s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 290s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 290s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 290s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 290s 290s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 290s "sstype", 3, "display", "on", ... 290s "varnames", {"sugar", "milk"}); 290s ***** demo 290s 290s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 290s # of three different drugs, biofeedback and diet on patient blood pressure, 290s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 290s # * Missing values introduced to make the sample sizes unequal to test the 290s # calculation of different types of sums-of-squares 290s 290s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 290s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 290s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 290s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 290s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 290s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 290s 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; 290s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 290s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 290s 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; 290s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 290s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 290s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 290s 173 194 197 190 176 198 164 190 169 164 176 175; 290s 186 194 201 215 219 209 164 166 159 182 187 174 ... 290s 189 194 217 206 199 195 171 173 196 199 180 NaN; 290s 180 187 199 170 204 194 162 184 183 156 180 173 ... 290s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 290s 290s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 290s "model", "full", "sstype", 3, ... 290s "display", "on", ... 290s "varnames", {"drug", "feedback", "diet"}); 290s ***** demo 290s 290s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 290s # factor. The data is from a randomized block design study on the effects 290s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 290s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 290s # Note that all interactions involving block were dropped from the full model 290s # by assigning block as a random factor ('). 290s 290s measurement = [444 614 423 625 408 856 447 719 ... 290s 764 831 586 782 609 1002 606 766]'; 290s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 290s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 290s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 290s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 290s 290s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 290s "sstype", 2, "model", "full", "random", 3, ... 290s "display", "on", ... 290s "varnames", {"strain", "treatment", "block"}); 290s ***** demo 290s 290s # One-way ANCOVA on data from a study of the additive effects of species 290s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 290s # Text eveR 290s 290s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 290s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 290s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 290s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 290s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 290s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 290s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 290s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 290s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 290s 290s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 290s "continuous", 2, "sstype", "h", "display", "on", ... 290s "varnames", {"species", "temp"}); 290s ***** demo 290s 290s # Factorial ANCOVA on data from a study of the effects of treatment and 290s # exercise on stress reduction score after adjusting for age. Data from R 290s # datarium package). 290s 290s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 290s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 290s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 290s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 290s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 290s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 290s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 290s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 290s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 290s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 290s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 290s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 290s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 290s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 290s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 290s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 290s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 290s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 290s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 290s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 290s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 290s 290s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 290s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 290s "continuous", 3, "sstype", "h", "display", "on", ... 290s "varnames", {"treatment", "exercise", "age"}); 290s ***** demo 290s 290s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 290s # relating to the contrasts are shown in the table of model parameters, and 290s # can be retrieved from the STATS.coeffs output. 290s 290s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 290s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 290s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 290s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 290s 25.694 ]'; 290s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 290s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 290s C = [ 0.4001601 0.3333333 0.5 0.0 290s 0.4001601 0.3333333 -0.5 0.0 290s 0.4001601 -0.6666667 0.0 0.0 290s -0.6002401 0.0000000 0.0 0.5 290s -0.6002401 0.0000000 0.0 -0.5]; 290s 290s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 290s "alpha", 0.05, "display", "on"); 290s ***** demo 290s 290s # One-way ANOVA with the linear model fit by weighted least squares to 290s # account for heteroskedasticity. In this example, the variance appears 290s # proportional to the outcome, so weights have been estimated by initially 290s # fitting the model without weights and regressing the absolute residuals on 290s # the fitted values. Although this data could have been analysed by Welch's 290s # ANOVA test, the approach here can generalize to ANOVA models with more than 290s # one factor. 290s 290s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 290s 2, 2, 2, 2, 2, 2, 2, 2, ... 290s 3, 3, 3, 3, 3, 3, 3, 3]'; 290s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 290s 10, 25, 66, 43, 47, 56, 6, 39, ... 290s 11, 39, 26, 35, 25, 14, 24, 17]'; 290s 290s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 290s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 290s b = polyfit (fitted, abs (STATS.resid), 1); 290s v = polyval (b, fitted); # Variance as a function of the fitted values 290s figure("Name", "Regression of the absolute residuals on the fitted values"); 290s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 290s xlabel("Fitted values"); ylabel("Absolute residuals"); 290s 290s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 290s ***** test 290s score = [54 23 45 54 45 43 34 65 77 46 65]'; 290s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 290s 'female' 'female' 'female'}'; 290s 290s [P, T, STATS] = anovan (score,gender,'display','off'); 290s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 290s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 290s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 290s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 290s ***** test 290s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 290s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 290s 'before' 'after'; 'before' 'after'}'; 290s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 290s 290s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 290s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 290s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 290s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 290s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 290s ***** test 290s strength = [82 86 79 83 84 85 86 87 74 82 ... 290s 78 75 76 77 79 79 77 78 82 79]'; 290s alloy = {'st','st','st','st','st','st','st','st', ... 290s 'al1','al1','al1','al1','al1','al1', ... 290s 'al2','al2','al2','al2','al2','al2'}'; 290s 290s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 290s assert (P(1), 0.000152643638830491, 1e-09); 290s assert (ATAB{2,6}, 15.4, 1e-09); 290s ***** test 290s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 290s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 290s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 290s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 290s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 290s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 290s 290s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 290s assert (P(1), 1.51865926758752e-07, 1e-09); 290s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 290s assert (ATAB{3,2}, 942.533333333333, 1e-09); 290s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 290s ***** test 290s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 290s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 290s brands = {'Gourmet', 'National', 'Generic'; ... 290s 'Gourmet', 'National', 'Generic'; ... 290s 'Gourmet', 'National', 'Generic'; ... 290s 'Gourmet', 'National', 'Generic'; ... 290s 'Gourmet', 'National', 'Generic'; ... 290s 'Gourmet', 'National', 'Generic'}; 290s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 290s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 290s 290s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 290s assert (P(1), 7.67895738278171e-07, 1e-09); 290s assert (P(2), 0.000100373896304998, 1e-09); 290s assert (P(3), 0.746215396636649, 1e-09); 290s assert (ATAB{2,6}, 56.7, 1e-09); 290s assert (ATAB{3,6}, 32.4, 1e-09); 290s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 290s ***** test 290s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 290s 25 29 27 19 18 21 20 21 22 19]'; 290s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 290s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 290s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 290s 290s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 290s assert (P(1), 0.747462549227232, 1e-09); 290s assert (P(2), 1.03809316857694e-08, 1e-09); 290s assert (P(3), 0.523689833702691, 1e-09); 290s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 290s assert (ATAB{3,2}, 272.391841491841, 1e-09); 290s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 290s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 290s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 290s assert (P(1), 2.53445097305047e-08, 1e-09); 290s assert (P(2), 0.00388133678528749, 1e-09); 290s assert (P(3), 0.523689833702671, 1e-09); 290s assert (ATAB{2,2}, 242.227272727273, 1e-09); 290s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 290s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 290s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 290s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 290s assert (P(1), 0.00388133678528743, 1e-09); 290s assert (P(2), 1.03809316857694e-08, 1e-09); 290s assert (P(3), 0.523689833702691, 1e-09); 290s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 290s assert (ATAB{3,2}, 272.391841491841, 1e-09); 290s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 290s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 290s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 290s assert (P(1), 0.00442898146583742, 1e-09); 290s assert (P(2), 1.30634252053587e-08, 1e-09); 290s assert (P(3), 0.523689833702691, 1e-09); 290s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 290s assert (ATAB{3,2}, 264.335664335664, 1e-09); 290s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 290s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 291s ***** test 291s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 291s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 291s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 291s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 291s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 291s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 291s 291s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 291s assert (P(1), 0.0108632139833963, 1e-09); 291s assert (P(2), 0.0810606976703546, 1e-09); 291s assert (P(3), 0.00175433329935627, 1e-09); 291s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 291s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 291s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 291s assert (ATAB{5,2}, 3.1625, 1e-09); 291s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 291s assert (P(1), 0.0373333189297505, 1e-09); 291s assert (P(2), 0.017075098787169, 1e-09); 291s assert (P(3), 0.00175433329935627, 1e-09); 291s assert (ATAB{2,2}, 1.444, 1e-09); 291s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 291s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 291s assert (ATAB{5,2}, 3.1625, 1e-09); 291s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 291s assert (P(1), 0.017075098787169, 1e-09); 291s assert (P(2), 0.0810606976703546, 1e-09); 291s assert (P(3), 0.00175433329935627, 1e-09); 291s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 291s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 291s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 291s assert (ATAB{5,2}, 3.1625, 1e-09); 291s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 291s assert (P(1), 0.0454263063473954, 1e-09); 291s assert (P(2), 0.0746719907091438, 1e-09); 291s assert (P(3), 0.00175433329935627, 1e-09); 291s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 291s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 291s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 291s assert (ATAB{5,2}, 3.1625, 1e-09); 291s ***** test 291s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 291s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 291s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 291s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 291s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 291s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 291s 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; 291s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 291s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 291s 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; 291s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 291s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 291s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 291s 173 194 197 190 176 198 164 190 169 164 176 175; 291s 186 194 201 215 219 209 164 166 159 182 187 174 ... 291s 189 194 217 206 199 195 171 173 196 199 180 NaN; 291s 180 187 199 170 204 194 162 184 183 156 180 173 ... 291s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 291s 291s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 291s assert (P(1), 7.02561843825325e-05, 1e-09); 291s assert (P(2), 0.000425806013389362, 1e-09); 291s assert (P(3), 6.16780773446401e-07, 1e-09); 291s assert (P(4), 0.261347622678438, 1e-09); 291s assert (P(5), 0.0542278432357043, 1e-09); 291s assert (P(6), 0.590353225626655, 1e-09); 291s assert (P(7), 0.0861628249564267, 1e-09); 291s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 291s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 291s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 291s assert (ATAB{5,2}, 437.066007908781, 1e-09); 291s assert (ATAB{6,2}, 976.180770397332, 1e-09); 291s assert (ATAB{7,2}, 46.616653365254, 1e-09); 291s assert (ATAB{8,2}, 814.345251396648, 1e-09); 291s assert (ATAB{9,2}, 9065.8, 1e-09); 291s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 291s assert (P(1), 9.4879638470754e-05, 1e-09); 291s assert (P(2), 0.00124177666315809, 1e-09); 291s assert (P(3), 6.86162012732911e-07, 1e-09); 291s assert (P(4), 0.260856132341256, 1e-09); 291s assert (P(5), 0.0523758623892078, 1e-09); 291s assert (P(6), 0.590353225626655, 1e-09); 291s assert (P(7), 0.0861628249564267, 1e-09); 291s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 291s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 291s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 291s assert (ATAB{5,2}, 437.693674777847, 1e-09); 291s assert (ATAB{6,2}, 988.431929811402, 1e-09); 291s assert (ATAB{7,2}, 46.616653365254, 1e-09); 291s assert (ATAB{8,2}, 814.345251396648, 1e-09); 291s assert (ATAB{9,2}, 9065.8, 1e-09); 291s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 291s assert (P(1), 0.000106518678028207, 1e-09); 291s assert (P(2), 0.00125371366571508, 1e-09); 291s assert (P(3), 5.30813260778464e-07, 1e-09); 291s assert (P(4), 0.308353667232981, 1e-09); 291s assert (P(5), 0.0562901327343161, 1e-09); 291s assert (P(6), 0.599091042141092, 1e-09); 291s assert (P(7), 0.0861628249564267, 1e-09); 291s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 291s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 291s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 291s assert (ATAB{5,2}, 382.07709497207, 1e-09); 291s assert (ATAB{6,2}, 963.037988826813, 1e-09); 291s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 291s assert (ATAB{8,2}, 814.345251396648, 1e-09); 291s assert (ATAB{9,2}, 9065.8, 1e-09); 291s ***** test 291s measurement = [444 614 423 625 408 856 447 719 ... 291s 764 831 586 782 609 1002 606 766]'; 291s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 291s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 291s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 291s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 291s 291s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 291s assert (P(1), 0.0914352969909372, 1e-09); 291s assert (P(2), 5.04077373924908e-05, 1e-09); 291s assert (P(4), 0.0283196918836667, 1e-09); 291s assert (ATAB{2,2}, 286.132500000002, 1e-09); 291s assert (ATAB{3,2}, 2275.29, 1e-09); 291s assert (ATAB{4,2}, 1242.5625, 1e-09); 291s assert (ATAB{5,2}, 495.905000000001, 1e-09); 291s assert (ATAB{6,2}, 207.007499999999, 1e-09); 291s ***** test 291s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 291s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 291s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 291s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 291s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 291s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 291s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 291s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 291s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 291s 291s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 291s assert (P(1), 6.27153318786007e-14, 1e-09); 291s assert (P(2), 2.48773241196644e-25, 1e-09); 291s assert (ATAB{2,2}, 598.003953318404, 1e-09); 291s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 291s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 291s assert (ATAB{2,6}, 187.399388123951, 1e-09); 291s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 291s ***** test 291s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 291s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 291s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 291s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 291s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 291s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 291s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 291s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 291s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 291s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 291s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 291s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 291s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 291s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 291s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 291s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 291s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 291s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 291s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 291s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 291s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 291s 291s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 291s assert (P(5), 0.9245630968248468, 1e-09); 291s assert (P(6), 0.791115159521822, 1e-09); 291s assert (P(7), 0.9296668751457956, 1e-09); 291s [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'); 291s assert (P(1), 0.00158132928938933, 1e-09); 291s assert (P(2), 2.12537505039986e-07, 1e-09); 291s assert (P(3), 0.00390292555160047, 1e-09); 291s assert (P(4), 0.0164086580775543, 1e-09); 291s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 291s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 291s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 291s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 291s ***** test 291s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 291s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 291s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 291s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 291s 25.694 ]'; 291s 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]'; 291s C = [ 0.4001601 0.3333333 0.5 0.0 291s 0.4001601 0.3333333 -0.5 0.0 291s 0.4001601 -0.6666667 0.0 0.0 291s -0.6002401 0.0000000 0.0 0.5 291s -0.6002401 0.0000000 0.0 -0.5]; 291s 291s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 291s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 291s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 291s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 291s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 291s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 291s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 291s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 291s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 291s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 291s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 291s assert (STATS.coeffs(1,5), 40.161, 1e-03); 291s assert (STATS.coeffs(2,5), -9.624, 1e-03); 291s assert (STATS.coeffs(3,5), -3.825, 1e-03); 291s assert (STATS.coeffs(4,5), -4.875, 1e-03); 291s assert (STATS.coeffs(5,5), -5.515, 1e-03); 291s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 291s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 291s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 291s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 291s 12 tests, 12 passed, 0 known failure, 0 skipped 291s [inst/qrandn.m] 291s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/qrandn.m 291s ***** demo 291s z = qrandn (-5, 5e6); 291s [c x] = hist (z,linspace(-1.5,1.5,200),1); 291s figure(1) 291s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 291s 291s z = qrandn (-0.14286, 5e6); 291s [c x] = hist (z,linspace(-2,2,200),1); 291s figure(2) 291s plot(x,c,"r."); axis tight; axis([-2,2]); 291s 291s z = qrandn (2.75, 5e6); 291s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 291s figure(3) 291s semilogy(x,c,"r."); axis tight; axis([-100,100]); 291s 291s # --------- 291s # Figures from the reference paper. 291s ***** error qrandn ([1 2], 1) 291s ***** error qrandn (4, 1) 291s ***** error qrandn (3, 1) 291s ***** error qrandn (2.5, 1, 2, 3) 291s ***** error qrandn (2.5) 291s ***** test 291s q = 1.5; 291s s = [2, 3]; 291s z = qrandn (q, s); 291s assert (isnumeric (z) && isequal (size (z), s)); 291s 6 tests, 6 passed, 0 known failure, 0 skipped 291s [inst/ff2n.m] 291s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ff2n.m 291s ***** error ff2n (); 291s ***** error ff2n (2, 5); 291s ***** error ff2n (2.5); 291s ***** error ff2n (0); 291s ***** error ff2n (-3); 291s ***** error ff2n (3+2i); 291s ***** error ff2n (Inf); 291s ***** error ff2n (NaN); 291s ***** test 291s A = ff2n (3); 291s assert (A, fullfact (3)); 291s ***** test 291s A = ff2n (8); 291s assert (A, fullfact (8)); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/cdfplot.m] 291s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cdfplot.m 291s ***** demo 291s x = randn(100,1); 291s cdfplot (x); 291s ***** test 291s hf = figure ("visible", "off"); 291s unwind_protect 291s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 291s [hCDF, stats] = cdfplot (x); 291s assert (stats.min, 2); 291s assert (stats.max, 6); 291s assert (stats.median, 3.5); 291s assert (stats.std, 1.35400640077266, 1e-14); 291s unwind_protect_cleanup 291s close (hf); 291s end_unwind_protect 291s ***** test 291s hf = figure ("visible", "off"); 291s unwind_protect 291s x = randn(100,1); 291s cdfplot (x); 291s unwind_protect_cleanup 291s close (hf); 291s end_unwind_protect 291s ***** error cdfplot (); 291s ***** error cdfplot ([x',x']); 291s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/regress.m] 291s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/regress.m 291s ***** test 291s % Longley data from the NIST Statistical Reference Dataset 291s Z = [ 60323 83.0 234289 2356 1590 107608 1947 291s 61122 88.5 259426 2325 1456 108632 1948 291s 60171 88.2 258054 3682 1616 109773 1949 291s 61187 89.5 284599 3351 1650 110929 1950 291s 63221 96.2 328975 2099 3099 112075 1951 291s 63639 98.1 346999 1932 3594 113270 1952 291s 64989 99.0 365385 1870 3547 115094 1953 291s 63761 100.0 363112 3578 3350 116219 1954 291s 66019 101.2 397469 2904 3048 117388 1955 291s 67857 104.6 419180 2822 2857 118734 1956 291s 68169 108.4 442769 2936 2798 120445 1957 291s 66513 110.8 444546 4681 2637 121950 1958 291s 68655 112.6 482704 3813 2552 123366 1959 291s 69564 114.2 502601 3931 2514 125368 1960 291s 69331 115.7 518173 4806 2572 127852 1961 291s 70551 116.9 554894 4007 2827 130081 1962 ]; 291s % Results certified by NIST using 500 digit arithmetic 291s % b and standard error in b 291s V = [ -3482258.63459582 890420.383607373 291s 15.0618722713733 84.9149257747669 291s -0.358191792925910E-01 0.334910077722432E-01 291s -2.02022980381683 0.488399681651699 291s -1.03322686717359 0.214274163161675 291s -0.511041056535807E-01 0.226073200069370 291s 1829.15146461355 455.478499142212 ]; 291s Rsq = 0.995479004577296; 291s F = 330.285339234588; 291s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 291s alpha = 0.05; 291s [b, bint, r, rint, stats] = regress (y, X, alpha); 291s assert(b,V(:,1),4e-6); 291s assert(stats(1),Rsq,1e-12); 291s assert(stats(2),F,3e-8); 291s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 291s warning: matrix singular to machine precision, rcond = 3.50566e-20 291s warning: called from 291s regress at line 131 column 7 291s __test__ at line 33 column 28 291s test at line 682 column 11 291s /tmp/tmp.xw5yd9Pys5 at line 1022 column 31 291s 291s 1 test, 1 passed, 0 known failure, 0 skipped 291s [inst/slicesample.m] 291s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/slicesample.m 291s ***** demo 291s ## Define function to sample 291s d = 2; 291s mu = [-1; 2]; 291s rand ("seed", 5) # for reproducibility 291s Sigma = rand (d); 291s Sigma = (Sigma + Sigma'); 291s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 291s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 291s 291s ## Inputs 291s start = ones (1,2); 291s nsamples = 500; 291s K = 500; 291s m = 10; 291s rande ("seed", 4); rand ("seed", 5) # for reproducibility 291s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 291s figure; 291s hold on; 291s plot (smpl(:,1), smpl(:,2), 'x'); 291s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 291s z = reshape (pdf ([x(:), y(:)]), size(x)); 291s mesh (x, y, z, "facecolor", "None"); 291s 291s ## Using sample points to find the volume of half a sphere with radius of .5 291s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 291s int = mean (f (smpl) ./ pdf (smpl)); 291s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 291s trueerr = abs (2/3*pi*.25^(3/2)-int); 291s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 291s fprintf ("Monte Carlo integral error estimate %f\n", errest); 291s fprintf ("The actual error %f\n", trueerr); 291s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 291s ***** demo 291s ## Integrate truncated normal distribution to find normilization constant 291s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 291s nsamples = 1e3; 291s rande ("seed", 4); rand ("seed", 5) # for reproducibility 291s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 291s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 291s x = linspace (-3, 3, 1000); 291s area (x, f(x)); 291s xlabel ("x"); 291s ylabel ("f(x)"); 291s int = mean (f (smpl) ./ pdf (smpl)); 291s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 291s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 291s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 291s fprintf("Monte Carlo integral error estimate %f\n", errest); 291s fprintf("The actual error %f\n", trueerr); 291s ***** test 291s start = 0.5; 291s nsamples = 1e3; 291s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 291s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 291s assert (mean (smpl, 1), 1, .15); 291s assert (var (smpl, 1), 1, .25); 292s ***** error slicesample (); 292s ***** error slicesample (1); 292s ***** error slicesample (1, 1); 292s 4 tests, 4 passed, 0 known failure, 0 skipped 292s [inst/hmmgenerate.m] 292s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hmmgenerate.m 292s ***** test 292s len = 25; 292s transprob = [0.8, 0.2; 0.4, 0.6]; 292s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 292s [sequence, states] = hmmgenerate (len, transprob, outprob); 292s assert (length (sequence), len); 292s assert (length (states), len); 292s assert (min (sequence) >= 1); 292s assert (max (sequence) <= columns (outprob)); 292s assert (min (states) >= 1); 292s assert (max (states) <= rows (transprob)); 292s ***** test 292s len = 25; 292s transprob = [0.8, 0.2; 0.4, 0.6]; 292s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 292s symbols = {"A", "B", "C"}; 292s statenames = {"One", "Two"}; 292s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 292s "symbols", symbols, "statenames", statenames); 292s assert (length (sequence), len); 292s assert (length (states), len); 292s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 292s strcmp (sequence, "C") == ones (1, len)); 292s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 292s 2 tests, 2 passed, 0 known failure, 0 skipped 292s [inst/dist_wrap/pdf.m] 292s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/pdf.m 292s ***** shared x 292s x = [1:5]; 292s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 292s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 292s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 292s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 292s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 292s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 292s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 292s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 292s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 292s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 292s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 292s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 292s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 292s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 292s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 292s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 292s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 292s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 292s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 292s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 292s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 292s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 292s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 292s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 292s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 292s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 292s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 292s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 292s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 292s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 292s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 292s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 292s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 292s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 292s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 292s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 292s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 292s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 292s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 292s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 292s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 292s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 292s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 292s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 292s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 292s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 292s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 292s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 292s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 292s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 292s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 292s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 292s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 293s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 293s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 293s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 293s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 293s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 293s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 293s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 293s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 293s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 293s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 293s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 293s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 293s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 293s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 293s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 293s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 293s ***** error pdf (1) 293s ***** error pdf ({"beta"}) 293s ***** error pdf ("beta", {[1 2 3 4 5]}) 293s ***** error pdf ("beta", "text") 293s ***** error pdf ("beta", 1+i) 293s ***** error ... 293s pdf ("Beta", x, "a", 2) 293s ***** error ... 293s pdf ("Beta", x, 5, "") 293s ***** error ... 293s pdf ("Beta", x, 5, {2}) 293s ***** error pdf ("chi2", x) 293s ***** error pdf ("Beta", x, 5) 293s ***** error pdf ("Burr", x, 5) 293s ***** error pdf ("Burr", x, 5, 2) 293s 86 tests, 86 passed, 0 known failure, 0 skipped 293s [inst/dist_wrap/random.m] 293s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/random.m 293s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 293s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 293s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 293s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 293s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 293s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 293s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 293s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 293s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 293s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 293s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 293s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 293s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 293s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 293s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 293s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 293s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 293s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 293s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 293s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 293s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 293s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 293s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 293s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 293s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 293s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 293s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 293s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 293s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 293s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 293s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 293s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 293s ***** error random (1) 293s ***** error random ({"beta"}) 293s ***** error ... 293s random ("Beta", "a", 2) 293s ***** error ... 293s random ("Beta", 5, "") 293s ***** error ... 293s random ("Beta", 5, {2}) 293s ***** error ... 293s random ("Beta", "a", 2, 2, 10) 293s ***** error ... 293s random ("Beta", 5, "", 2, 10) 293s ***** error ... 293s random ("Beta", 5, {2}, 2, 10) 293s ***** error ... 293s random ("Beta", 5, "", 2, 10) 293s ***** error random ("chi2") 293s ***** error random ("Beta", 5) 293s ***** error random ("Burr", 5) 293s ***** error random ("Burr", 5, 2) 293s 87 tests, 87 passed, 0 known failure, 0 skipped 293s [inst/dist_wrap/mle.m] 293s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/mle.m 293s ***** error mle (ones (2)) 293s ***** error mle ("text") 293s ***** error mle ([1, 2, 3, i, 5]) 293s ***** error ... 293s mle ([1:50], "distribution") 293s ***** error ... 293s mle ([1:50], "censoring", logical ([1,0,1,0])) 293s ***** error ... 293s mle ([1:50], "frequency", [1,0,1,0]) 293s ***** error ... 293s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 293s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 293s ***** error mle ([1:50], "alpha", 1) 293s ***** error mle ([1:50], "alpha", -1) 293s ***** error mle ([1:50], "alpha", i) 293s ***** error ... 293s mle ([1:50], "ntrials", -1) 293s ***** error ... 293s mle ([1:50], "ntrials", [20, 50]) 293s ***** error ... 293s mle ([1:50], "ntrials", [20.3]) 293s ***** error ... 293s mle ([1:50], "ntrials", 3i) 293s ***** error ... 293s mle ([1:50], "options", 4) 293s ***** error ... 293s mle ([1:50], "options", struct ("x", 3)) 293s ***** error mle ([1:50], "NAME", "value") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 2 1 0], "distribution", "bernoulli") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "bino") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 -1 0], "distribution", "gp") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 -1 0], "distribution", "hn") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 293s ***** error mle ([1:50], "distribution", "value") 293s ***** error ... 293s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 293s 36 tests, 36 passed, 0 known failure, 0 skipped 293s [inst/dist_wrap/cdf.m] 293s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/cdf.m 293s ***** shared x 293s x = [1:5]; 293s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 293s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 293s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 293s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 293s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 293s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 293s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 293s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 293s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 293s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 293s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 293s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 293s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 293s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 293s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 293s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 293s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 293s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 293s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 293s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 293s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 293s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 293s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 293s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 293s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 293s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 293s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 293s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 293s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 293s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 293s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 293s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 293s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 293s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 293s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 293s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 294s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 294s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 294s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 294s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 294s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 294s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 294s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 294s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 294s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 294s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 294s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 294s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 294s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 294s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 294s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 294s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 294s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 294s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 294s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 294s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 294s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 294s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 294s ***** error cdf (1) 294s ***** error cdf ({"beta"}) 294s ***** error cdf ("beta", {[1 2 3 4 5]}) 294s ***** error cdf ("beta", "text") 294s ***** error cdf ("beta", 1+i) 294s ***** error ... 294s cdf ("Beta", x, "a", 2) 294s ***** error ... 294s cdf ("Beta", x, 5, "") 294s ***** error ... 294s cdf ("Beta", x, 5, {2}) 294s ***** error cdf ("chi2", x) 294s ***** error cdf ("Beta", x, 5) 294s ***** error cdf ("Burr", x, 5) 294s ***** error cdf ("Burr", x, 5, 2) 294s 86 tests, 86 passed, 0 known failure, 0 skipped 294s [inst/dist_wrap/makedist.m] 294s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/makedist.m 294s ***** test 294s pd = makedist ("beta"); 294s assert (class (pd), "BetaDistribution"); 294s assert (pd.a, 1); 294s assert (pd.b, 1); 294s ***** test 294s pd = makedist ("beta", "a", 5); 294s assert (pd.a, 5); 294s assert (pd.b, 1); 294s ***** test 294s pd = makedist ("beta", "b", 5); 294s assert (pd.a, 1); 294s assert (pd.b, 5); 294s ***** test 294s pd = makedist ("beta", "a", 3, "b", 5); 294s assert (pd.a, 3); 294s assert (pd.b, 5); 294s ***** test 294s pd = makedist ("binomial"); 294s assert (class (pd), "BinomialDistribution"); 294s assert (pd.N, 1); 294s assert (pd.p, 0.5); 294s ***** test 294s pd = makedist ("binomial", "N", 5); 294s assert (pd.N, 5); 294s assert (pd.p, 0.5); 294s ***** test 294s pd = makedist ("binomial", "p", 0.2); 294s assert (pd.N, 1); 294s assert (pd.p, 0.2); 294s ***** test 294s pd = makedist ("binomial", "N", 3, "p", 0.3); 294s assert (pd.N, 3); 294s assert (pd.p, 0.3); 294s ***** test 294s pd = makedist ("birnbaumsaunders"); 294s assert (class (pd), "BirnbaumSaundersDistribution"); 294s assert (pd.beta, 1); 294s assert (pd.gamma, 1); 294s ***** test 294s pd = makedist ("birnbaumsaunders", "beta", 5); 294s assert (pd.beta, 5); 294s assert (pd.gamma, 1); 294s ***** test 294s pd = makedist ("birnbaumsaunders", "gamma", 5); 294s assert (pd.beta, 1); 294s assert (pd.gamma, 5); 294s ***** test 294s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 294s assert (pd.beta, 3); 294s assert (pd.gamma, 5); 294s ***** test 294s pd = makedist ("burr"); 294s assert (class (pd), "BurrDistribution"); 294s assert (pd.alpha, 1); 294s assert (pd.c, 1); 294s assert (pd.k, 1); 294s ***** test 294s pd = makedist ("burr", "k", 5); 294s assert (pd.alpha, 1); 294s assert (pd.c, 1); 294s assert (pd.k, 5); 294s ***** test 294s pd = makedist ("burr", "c", 5); 294s assert (pd.alpha, 1); 294s assert (pd.c, 5); 294s assert (pd.k, 1); 294s ***** test 294s pd = makedist ("burr", "alpha", 3, "c", 5); 294s assert (pd.alpha, 3); 294s assert (pd.c, 5); 294s assert (pd.k, 1); 294s ***** test 294s pd = makedist ("burr", "k", 3, "c", 5); 294s assert (pd.alpha, 1); 294s assert (pd.c, 5); 294s assert (pd.k, 3); 294s ***** test 294s pd = makedist ("exponential"); 294s assert (class (pd), "ExponentialDistribution"); 294s assert (pd.mu, 1); 294s ***** test 294s pd = makedist ("exponential", "mu", 5); 294s assert (pd.mu, 5); 294s ***** test 294s pd = makedist ("extremevalue"); 294s assert (class (pd), "ExtremeValueDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("extremevalue", "mu", 5); 294s assert (class (pd), "ExtremeValueDistribution"); 294s assert (pd.mu, 5); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("ev", "sigma", 5); 294s assert (class (pd), "ExtremeValueDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("ev", "mu", -3, "sigma", 5); 294s assert (class (pd), "ExtremeValueDistribution"); 294s assert (pd.mu, -3); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("gamma"); 294s assert (class (pd), "GammaDistribution"); 294s assert (pd.a, 1); 294s assert (pd.b, 1); 294s ***** test 294s pd = makedist ("gamma", "a", 5); 294s assert (pd.a, 5); 294s assert (pd.b, 1); 294s ***** test 294s pd = makedist ("gamma", "b", 5); 294s assert (pd.a, 1); 294s assert (pd.b, 5); 294s ***** test 294s pd = makedist ("gamma", "a", 3, "b", 5); 294s assert (pd.a, 3); 294s assert (pd.b, 5); 294s ***** test 294s pd = makedist ("GeneralizedExtremeValue"); 294s assert (class (pd), "GeneralizedExtremeValueDistribution"); 294s assert (pd.k, 0); 294s assert (pd.sigma, 1); 294s assert (pd.mu, 0); 294s ***** test 294s pd = makedist ("GeneralizedExtremeValue", "k", 5); 294s assert (pd.k, 5); 294s assert (pd.sigma, 1); 294s assert (pd.mu, 0); 294s ***** test 294s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 294s assert (pd.k, 0); 294s assert (pd.sigma, 5); 294s assert (pd.mu, 0); 294s ***** test 294s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 294s assert (pd.k, 3); 294s assert (pd.sigma, 5); 294s assert (pd.mu, 0); 294s ***** test 294s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 294s assert (pd.k, 0); 294s assert (pd.sigma, 5); 294s assert (pd.mu, 3); 294s ***** test 294s pd = makedist ("GeneralizedPareto"); 294s assert (class (pd), "GeneralizedParetoDistribution"); 294s assert (pd.k, 1); 294s assert (pd.sigma, 1); 294s assert (pd.theta, 1); 294s ***** test 294s pd = makedist ("GeneralizedPareto", "k", 5); 294s assert (pd.k, 5); 294s assert (pd.sigma, 1); 294s assert (pd.theta, 1); 294s ***** test 294s pd = makedist ("GeneralizedPareto", "sigma", 5); 294s assert (pd.k, 1); 294s assert (pd.sigma, 5); 294s assert (pd.theta, 1); 294s ***** test 294s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 294s assert (pd.k, 3); 294s assert (pd.sigma, 5); 294s assert (pd.theta, 1); 294s ***** test 294s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 294s assert (pd.k, 1); 294s assert (pd.sigma, 5); 294s assert (pd.theta, 3); 294s ***** test 294s pd = makedist ("HalfNormal"); 294s assert (class (pd), "HalfNormalDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("HalfNormal", "mu", 5); 294s assert (pd.mu, 5); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("HalfNormal", "sigma", 5); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 294s assert (pd.mu, 3); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("InverseGaussian"); 294s assert (class (pd), "InverseGaussianDistribution"); 294s assert (pd.mu, 1); 294s assert (pd.lambda, 1); 294s ***** test 294s pd = makedist ("InverseGaussian", "mu", 5); 294s assert (pd.mu, 5); 294s assert (pd.lambda, 1); 294s ***** test 294s pd = makedist ("InverseGaussian", "lambda", 5); 294s assert (pd.mu, 1); 294s assert (pd.lambda, 5); 294s ***** test 294s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 294s assert (pd.mu, 3); 294s assert (pd.lambda, 5); 294s ***** test 294s pd = makedist ("logistic"); 294s assert (class (pd), "LogisticDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("logistic", "mu", 5); 294s assert (pd.mu, 5); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("logistic", "sigma", 5); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("logistic", "mu", 3, "sigma", 5); 294s assert (pd.mu, 3); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("loglogistic"); 294s assert (class (pd), "LoglogisticDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("loglogistic", "mu", 5); 294s assert (pd.mu, 5); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("loglogistic", "sigma", 5); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 294s assert (pd.mu, 3); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("Lognormal"); 294s assert (class (pd), "LognormalDistribution"); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("Lognormal", "mu", 5); 294s assert (pd.mu, 5); 294s assert (pd.sigma, 1); 294s ***** test 294s pd = makedist ("Lognormal", "sigma", 5); 294s assert (pd.mu, 0); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 294s assert (pd.mu, -3); 294s assert (pd.sigma, 5); 294s ***** test 294s pd = makedist ("Loguniform"); 294s assert (class (pd), "LoguniformDistribution"); 294s assert (pd.Lower, 1); 294s assert (pd.Upper, 4); 294s ***** test 294s pd = makedist ("Loguniform", "Lower", 2); 294s assert (pd.Lower, 2); 294s assert (pd.Upper, 4); 294s ***** test 294s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 294s assert (pd.Lower, 1); 294s assert (pd.Upper, 3); 294s ***** test 294s pd = makedist ("Multinomial"); 294s assert (class (pd), "MultinomialDistribution"); 294s assert (pd.Probabilities, [0.5, 0.5]); 294s ***** test 294s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 294s assert (class (pd), "MultinomialDistribution"); 294s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 294s ***** test 294s pd = makedist ("Nakagami"); 294s assert (class (pd), "NakagamiDistribution"); 294s assert (pd.mu, 1); 294s assert (pd.omega, 1); 295s ***** test 295s pd = makedist ("Nakagami", "mu", 5); 295s assert (class (pd), "NakagamiDistribution"); 295s assert (pd.mu, 5); 295s assert (pd.omega, 1); 295s ***** test 295s pd = makedist ("Nakagami", "omega", 0.3); 295s assert (class (pd), "NakagamiDistribution"); 295s assert (pd.mu, 1); 295s assert (pd.omega, 0.3); 295s ***** test 295s pd = makedist ("NegativeBinomial"); 295s assert (class (pd), "NegativeBinomialDistribution"); 295s assert (pd.R, 1); 295s assert (pd.P, 0.5); 295s ***** test 295s pd = makedist ("NegativeBinomial", "R", 5); 295s assert (class (pd), "NegativeBinomialDistribution"); 295s assert (pd.R, 5); 295s assert (pd.P, 0.5); 295s ***** test 295s pd = makedist ("NegativeBinomial", "p", 0.3); 295s assert (class (pd), "NegativeBinomialDistribution"); 295s assert (pd.R, 1); 295s assert (pd.P, 0.3); 295s ***** test 295s pd = makedist ("Normal"); 295s assert (class (pd), "NormalDistribution"); 295s assert (pd.mu, 0); 295s assert (pd.sigma, 1); 295s ***** test 295s pd = makedist ("Normal", "mu", 5); 295s assert (class (pd), "NormalDistribution"); 295s assert (pd.mu, 5); 295s assert (pd.sigma, 1); 295s ***** test 295s pd = makedist ("Normal", "sigma", 5); 295s assert (class (pd), "NormalDistribution"); 295s assert (pd.mu, 0); 295s assert (pd.sigma, 5); 295s ***** test 295s pd = makedist ("Normal", "mu", -3, "sigma", 5); 295s assert (class (pd), "NormalDistribution"); 295s assert (pd.mu, -3); 295s assert (pd.sigma, 5); 295s ***** test 295s pd = makedist ("PiecewiseLinear"); 295s assert (class (pd), "PiecewiseLinearDistribution"); 295s assert (pd.x, [0; 1]); 295s assert (pd.Fx, [0; 1]); 295s ***** test 295s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 295s assert (pd.x, [0; 1; 2]); 295s assert (pd.Fx, [0; 0.5; 1]); 295s ***** test 295s pd = makedist ("Poisson"); 295s assert (class (pd), "PoissonDistribution"); 295s assert (pd.lambda, 1); 295s ***** test 295s pd = makedist ("Poisson", "lambda", 5); 295s assert (pd.lambda, 5); 295s ***** test 295s pd = makedist ("Rayleigh"); 295s assert (class (pd), "RayleighDistribution"); 295s assert (pd.sigma, 1); 295s ***** test 295s pd = makedist ("Rayleigh", "sigma", 5); 295s assert (pd.sigma, 5); 295s ***** test 295s pd = makedist ("Rician"); 295s assert (class (pd), "RicianDistribution"); 295s assert (pd.s, 1); 295s assert (pd.sigma, 1); 295s ***** test 295s pd = makedist ("Rician", "s", 3); 295s assert (pd.s, 3); 295s assert (pd.sigma, 1); 295s ***** test 295s pd = makedist ("Rician", "sigma", 3); 295s assert (pd.s, 1); 295s assert (pd.sigma, 3); 295s ***** test 295s pd = makedist ("Rician", "s", 2, "sigma", 3); 295s assert (pd.s, 2); 295s assert (pd.sigma, 3); 295s ***** warning 295s pd = makedist ("stable"); 295s assert (class (pd), "double"); 295s assert (isempty (pd), true); 295s ***** test 295s pd = makedist ("tlocationscale"); 295s assert (class (pd), "tLocationScaleDistribution"); 295s assert (pd.mu, 0); 295s assert (pd.sigma, 1); 295s assert (pd.nu, 5); 295s ***** test 295s pd = makedist ("tlocationscale", "mu", 5); 295s assert (pd.mu, 5); 295s assert (pd.sigma, 1); 295s assert (pd.nu, 5); 295s ***** test 295s pd = makedist ("tlocationscale", "sigma", 2); 295s assert (pd.mu, 0); 295s assert (pd.sigma, 2); 295s assert (pd.nu, 5); 295s ***** test 295s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 295s assert (pd.mu, 5); 295s assert (pd.sigma, 2); 295s assert (pd.nu, 5); 295s ***** test 295s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 295s assert (pd.mu, 0); 295s assert (pd.sigma, 2); 295s assert (pd.nu, 1); 295s ***** test 295s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 295s assert (pd.mu, -2); 295s assert (pd.sigma, 3); 295s assert (pd.nu, 1); 295s ***** test 295s pd = makedist ("Triangular"); 295s assert (class (pd), "TriangularDistribution"); 295s assert (pd.A, 0); 295s assert (pd.B, 0.5); 295s assert (pd.C, 1); 295s ***** test 295s pd = makedist ("Triangular", "A", -2); 295s assert (pd.A, -2); 295s assert (pd.B, 0.5); 295s assert (pd.C, 1); 295s ***** test 295s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 295s assert (pd.A, 0.5); 295s assert (pd.B, 0.9); 295s assert (pd.C, 1); 295s ***** test 295s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 295s assert (pd.A, 1); 295s assert (pd.B, 2); 295s assert (pd.C, 5); 295s ***** test 295s pd = makedist ("Uniform"); 295s assert (class (pd), "UniformDistribution"); 295s assert (pd.Lower, 0); 295s assert (pd.Upper, 1); 295s ***** test 295s pd = makedist ("Uniform", "Lower", -2); 295s assert (pd.Lower, -2); 295s assert (pd.Upper, 1); 295s ***** test 295s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 295s assert (pd.Lower, 1); 295s assert (pd.Upper, 3); 295s ***** test 295s pd = makedist ("Weibull"); 295s assert (class (pd), "WeibullDistribution"); 295s assert (pd.lambda, 1); 295s assert (pd.k, 1); 295s ***** test 295s pd = makedist ("Weibull", "lambda", 3); 295s assert (pd.lambda, 3); 295s assert (pd.k, 1); 295s ***** test 295s pd = makedist ("Weibull", "lambda", 3, "k", 2); 295s assert (pd.lambda, 3); 295s assert (pd.k, 2); 295s ***** error makedist (1) 295s ***** error makedist (["as";"sd"]) 295s ***** error makedist ("some") 295s ***** error ... 295s makedist ("Beta", "a") 295s ***** error ... 295s makedist ("Beta", "a", 1, "Q", 23) 295s ***** error ... 295s makedist ("Binomial", "N", 1, "Q", 23) 295s ***** error ... 295s makedist ("BirnbaumSaunders", "N", 1) 295s ***** error ... 295s makedist ("Burr", "lambda", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("extremevalue", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("exponential", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Gamma", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("HalfNormal", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Logistic", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Loglogistic", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Lognormal", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Loguniform", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Multinomial", "k", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Nakagami", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Normal", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Poisson", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Rician", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Stable", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Triangular", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Uniform", "mu", 1, "sdfs", 34) 295s ***** error ... 295s makedist ("Weibull", "mu", 1, "sdfs", 34) 295s 131 tests, 131 passed, 0 known failure, 0 skipped 295s [inst/dist_wrap/icdf.m] 295s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/icdf.m 295s ***** shared p 295s p = [0.05:0.05:0.5]; 295s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 295s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 295s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 295s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 295s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 295s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 295s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 295s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 295s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 295s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 295s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 295s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 295s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 295s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 295s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 295s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 295s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 295s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 295s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 295s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 295s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 295s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 295s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 295s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 295s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 295s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 295s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 295s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 295s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 295s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 295s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 295s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 295s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 295s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 295s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 295s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 295s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 295s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 295s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 295s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 295s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 295s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 295s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 295s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 295s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 295s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 295s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 295s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 295s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 296s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 296s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 297s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 297s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 297s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 297s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 297s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 297s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 297s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 297s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 297s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 298s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 298s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 298s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 298s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 298s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 298s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 298s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 298s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 298s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 298s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 298s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 303s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 308s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 308s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 308s ***** error icdf (1) 308s ***** error icdf ({"beta"}) 308s ***** error icdf ("beta", {[1 2 3 4 5]}) 308s ***** error icdf ("beta", "text") 308s ***** error icdf ("beta", 1+i) 308s ***** error ... 308s icdf ("Beta", p, "a", 2) 308s ***** error ... 308s icdf ("Beta", p, 5, "") 308s ***** error ... 308s icdf ("Beta", p, 5, {2}) 308s ***** error icdf ("chi2", p) 308s ***** error icdf ("Beta", p, 5) 308s ***** error icdf ("Burr", p, 5) 308s ***** error icdf ("Burr", p, 5, 2) 308s 86 tests, 86 passed, 0 known failure, 0 skipped 308s [inst/dist_wrap/fitdist.m] 308s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_wrap/fitdist.m 308s ***** test 308s x = betarnd (1, 1, 100, 1); 308s pd = fitdist (x, "Beta"); 308s [phat, pci] = betafit (x); 308s assert ([pd.a, pd.b], phat); 308s assert (paramci (pd), pci); 308s ***** test 308s x1 = betarnd (1, 1, 100, 1); 308s x2 = betarnd (5, 2, 100, 1); 308s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 308s [phat, pci] = betafit (x1); 308s assert ([pd(1).a, pd(1).b], phat); 308s assert (paramci (pd(1)), pci); 308s [phat, pci] = betafit (x2); 308s assert ([pd(2).a, pd(2).b], phat); 308s assert (paramci (pd(2)), pci); 308s ***** test 308s N = 1; 308s x = binornd (N, 0.5, 100, 1); 308s pd = fitdist (x, "binomial"); 308s [phat, pci] = binofit (sum (x), numel (x)); 308s assert ([pd.N, pd.p], [N, phat]); 308s assert (paramci (pd), pci); 308s ***** test 308s N = 3; 308s x = binornd (N, 0.4, 100, 1); 308s pd = fitdist (x, "binomial", "ntrials", N); 308s [phat, pci] = binofit (sum (x), numel (x) * N); 308s assert ([pd.N, pd.p], [N, phat]); 308s assert (paramci (pd), pci); 308s ***** test 308s N = 1; 308s x1 = binornd (N, 0.5, 100, 1); 308s x2 = binornd (N, 0.7, 100, 1); 308s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 308s [phat, pci] = binofit (sum (x1), numel (x1)); 308s assert ([pd(1).N, pd(1).p], [N, phat]); 308s assert (paramci (pd(1)), pci); 308s [phat, pci] = binofit (sum (x2), numel (x2)); 308s assert ([pd(2).N, pd(2).p], [N, phat]); 308s assert (paramci (pd(2)), pci); 309s ***** test 309s N = 5; 309s x1 = binornd (N, 0.5, 100, 1); 309s x2 = binornd (N, 0.8, 100, 1); 309s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 309s "By", [ones(100,1); 2*ones(100,1)]); 309s [phat, pci] = binofit (sum (x1), numel (x1) * N); 309s assert ([pd(1).N, pd(1).p], [N, phat]); 309s assert (paramci (pd(1)), pci); 309s [phat, pci] = binofit (sum (x2), numel (x2) * N); 309s assert ([pd(2).N, pd(2).p], [N, phat]); 309s assert (paramci (pd(2)), pci); 309s ***** test 309s x = bisarnd (1, 1, 100, 1); 309s pd = fitdist (x, "BirnbaumSaunders"); 309s [phat, pci] = bisafit (x); 309s assert ([pd.beta, pd.gamma], phat); 309s assert (paramci (pd), pci); 309s ***** test 309s x1 = bisarnd (1, 1, 100, 1); 309s x2 = bisarnd (5, 2, 100, 1); 309s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 309s [phat, pci] = bisafit (x1); 309s assert ([pd(1).beta, pd(1).gamma], phat); 309s assert (paramci (pd(1)), pci); 309s [phat, pci] = bisafit (x2); 309s assert ([pd(2).beta, pd(2).gamma], phat); 309s assert (paramci (pd(2)), pci); 309s ***** test 309s x = burrrnd (1, 2, 1, 100, 1); 309s pd = fitdist (x, "Burr"); 309s [phat, pci] = burrfit (x); 309s assert ([pd.alpha, pd.c, pd.k], phat); 309s assert (paramci (pd), pci); 309s ***** test 309s x1 = burrrnd (1, 2, 1, 100, 1); 309s x2 = burrrnd (1, 0.5, 2, 100, 1); 309s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 309s [phat, pci] = burrfit (x1); 309s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 309s assert (paramci (pd(1)), pci); 309s [phat, pci] = burrfit (x2); 309s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 309s assert (paramci (pd(2)), pci); 310s ***** test 310s x = exprnd (1, 100, 1); 310s pd = fitdist (x, "exponential"); 310s [muhat, muci] = expfit (x); 310s assert ([pd.mu], muhat); 310s assert (paramci (pd), muci); 310s ***** test 310s x1 = exprnd (1, 100, 1); 310s x2 = exprnd (5, 100, 1); 310s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 310s [muhat, muci] = expfit (x1); 310s assert ([pd(1).mu], muhat); 310s assert (paramci (pd(1)), muci); 310s [muhat, muci] = expfit (x2); 310s assert ([pd(2).mu], muhat); 310s assert (paramci (pd(2)), muci); 310s ***** test 310s x = evrnd (1, 1, 100, 1); 310s pd = fitdist (x, "ev"); 310s [phat, pci] = evfit (x); 310s assert ([pd.mu, pd.sigma], phat); 310s assert (paramci (pd), pci); 310s ***** test 310s x1 = evrnd (1, 1, 100, 1); 310s x2 = evrnd (5, 2, 100, 1); 310s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 310s [phat, pci] = evfit (x1); 310s assert ([pd(1).mu, pd(1).sigma], phat); 310s assert (paramci (pd(1)), pci); 310s [phat, pci] = evfit (x2); 310s assert ([pd(2).mu, pd(2).sigma], phat); 310s assert (paramci (pd(2)), pci); 310s ***** test 310s x = gamrnd (1, 1, 100, 1); 310s pd = fitdist (x, "Gamma"); 310s [phat, pci] = gamfit (x); 310s assert ([pd.a, pd.b], phat); 310s assert (paramci (pd), pci); 310s ***** test 310s x1 = gamrnd (1, 1, 100, 1); 310s x2 = gamrnd (5, 2, 100, 1); 310s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 310s [phat, pci] = gamfit (x1); 310s assert ([pd(1).a, pd(1).b], phat); 310s assert (paramci (pd(1)), pci); 310s [phat, pci] = gamfit (x2); 310s assert ([pd(2).a, pd(2).b], phat); 310s assert (paramci (pd(2)), pci); 310s ***** test 310s rand ("seed", 4); # for reproducibility 310s x = gevrnd (-0.5, 1, 2, 1000, 1); 310s pd = fitdist (x, "generalizedextremevalue"); 310s [phat, pci] = gevfit (x); 310s assert ([pd.k, pd.sigma, pd.mu], phat); 310s assert (paramci (pd), pci); 310s ***** test 310s rand ("seed", 5); # for reproducibility 310s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 310s rand ("seed", 9); # for reproducibility 310s x2 = gevrnd (0, 1, -4, 1000, 1); 310s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 310s [phat, pci] = gevfit (x1); 310s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 310s assert (paramci (pd(1)), pci); 310s [phat, pci] = gevfit (x2); 310s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 310s assert (paramci (pd(2)), pci); 311s ***** test 311s x = gprnd (1, 1, 1, 100, 1); 311s pd = fitdist (x, "GeneralizedPareto"); 311s [phat, pci] = gpfit (x, 1); 311s assert ([pd.k, pd.sigma, pd.theta], phat); 311s assert (paramci (pd), pci); 311s ***** test 311s x = gprnd (1, 1, 2, 100, 1); 311s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 311s [phat, pci] = gpfit (x, 2); 311s assert ([pd.k, pd.sigma, pd.theta], phat); 311s assert (paramci (pd), pci); 311s ***** test 311s x1 = gprnd (1, 1, 1, 100, 1); 311s x2 = gprnd (0, 2, 1, 100, 1); 311s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 311s [phat, pci] = gpfit (x1, 1); 311s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 311s assert (paramci (pd(1)), pci); 311s [phat, pci] = gpfit (x2, 1); 311s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 311s assert (paramci (pd(2)), pci); 311s ***** test 311s x1 = gprnd (3, 2, 2, 100, 1); 311s x2 = gprnd (2, 3, 2, 100, 1); 311s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 311s "By", [ones(100,1); 2*ones(100,1)]); 311s [phat, pci] = gpfit (x1, 2); 311s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 311s assert (paramci (pd(1)), pci); 311s [phat, pci] = gpfit (x2, 2); 311s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 311s assert (paramci (pd(2)), pci); 311s ***** test 311s x = hnrnd (0, 1, 100, 1); 311s pd = fitdist (x, "HalfNormal"); 311s [phat, pci] = hnfit (x, 0); 311s assert ([pd.mu, pd.sigma], phat); 311s assert (paramci (pd), pci); 311s ***** test 311s x = hnrnd (1, 1, 100, 1); 311s pd = fitdist (x, "HalfNormal", "mu", 1); 311s [phat, pci] = hnfit (x, 1); 311s assert ([pd.mu, pd.sigma], phat); 311s assert (paramci (pd), pci); 312s ***** test 312s x1 = hnrnd (0, 1, 100, 1); 312s x2 = hnrnd (0, 2, 100, 1); 312s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = hnfit (x1, 0); 312s assert ([pd(1).mu, pd(1).sigma], phat); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = hnfit (x2, 0); 312s assert ([pd(2).mu, pd(2).sigma], phat); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s x1 = hnrnd (2, 1, 100, 1); 312s x2 = hnrnd (2, 2, 100, 1); 312s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 312s "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = hnfit (x1, 2); 312s assert ([pd(1).mu, pd(1).sigma], phat); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = hnfit (x2, 2); 312s assert ([pd(2).mu, pd(2).sigma], phat); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s x = invgrnd (1, 1, 100, 1); 312s pd = fitdist (x, "InverseGaussian"); 312s [phat, pci] = invgfit (x); 312s assert ([pd.mu, pd.lambda], phat); 312s assert (paramci (pd), pci); 312s ***** test 312s x1 = invgrnd (1, 1, 100, 1); 312s x2 = invgrnd (5, 2, 100, 1); 312s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = invgfit (x1); 312s assert ([pd(1).mu, pd(1).lambda], phat); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = invgfit (x2); 312s assert ([pd(2).mu, pd(2).lambda], phat); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s x = logirnd (1, 1, 100, 1); 312s pd = fitdist (x, "logistic"); 312s [phat, pci] = logifit (x); 312s assert ([pd.mu, pd.sigma], phat); 312s assert (paramci (pd), pci); 312s ***** test 312s x1 = logirnd (1, 1, 100, 1); 312s x2 = logirnd (5, 2, 100, 1); 312s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = logifit (x1); 312s assert ([pd(1).mu, pd(1).sigma], phat); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = logifit (x2); 312s assert ([pd(2).mu, pd(2).sigma], phat); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s x = loglrnd (1, 1, 100, 1); 312s pd = fitdist (x, "loglogistic"); 312s [phat, pci] = loglfit (x); 312s assert ([pd.mu, pd.sigma], phat); 312s assert (paramci (pd), pci); 313s ***** test 313s x1 = loglrnd (1, 1, 100, 1); 313s x2 = loglrnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = loglfit (x1); 313s assert ([pd(1).mu, pd(1).sigma], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = loglfit (x2); 313s assert ([pd(2).mu, pd(2).sigma], phat); 313s assert (paramci (pd(2)), pci); 313s ***** test 313s x = lognrnd (1, 1, 100, 1); 313s pd = fitdist (x, "lognormal"); 313s [phat, pci] = lognfit (x); 313s assert ([pd.mu, pd.sigma], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = lognrnd (1, 1, 100, 1); 313s x2 = lognrnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = lognfit (x1); 313s assert ([pd(1).mu, pd(1).sigma], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = lognfit (x2); 313s assert ([pd(2).mu, pd(2).sigma], phat); 313s assert (paramci (pd(2)), pci); 313s ***** test 313s x = nakarnd (2, 0.5, 100, 1); 313s pd = fitdist (x, "Nakagami"); 313s [phat, pci] = nakafit (x); 313s assert ([pd.mu, pd.omega], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = nakarnd (2, 0.5, 100, 1); 313s x2 = nakarnd (5, 0.8, 100, 1); 313s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = nakafit (x1); 313s assert ([pd(1).mu, pd(1).omega], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = nakafit (x2); 313s assert ([pd(2).mu, pd(2).omega], phat); 313s assert (paramci (pd(2)), pci); 314s ***** test 314s randp ("seed", 123); 314s randg ("seed", 321); 314s x = nbinrnd (2, 0.5, 100, 1); 314s pd = fitdist (x, "negativebinomial"); 314s [phat, pci] = nbinfit (x); 314s assert ([pd.R, pd.P], phat); 314s assert (paramci (pd), pci); 314s ***** test 314s randp ("seed", 345); 314s randg ("seed", 543); 314s x1 = nbinrnd (2, 0.5, 100, 1); 314s randp ("seed", 432); 314s randg ("seed", 234); 314s x2 = nbinrnd (5, 0.8, 100, 1); 314s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = nbinfit (x1); 314s assert ([pd(1).R, pd(1).P], phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = nbinfit (x2); 314s assert ([pd(2).R, pd(2).P], phat); 314s assert (paramci (pd(2)), pci); 314s ***** test 314s x = normrnd (1, 1, 100, 1); 314s pd = fitdist (x, "normal"); 314s [muhat, sigmahat, muci, sigmaci] = normfit (x); 314s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 314s assert (paramci (pd), [muci, sigmaci]); 314s ***** test 314s x1 = normrnd (1, 1, 100, 1); 314s x2 = normrnd (5, 2, 100, 1); 314s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 314s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 314s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 314s assert (paramci (pd(1)), [muci, sigmaci]); 314s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 314s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 314s assert (paramci (pd(2)), [muci, sigmaci]); 314s ***** test 314s x = poissrnd (1, 100, 1); 314s pd = fitdist (x, "poisson"); 314s [phat, pci] = poissfit (x); 314s assert (pd.lambda, phat); 314s assert (paramci (pd), pci); 314s ***** test 314s x1 = poissrnd (1, 100, 1); 314s x2 = poissrnd (5, 100, 1); 314s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = poissfit (x1); 314s assert (pd(1).lambda, phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = poissfit (x2); 314s assert (pd(2).lambda, phat); 314s assert (paramci (pd(2)), pci); 314s ***** test 314s x = raylrnd (1, 100, 1); 314s pd = fitdist (x, "rayleigh"); 314s [phat, pci] = raylfit (x); 314s assert (pd.sigma, phat); 314s assert (paramci (pd), pci); 314s ***** test 314s x1 = raylrnd (1, 100, 1); 314s x2 = raylrnd (5, 100, 1); 314s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = raylfit (x1); 314s assert ( pd(1).sigma, phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = raylfit (x2); 314s assert (pd(2).sigma, phat); 314s assert (paramci (pd(2)), pci); 315s ***** test 315s x = ricernd (1, 1, 100, 1); 315s pd = fitdist (x, "rician"); 315s [phat, pci] = ricefit (x); 315s assert ([pd.s, pd.sigma], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = ricernd (1, 1, 100, 1); 315s x2 = ricernd (5, 2, 100, 1); 315s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = ricefit (x1); 315s assert ([pd(1).s, pd(1).sigma], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = ricefit (x2); 315s assert ([pd(2).s, pd(2).sigma], phat); 315s assert (paramci (pd(2)), pci); 315s ***** warning ... 315s fitdist ([1 2 3 4 5], "Stable"); 315s ***** test 315s x = tlsrnd (0, 1, 1, 100, 1); 315s pd = fitdist (x, "tlocationscale"); 315s [phat, pci] = tlsfit (x); 315s assert ([pd.mu, pd.sigma, pd.nu], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = tlsrnd (0, 1, 1, 100, 1); 315s x2 = tlsrnd (5, 2, 1, 100, 1); 315s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = tlsfit (x1); 315s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = tlsfit (x2); 315s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 315s assert (paramci (pd(2)), pci); 316s ***** test 316s x = [1 2 3 4 5]; 316s pd = fitdist (x, "weibull"); 316s [phat, pci] = wblfit (x); 316s assert ([pd.lambda, pd.k], phat); 316s assert (paramci (pd), pci); 316s ***** test 316s x = [1 2 3 4 5 6 7 8 9 10]; 316s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 316s [phat, pci] = wblfit (x(1:5)); 316s assert ([pd(1).lambda, pd(1).k], phat); 316s assert (paramci (pd(1)), pci); 316s [phat, pci] = wblfit (x(6:10)); 316s assert ([pd(2).lambda, pd(2).k], phat); 316s assert (paramci (pd(2)), pci); 316s ***** error fitdist (1) 316s ***** error fitdist (1, ["as";"sd"]) 316s ***** error fitdist (1, "some") 316s ***** error ... 316s fitdist (ones (2), "normal") 316s ***** error ... 316s fitdist ([i, 2, 3], "normal") 316s ***** error ... 316s fitdist (["a", "s", "d"], "normal") 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "By") 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 316s ***** error ... 316s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "alpha", i) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "ntrials", 0) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "options", 0) 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 316s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 316s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 316s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 316s ***** error ... 316s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 316s ***** error ... 316s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 316s ***** error ... 316s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 316s ***** error ... 316s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 316s 77 tests, 77 passed, 0 known failure, 0 skipped 316s [inst/fitcnet.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitcnet.m 316s ***** demo 316s ## Train a Neural Network on the Fisher's Iris data set and display 316s ## a confusion chart with the classification results. 316s 316s load fisheriris 316s Mdl = fitcnet (meas, species); 316s pred_species = resubPredict (Mdl); 316s confusionchart (species, pred_species); 316s ***** error fitcnet () 316s ***** error fitcnet (ones (4,1)) 316s ***** error 316s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 316s ***** error 316s fitcnet (ones (4,2), ones (3, 1)) 316s ***** error 316s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 316s 5 tests, 5 passed, 0 known failure, 0 skipped 316s [inst/bar3h.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/bar3h.m 316s ***** demo 316s ## Ploting 5 bars in the same series. 316s 316s y = [50; 40; 30; 20; 10]; 316s bar3h (y); 316s ***** demo 316s ## Ploting 5 bars in different groups. 316s 316s y = [50, 40, 30, 20, 10]; 316s bar3h (y); 316s ***** demo 316s ## A 3D bar graph with each series corresponding to a column in y. 316s 316s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 316s bar3h (y); 316s ***** demo 316s ## Specify z-axis locations as tick names. z must be a column vector! 316s 316s z = [1950, 1960, 1970, 1980, 1990]'; 316s y = [16, 8, 4, 2, 1]'; 316s bar3h (z, y); 316s ***** demo 316s ## Plot 3 series as a grouped plot without any space between the grouped bars 316s 316s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 316s bar3h (y, 1, 'grouped'); 316s ***** demo 316s ## Plot a stacked style 3D bar graph 316s 316s y = [19, 30, 21, 30; 40, 16, 32, 12]; 316s b = bar3h (y, 0.5, 'stacked'); 316s ***** error bar3h ("A") 316s ***** error bar3h ({2,3,4,5}) 316s ***** error ... 316s bar3h ([1,2,3]', ones (2)) 316s ***** error ... 316s bar3h ([1:5], 1.2) 316s ***** error ... 316s bar3h ([1:5]', ones (5), 1.2) 316s ***** error ... 316s bar3h ([1:5]', ones (5), [0.8, 0.7]) 316s ***** error ... 316s bar3h (ones (5), 'width') 316s ***** error ... 316s bar3h (ones (5), 'width', 1.2) 316s ***** error ... 316s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 316s ***** error ... 316s bar3h (ones (5), 'color') 316s ***** error ... 316s bar3h (ones (5), 'color', [0.8, 0.8]) 316s ***** error ... 316s bar3h (ones (5), 'color', "brown") 316s ***** error ... 316s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 316s ***** error ... 316s bar3h (ones (5), 'xlabel') 316s ***** error ... 316s bar3h (ones (5), 'xlabel', 4) 316s ***** error ... 316s bar3h (ones (5), 'zlabel') 316s ***** error ... 316s bar3h (ones (5), 'zlabel', 4) 316s ***** error bar3h (ones (5), 'this', 4) 316s ***** error ... 316s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 316s ***** error ... 316s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 316s 20 tests, 20 passed, 0 known failure, 0 skipped 316s [inst/trimmean.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/trimmean.m 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s out = trimmean (x, 10, [1, 2]); 316s assert (out(1,1,1), 10.3889, 1e-4); 316s assert (out(1,1,2), 29.6111, 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s out = trimmean (x, 10, 1); 316s assert (out(:,:,1), [-17.6, 8, 13, 18]); 316s assert (out(:,:,2), [23, 28, 33, 10.6]); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, 1); 316s assert (out(:,:,1), [-23, 8, 13, 18]); 316s assert (out(:,:,2), [23, 28, 33, 3.75]); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s out = trimmean (x, 10, 2); 316s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 316s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, 2); 316s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 316s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s out = trimmean (x, 10, [1, 2, 3]); 316s assert (out, trimmean (x, 10, "all")); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, [1, 2]); 316s assert (out(1,1,1), 10.7647, 1e-4); 316s assert (out(1,1,2), 29.1176, 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, [1, 3]); 316s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, [2, 3]); 316s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, [1, 2, 3]); 316s assert (out, trimmean (x, 10, "all")); 316s ***** test 316s x = reshape (1:40, [5, 4, 2]); 316s x([3, 37]) = -100; 316s x([4, 38]) = NaN; 316s out = trimmean (x, 10, [2, 3, 5]); 316s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 316s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 316s ***** assert (trimmean ([], 10), NaN) 316s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 316s ***** error trimmean (1) 316s ***** error trimmean (1,2,3,4,5) 316s ***** error trimmean ([1 2 3 4], -10) 316s ***** error trimmean ([1 2 3 4], 100) 316s ***** error trimmean ([1 2 3 4], 10, "flag") 316s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 316s ***** error ... 316s trimmean ([1 2 3 4], 10, -1) 316s ***** error ... 316s trimmean ([1 2 3 4], 10, "floor", -1) 316s ***** error ... 316s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 316s ***** error ... 316s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 316s 26 tests, 26 passed, 0 known failure, 0 skipped 316s [inst/pdist.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/pdist.m 316s ***** shared xy, t, eucl, x 316s xy = [0 1; 0 2; 7 6; 5 6]; 316s t = 1e-3; 316s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 316s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 316s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 316s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 316s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 316s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 316s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 316s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 316s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 316s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 316s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 316s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 316s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 316s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 316s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 316s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 316s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 316s ***** assert (pdist (x, "euclidean"), ... 316s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 316s ***** assert (pdist (x, eucl), ... 316s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 316s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 316s ***** assert (pdist (x, "seuclidean"), ... 316s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 316s ***** warning ... 316s pdist (x, "mahalanobis"); 316s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 316s ***** assert (pdist (x, "minkowski"), ... 316s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 316s ***** assert (pdist (x, "minkowski", 3), ... 316s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 316s ***** assert (pdist (x, "cosine"), ... 316s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 316s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 316s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 316s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 316s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 316s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 316s 29 tests, 29 passed, 0 known failure, 0 skipped 316s [inst/logistic_regression.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/logistic_regression.m 316s ***** test 316s # Output compared to following MATLAB commands 316s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 316s # P = mnrval(B,X) 316s X = [1.489381332449196, 1.1534152241851305; ... 316s 1.8110085304863965, 0.9449666896938425; ... 316s -0.04453299665130296, 0.34278203449678646; ... 316s -0.36616019468850347, 1.130254275908322; ... 316s 0.15339143291005095, -0.7921044310668951; ... 316s -1.6031878794469698, -1.8343471035233376; ... 316s -0.14349521143198166, -0.6762996896828459; ... 316s -0.4403818557740143, -0.7921044310668951; ... 316s -0.7372685001160434, -0.027793137932169563; ... 316s -0.11875465773681024, 0.5512305689880763]; 316s Y = [1,1,1,1,1,0,0,0,0,0]'; 316s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 316s ***** test 316s # Output compared to following MATLAB commands 316s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 316s load carbig 316s X = [Acceleration Displacement Horsepower Weight]; 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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, ... 316s 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]'; 316s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 316s assert (DEV, 433.197174495549, 1e-05); 316s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 316s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 316s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 316s assert (SLOPE(1), 0.104762463756714, 1e-05); 316s assert (SLOPE(2), 0.0103357623191891, 1e-05); 316s assert (SLOPE(3), 0.0645199313242276, 1e-05); 316s assert (SLOPE(4), 0.00166377028388103, 1e-05); 316s 2 tests, 2 passed, 0 known failure, 0 skipped 316s [inst/qqplot.m] 316s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/qqplot.m 316s ***** test 316s hf = figure ("visible", "off"); 316s unwind_protect 316s 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]); 316s unwind_protect_cleanup 316s close (hf); 316s end_unwind_protect 316s ***** error qqplot () 316s ***** error qqplot ({1}) 316s ***** error qqplot (ones (2,2)) 317s ***** error qqplot (1, "foobar") 317s ***** error qqplot ([1 2 3], "foobar") 317s 6 tests, 6 passed, 0 known failure, 0 skipped 317s [inst/standardizeMissing.m] 317s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/standardizeMissing.m 317s ***** assert (standardizeMissing (1, 1), NaN) 317s ***** assert (standardizeMissing (1, 0), 1) 317s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 317s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 317s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 317s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 317s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 317s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 317s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 317s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 317s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 317s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 317s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 317s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 317s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 317s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 317s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 317s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 317s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 317s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 317s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 317s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 317s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 317s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 317s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 317s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 317s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 317s ***** assert (standardizeMissing (single (1), true), single (NaN)) 317s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 317s ***** assert (standardizeMissing (true, true), true) 317s ***** assert (standardizeMissing (true, 1), true) 317s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 317s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 317s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 317s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 317s ***** error standardizeMissing (); 317s ***** error standardizeMissing (1); 317s ***** error standardizeMissing (1,2,3); 317s ***** error standardizeMissing ({'abc', 1}, 1); 317s ***** error standardizeMissing (struct ('a','b'), 1); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 317s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 317s 49 tests, 49 passed, 0 known failure, 0 skipped 317s [inst/loadmodel.m] 317s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/loadmodel.m 317s ***** error loadmodel () 317s ***** error ... 317s loadmodel ("fisheriris.mat") 317s ***** error ... 317s loadmodel ("fail_loadmodel.mdl") 317s ***** error ... 317s loadmodel ("fail_load_model.mdl") 317s 4 tests, 4 passed, 0 known failure, 0 skipped 317s [inst/correlation_test.m] 317s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/correlation_test.m 317s ***** error correlation_test (); 317s ***** error correlation_test (1); 317s ***** error ... 317s correlation_test ([1 2 NaN]', [2 3 4]'); 317s ***** error ... 317s correlation_test ([1 2 Inf]', [2 3 4]'); 317s ***** error ... 317s correlation_test ([1 2 3+i]', [2 3 4]'); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 NaN]'); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 Inf]'); 317s ***** error ... 317s correlation_test ([1 2 3]', [3 4 3+i]'); 317s ***** error ... 317s correlation_test ([1 2 3]', [3 4 4 5]'); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 317s ***** error ... 317s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 317s ***** test 317s x = [6 7 7 9 10 12 13 14 15 17]; 317s y = [19 22 27 25 30 28 30 29 25 32]; 317s [h, pval, stats] = correlation_test (x, y); 317s assert (stats.corrcoef, corr (x', y'), 1e-14); 317s assert (pval, 0.0223, 1e-4); 317s ***** test 317s x = [6 7 7 9 10 12 13 14 15 17]'; 317s y = [19 22 27 25 30 28 30 29 25 32]'; 317s [h, pval, stats] = correlation_test (x, y); 317s assert (stats.corrcoef, corr (x, y), 1e-14); 317s assert (pval, 0.0223, 1e-4); 317s 20 tests, 20 passed, 0 known failure, 0 skipped 317s [inst/mahal.m] 317s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/mahal.m 317s ***** error mahal () 317s ***** error mahal (1, 2, 3) 317s ***** error mahal ("A", "B") 317s ***** error mahal ([1, 2], ["A", "B"]) 317s ***** error mahal (ones (2, 2, 2)) 318s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 318s ***** error mahal (ones (2, 2), ones (2, 3)) 318s ***** test 318s X = [1 0; 0 1; 1 1; 0 0]; 318s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 318s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 318s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 318s 9 tests, 9 passed, 0 known failure, 0 skipped 318s [inst/levene_test.m] 318s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/levene_test.m 318s ***** error levene_test () 318s ***** error ... 318s levene_test (1, 2, 3, 4, 5); 318s ***** error levene_test (randn (50, 2), 0); 318s ***** error ... 318s levene_test (randn (50, 2), [1, 2, 3]); 318s ***** error ... 318s levene_test (randn (50, 1), ones (55, 1)); 318s ***** error ... 318s levene_test (randn (50, 1), ones (50, 2)); 318s ***** error ... 318s levene_test (randn (50, 2), [], 1.2); 318s ***** error ... 318s levene_test (randn (50, 2), "some_string"); 318s ***** error ... 318s levene_test (randn (50, 2), [], "alpha"); 318s ***** error ... 318s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 318s ***** error ... 318s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 318s ***** error ... 318s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 318s ***** warning ... 318s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades); 318s assert (h, 1); 318s assert (pval, 9.523239714592791e-07, 1e-14); 318s assert (W, 8.59529, 1e-5); 318s assert (df, [4, 595]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 318s assert (h, 1); 318s assert (pval, 9.523239714592791e-07, 1e-14); 318s assert (W, 8.59529, 1e-5); 318s assert (df, [4, 595]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades, [], "median"); 318s assert (h, 1); 318s assert (pval, 1.312093241723211e-06, 1e-14); 318s assert (W, 8.415969, 1e-6); 318s assert (df, [4, 595]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades(:,[1:3])); 318s assert (h, 1); 318s assert (pval, 0.004349390980463497, 1e-14); 318s assert (W, 5.52139, 1e-5); 318s assert (df, [2, 357]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 318s assert (h, 1); 318s assert (pval, 0.004355216763951453, 1e-14); 318s assert (W, 5.52001, 1e-5); 318s assert (df, [2, 357]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 318s assert (h, 0); 318s assert (pval, 0.1807494957440653, 2e-14); 318s assert (W, 1.80200, 1e-5); 318s assert (df, [1, 238]); 318s ***** test 318s load examgrades 318s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 318s assert (h, 0); 318s assert (pval, 0.1978225622063785, 2e-14); 318s assert (W, 1.66768, 1e-5); 318s assert (df, [1, 238]); 318s 20 tests, 20 passed, 0 known failure, 0 skipped 318s [inst/monotone_smooth.m] 318s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/monotone_smooth.m 318s ***** error ... 318s monotone_smooth (1) 318s ***** error ... 318s monotone_smooth ("char", 1) 318s ***** error ... 318s monotone_smooth ({1,2,3}, 1) 318s ***** error ... 318s monotone_smooth (ones(20,3), 1) 318s ***** error ... 318s monotone_smooth (1, "char") 318s ***** error ... 318s monotone_smooth (1, {1,2,3}) 318s ***** error ... 318s monotone_smooth (1, ones(20,3)) 318s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 318s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 318s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 318s 10 tests, 10 passed, 0 known failure, 0 skipped 318s [inst/plsregress.m] 318s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/plsregress.m 318s ***** demo 318s ## Perform Partial Least-Squares Regression 318s 318s ## Load the spectra data set and use the near infrared (NIR) spectral 318s ## intensities (NIR) as the predictor and the corresponding octave 318s ## ratings (octave) as the response. 318s load spectra 318s 318s ## Perform PLS regression with 10 components 318s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 318s 318s ## Plot the percentage of explained variance in the response variable 318s ## (PCTVAR) as a function of the number of components. 318s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 318s xlim ([1, 10]); 318s xlabel ("Number of PLS components"); 318s ylabel ("Percentage of Explained Variance in octane"); 318s title ("Explained Variance per PLS components"); 318s 318s ## Compute the fitted response and display the residuals. 318s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 318s residuals = octane - octane_fitted; 318s figure 318s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 318s xlabel ("Observations"); 318s ylabel ("Residuals"); 318s title ("Residuals in octane's fitted responce"); 318s ***** demo 318s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 318s 318s ## Load the spectra data set and use the near infrared (NIR) spectral 318s ## intensities (NIR) as the predictor and the corresponding octave 318s ## ratings (octave) as the response. Variables with a VIP score greater than 318s ## 1 are considered important for the projection of the PLS regression model. 318s load spectra 318s 318s ## Perform PLS regression with 10 components 318s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 318s plsregress (NIR, octane, 10); 318s 318s ## Calculate the normalized PLS weights 318s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 318s 318s ## Calculate the VIP scores for 10 components 318s nobs = size (xload, 1); 318s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 318s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 318s 318s ## Find variables with a VIP score greater than or equal to 1 318s VIPidx = find (VIPscore >= 1); 318s 318s ## Plot the VIP scores 318s scatter (1:length (VIPscore), VIPscore, "xb"); 318s hold on 318s scatter (VIPidx, VIPscore (VIPidx), "xr"); 318s plot ([1, length(VIPscore)], [1, 1], "--k"); 318s hold off 318s axis ("tight"); 318s xlabel ("Predictor Variables"); 318s ylabel ("VIP scores"); 318s title ("VIP scores for each predictror variable with 10 components"); 318s ***** test 318s load spectra 318s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 318s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 318s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 318s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 318s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 318s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 318s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 318s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 318s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 318s assert (xload(1,:), xload1_out, 1e-4); 318s assert (yload, yload_out, 1e-4); 318s assert (xscore(1,:), xscore1_out, 1e-4); 318s assert (yscore(1,:), yscore1_out, 1e-4); 318s ***** test 318s load spectra 318s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 318s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 318s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 318s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 318s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 318s assert (xload(1,:), xload1_out, 1e-4); 318s assert (yload, yload_out, 1e-4); 318s assert (xscore(1,:), xscore1_out, 1e-4); 318s assert (yscore(1,:), yscore1_out, 1e-4); 318s ***** error 318s plsregress (1) 318s ***** error plsregress (1, "asd") 318s ***** error plsregress (1, {1,2,3}) 318s ***** error plsregress ("asd", 1) 318s ***** error plsregress ({1,2,3}, 1) 318s ***** error ... 318s plsregress (ones (20,3), ones (15,1)) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 0) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), -5) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3.2) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), [2, 3]) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 4) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 318s ***** error ... 318s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 318s ***** error plsregress (1, 2) 318s 24 tests, 24 passed, 0 known failure, 0 skipped 318s [inst/hotelling_t2test.m] 318s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hotelling_t2test.m 318s ***** error hotelling_t2test (); 318s ***** error ... 318s hotelling_t2test (1); 318s ***** error ... 318s hotelling_t2test (ones(2,2,2)); 318s ***** error ... 318s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 318s ***** error ... 318s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 318s ***** error ... 318s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 318s ***** error ... 318s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 318s ***** error ... 318s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 318s ***** error ... 318s hotelling_t2test (ones(20,1), [0, 0]); 318s ***** error ... 318s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 318s ***** error ... 318s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 318s ***** test 318s randn ("seed", 1); 318s x = randn (50000, 5); 318s [h, pval, stats] = hotelling_t2test (x); 318s assert (h, 0); 318s assert (stats.df1, 5); 318s assert (stats.df2, 49995); 318s ***** test 318s randn ("seed", 1); 318s x = randn (50000, 5); 318s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 318s assert (h, 1); 318s assert (stats.df1, 5); 318s assert (stats.df2, 49995); 318s 13 tests, 13 passed, 0 known failure, 0 skipped 318s [inst/manovacluster.m] 318s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/manovacluster.m 318s ***** demo 318s load carbig 318s X = [MPG Acceleration Weight Displacement]; 318s [d, p, stats] = manova1 (X, Origin); 318s manovacluster (stats) 318s ***** test 318s hf = figure ("visible", "off"); 318s unwind_protect 318s load carbig 318s X = [MPG Acceleration Weight Displacement]; 318s [d, p, stats] = manova1 (X, Origin); 318s manovacluster (stats); 318s unwind_protect_cleanup 318s close (hf); 318s end_unwind_protect 319s ***** error manovacluster (stats, "some"); 319s 2 tests, 2 passed, 0 known failure, 0 skipped 319s [inst/mnrfit.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/mnrfit.m 319s ***** error mnrfit (ones (50,1)) 319s ***** error ... 319s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 319s ***** error ... 319s mnrfit (ones (50, 4, 2), ones (50, 1)) 319s ***** error ... 319s mnrfit (ones (50, 4), ones (50, 1, 3)) 319s ***** error ... 319s mnrfit (ones (50, 4), ones (45,1)) 319s ***** error ... 319s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 319s ***** error ... 319s mnrfit (ones (5, 4), ones (5, 1), "model") 319s ***** error ... 319s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 319s ***** error ... 319s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 319s ***** error ... 319s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 319s ***** error ... 319s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 319s ***** error ... 319s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 319s ***** error ... 319s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 319s 13 tests, 13 passed, 0 known failure, 0 skipped 319s [inst/princomp.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/princomp.m 319s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 319s ***** test 319s x=[7 4 3 319s 4 1 8 319s 6 3 5 319s 8 6 1 319s 8 5 7 319s 7 2 9 319s 5 3 3 319s 9 5 8 319s 7 4 5 319s 8 2 2]; 319s R = corrcoef (x); 319s [V, lambda] = eig (R); 319s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 319s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 319s ## contribution of first 2 PCs to each original variable 319s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 319s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 319s F = zscore(x)*B; 319s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 319s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 319s ***** test 319s x=[1,2,3;2,1,3]'; 319s [COEFF,SCORE,latent,tsquare] = princomp(x); 319s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 319s m(:,1) = m(:,1)*sign(COEFF(1,1)); 319s m(:,2) = m(:,2)*sign(COEFF(1,2)); 319s ***** assert(COEFF,m(1:2,:),10*eps); 319s ***** assert(SCORE,-m,10*eps); 319s ***** assert(latent,[1.5;.5],10*eps); 319s ***** assert(tsquare,[4;4;4]/3,10*eps); 319s ***** test 319s x=x'; 319s [COEFF,SCORE,latent,tsquare] = princomp(x); 319s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 319s m(:,1) = m(:,1)*sign(COEFF(1,1)); 319s m(:,2) = m(:,2)*sign(COEFF(1,2)); 319s m(:,3) = m(:,3)*sign(COEFF(3,3)); 319s ***** assert(COEFF,m,10*eps); 319s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 319s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 319s ***** assert(latent,[1;0;0],10*eps); 319s ***** assert(tsquare,[0.5;0.5],10*eps) 319s ***** test 319s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 319s ***** assert(COEFF,m(:, 1),10*eps); 319s ***** assert(SCORE,-m(1:2,1),10*eps); 319s ***** assert(latent,[1],10*eps); 319s ***** assert(tsquare,[0.5;0.5],10*eps) 319s 19 tests, 19 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/loglcdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/loglcdf.m 319s ***** demo 319s ## Plot various CDFs from the log-logistic distribution 319s x = 0:0.001:2; 319s p1 = loglcdf (x, log (1), 1/0.5); 319s p2 = loglcdf (x, log (1), 1); 319s p3 = loglcdf (x, log (1), 1/2); 319s p4 = loglcdf (x, log (1), 1/4); 319s p5 = loglcdf (x, log (1), 1/8); 319s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 319s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 319s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 319s grid on 319s title ("Log-logistic CDF") 319s xlabel ("values in x") 319s ylabel ("probability") 319s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 319s ***** shared out1, out2 319s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 319s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 319s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 319s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 319s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 319s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 319s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 319s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 319s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 319s ***** assert (class (loglcdf (1, single (2), 3)), "single") 319s ***** assert (class (loglcdf (1, 2, single (3))), "single") 319s ***** error loglcdf (1) 319s ***** error loglcdf (1, 2) 319s ***** error ... 319s loglcdf (1, 2, 3, 4) 319s ***** error ... 319s loglcdf (1, 2, 3, "uper") 319s ***** error ... 319s loglcdf (1, ones (2), ones (3)) 319s ***** error ... 319s loglcdf (1, ones (2), ones (3), "upper") 319s ***** error ... 319s loglcdf (ones (2), 1, ones (3)) 319s ***** error ... 319s loglcdf (ones (2), 1, ones (3), "upper") 319s ***** error ... 319s loglcdf (ones (2), ones (3), 1) 319s ***** error ... 319s loglcdf (ones (2), ones (3), 1, "upper") 319s ***** error loglcdf (i, 2, 3) 319s ***** error loglcdf (i, 2, 3, "upper") 319s ***** error loglcdf (1, i, 3) 319s ***** error loglcdf (1, i, 3, "upper") 319s ***** error loglcdf (1, 2, i) 319s ***** error loglcdf (1, 2, i, "upper") 319s 25 tests, 25 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/betapdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/betapdf.m 319s ***** demo 319s ## Plot various PDFs from the Beta distribution 319s x = 0.001:0.001:0.999; 319s y1 = betapdf (x, 0.5, 0.5); 319s y2 = betapdf (x, 5, 1); 319s y3 = betapdf (x, 1, 3); 319s y4 = betapdf (x, 2, 2); 319s y5 = betapdf (x, 2, 5); 319s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 319s grid on 319s ylim ([0, 2.5]) 319s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 319s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 319s title ("Beta PDF") 319s xlabel ("values in x") 319s ylabel ("density") 319s ***** shared x, y 319s x = [-1 0 0.5 1 2]; 319s y = [0 2 1 0 0]; 319s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 319s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 319s ***** assert (betapdf (x, ones (1, 5), 2), y) 319s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 319s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 319s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 319s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 319s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 319s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 319s ***** test 319s x = rand (10,1); 319s y = 1 ./ (pi * sqrt (x .* (1 - x))); 319s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 319s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 319s ***** error betapdf () 319s ***** error betapdf (1) 319s ***** error betapdf (1,2) 319s ***** error betapdf (1,2,3,4) 319s ***** error ... 319s betapdf (ones (3), ones (2), ones (2)) 319s ***** error ... 319s betapdf (ones (2), ones (3), ones (2)) 319s ***** error ... 319s betapdf (ones (2), ones (2), ones (3)) 319s ***** error betapdf (i, 2, 2) 319s ***** error betapdf (2, i, 2) 319s ***** error betapdf (2, 2, i) 319s 21 tests, 21 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/logiinv.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logiinv.m 319s ***** demo 319s ## Plot various iCDFs from the logistic distribution 319s p = 0.001:0.001:0.999; 319s x1 = logiinv (p, 5, 2); 319s x2 = logiinv (p, 9, 3); 319s x3 = logiinv (p, 9, 4); 319s x4 = logiinv (p, 6, 2); 319s x5 = logiinv (p, 2, 1); 319s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 319s grid on 319s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 319s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 319s title ("Logistic iCDF") 319s xlabel ("probability") 319s ylabel ("x") 319s ***** test 319s p = [0.01:0.01:0.99]; 319s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 319s ***** shared p 319s p = [-1 0 0.5 1 2]; 319s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 319s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 319s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 319s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 319s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 319s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 319s ***** error logiinv () 319s ***** error logiinv (1) 319s ***** error ... 319s logiinv (1, 2) 319s ***** error ... 319s logiinv (1, ones (2), ones (3)) 319s ***** error ... 319s logiinv (ones (2), 1, ones (3)) 319s ***** error ... 319s logiinv (ones (2), ones (3), 1) 319s ***** error logiinv (i, 2, 3) 319s ***** error logiinv (1, i, 3) 319s ***** error logiinv (1, 2, i) 319s 16 tests, 16 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/gevinv.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gevinv.m 319s ***** demo 319s ## Plot various iCDFs from the generalized extreme value distribution 319s p = 0.001:0.001:0.999; 319s x1 = gevinv (p, 1, 1, 1); 319s x2 = gevinv (p, 0.5, 1, 1); 319s x3 = gevinv (p, 1, 1, 5); 319s x4 = gevinv (p, 1, 2, 5); 319s x5 = gevinv (p, 1, 5, 5); 319s x6 = gevinv (p, 1, 0.5, 5); 319s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 319s p, x4, "-c", p, x5, "-m", p, x6, "-k") 319s grid on 319s ylim ([-1, 10]) 319s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 319s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 319s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 319s "location", "northwest") 319s title ("Generalized extreme value iCDF") 319s xlabel ("probability") 319s ylabel ("values in x") 319s ***** test 319s p = 0.1:0.1:0.9; 319s k = 0; 319s sigma = 1; 319s mu = 0; 319s x = gevinv (p, k, sigma, mu); 319s c = gevcdf(x, k, sigma, mu); 319s assert (c, p, 0.001); 319s ***** test 319s p = 0.1:0.1:0.9; 319s k = 1; 319s sigma = 1; 319s mu = 0; 319s x = gevinv (p, k, sigma, mu); 319s c = gevcdf(x, k, sigma, mu); 319s assert (c, p, 0.001); 319s ***** test 319s p = 0.1:0.1:0.9; 319s k = 0.3; 319s sigma = 1; 319s mu = 0; 319s x = gevinv (p, k, sigma, mu); 319s c = gevcdf(x, k, sigma, mu); 319s assert (c, p, 0.001); 319s ***** error gevinv () 319s ***** error gevinv (1) 319s ***** error gevinv (1, 2) 319s ***** error gevinv (1, 2, 3) 319s ***** error ... 319s gevinv (ones (3), ones (2), ones(2), ones(2)) 319s ***** error ... 319s gevinv (ones (2), ones (3), ones(2), ones(2)) 319s ***** error ... 319s gevinv (ones (2), ones (2), ones(3), ones(2)) 319s ***** error ... 319s gevinv (ones (2), ones (2), ones(2), ones(3)) 319s ***** error gevinv (i, 2, 3, 4) 319s ***** error gevinv (1, i, 3, 4) 319s ***** error gevinv (1, 2, i, 4) 319s ***** error gevinv (1, 2, 3, i) 319s 15 tests, 15 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/plinv.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/plinv.m 319s ***** demo 319s ## Plot various iCDFs from the Piecewise linear distribution 319s p = 0.001:0.001:0.999; 319s x1 = [0, 1, 3, 4, 7, 10]; 319s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 319s x2 = [0, 2, 5, 6, 7, 8]; 319s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 319s data1 = plinv (p, x1, Fx1); 319s data2 = plinv (p, x2, Fx2); 319s plot (p, data1, "-b", p, data2, "-g") 319s grid on 319s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 319s title ("Piecewise linear iCDF") 319s xlabel ("probability") 319s ylabel ("values in data") 319s ***** test 319s p = 0:0.2:1; 319s data = plinv (p, [0, 1], [0, 1]); 319s assert (data, p); 319s ***** test 319s p = 0:0.2:1; 319s data = plinv (p, [0, 2], [0, 1]); 319s assert (data, 2 * p); 319s ***** test 319s p = 0:0.2:1; 319s data_out = 1:6; 319s data = plinv (p, [0, 1], [0, 0.5]); 319s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 319s ***** test 319s p = 0:0.2:1; 319s data_out = 1:6; 319s data = plinv (p, [0, 0.5], [0, 1]); 319s assert (data, [0:0.1:0.5]); 319s ***** error plinv () 319s ***** error plinv (1) 319s ***** error plinv (1, 2) 319s ***** error ... 319s plinv (1, [0, 1, 2], [0, 1]) 319s ***** error ... 319s plinv (1, [0], [1]) 319s ***** error ... 319s plinv (1, [0, 1, 2], [0, 1, 1.5]) 319s ***** error ... 319s plinv (1, [0, 1, 2], [0, i, 1]) 319s ***** error ... 319s plinv (i, [0, 1, 2], [0, 0.5, 1]) 319s ***** error ... 319s plinv (1, [0, i, 2], [0, 0.5, 1]) 319s ***** error ... 319s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 319s 14 tests, 14 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/bisapdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bisapdf.m 319s ***** demo 319s ## Plot various PDFs from the Birnbaum-Saunders distribution 319s x = 0.01:0.01:4; 319s y1 = bisapdf (x, 1, 0.5); 319s y2 = bisapdf (x, 1, 1); 319s y3 = bisapdf (x, 1, 2); 319s y4 = bisapdf (x, 1, 5); 319s y5 = bisapdf (x, 1, 10); 319s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 319s grid on 319s ylim ([0, 1.5]) 319s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 319s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 319s title ("Birnbaum-Saunders PDF") 319s xlabel ("values in x") 319s ylabel ("density") 319s ***** demo 319s ## Plot various PDFs from the Birnbaum-Saunders distribution 319s x = 0.01:0.01:6; 319s y1 = bisapdf (x, 1, 0.3); 319s y2 = bisapdf (x, 2, 0.3); 319s y3 = bisapdf (x, 1, 0.5); 319s y4 = bisapdf (x, 3, 0.5); 319s y5 = bisapdf (x, 5, 0.5); 319s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 319s grid on 319s ylim ([0, 1.5]) 319s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 319s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 319s title ("Birnbaum-Saunders CDF") 319s xlabel ("values in x") 319s ylabel ("density") 319s ***** shared x, y 319s x = [-1, 0, 1, 2, Inf]; 319s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 319s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 319s ***** assert (bisapdf (x, 1, 1), y, eps) 319s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 319s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 319s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 319s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 319s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 319s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 319s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 319s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 319s ***** error bisapdf () 319s ***** error bisapdf (1) 319s ***** error bisapdf (1, 2) 319s ***** error bisapdf (1, 2, 3, 4) 319s ***** error ... 319s bisapdf (ones (3), ones (2), ones(2)) 319s ***** error ... 319s bisapdf (ones (2), ones (3), ones(2)) 319s ***** error ... 319s bisapdf (ones (2), ones (2), ones(3)) 319s ***** error bisapdf (i, 4, 3) 319s ***** error bisapdf (1, i, 3) 319s ***** error bisapdf (1, 4, i) 319s 20 tests, 20 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/cauchypdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/cauchypdf.m 319s ***** demo 319s ## Plot various PDFs from the Cauchy distribution 319s x = -5:0.01:5; 319s y1 = cauchypdf (x, 0, 0.5); 319s y2 = cauchypdf (x, 0, 1); 319s y3 = cauchypdf (x, 0, 2); 319s y4 = cauchypdf (x, -2, 1); 319s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 319s grid on 319s xlim ([-5, 5]) 319s ylim ([0, 0.7]) 319s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 319s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 319s title ("Cauchy PDF") 319s xlabel ("values in x") 319s ylabel ("density") 319s ***** shared x, y 319s x = [-1 0 0.5 1 2]; 319s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 319s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 319s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 319s ***** assert (cauchypdf (x, ones (1,5), 2), y) 319s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 319s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 319s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 319s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 319s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 319s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 319s ***** test 319s x = rand (10, 1); 319s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 319s ***** error cauchypdf () 319s ***** error cauchypdf (1) 319s ***** error ... 319s cauchypdf (1, 2) 319s ***** error cauchypdf (1, 2, 3, 4) 319s ***** error ... 319s cauchypdf (ones (3), ones (2), ones(2)) 319s ***** error ... 319s cauchypdf (ones (2), ones (3), ones(2)) 319s ***** error ... 319s cauchypdf (ones (2), ones (2), ones(3)) 319s ***** error cauchypdf (i, 4, 3) 319s ***** error cauchypdf (1, i, 3) 319s ***** error cauchypdf (1, 4, i) 319s 20 tests, 20 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/logncdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logncdf.m 319s ***** demo 319s ## Plot various CDFs from the log-normal distribution 319s x = 0:0.01:3; 319s p1 = logncdf (x, 0, 1); 319s p2 = logncdf (x, 0, 0.5); 319s p3 = logncdf (x, 0, 0.25); 319s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 319s grid on 319s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 319s "location", "southeast") 319s title ("Log-normal CDF") 319s xlabel ("values in x") 319s ylabel ("probability") 319s ***** shared x, y 319s x = [-1, 0, 1, e, Inf]; 319s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 319s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 319s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 319s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 319s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 319s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 319s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 319s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 319s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 319s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 319s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 319s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 319s ***** error logncdf () 319s ***** error logncdf (1,2,3,4,5,6,7) 319s ***** error logncdf (1, 2, 3, 4, "uper") 319s ***** error ... 319s logncdf (ones (3), ones (2), ones (2)) 319s ***** error logncdf (2, 3, 4, [1, 2]) 319s ***** error ... 319s [p, plo, pup] = logncdf (1, 2, 3) 319s ***** error [p, plo, pup] = ... 319s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 319s ***** error [p, plo, pup] = ... 319s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 319s ***** error [p, plo, pup] = ... 319s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 319s ***** error logncdf (i, 2, 2) 319s ***** error logncdf (2, i, 2) 319s ***** error logncdf (2, 2, i) 319s ***** error ... 319s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 319s 24 tests, 24 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/gppdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gppdf.m 319s ***** demo 319s ## Plot various PDFs from the generalized Pareto distribution 319s x = 0:0.001:5; 319s y1 = gppdf (x, 1, 1, 0); 319s y2 = gppdf (x, 5, 1, 0); 319s y3 = gppdf (x, 20, 1, 0); 319s y4 = gppdf (x, 1, 2, 0); 319s y5 = gppdf (x, 5, 2, 0); 319s y6 = gppdf (x, 20, 2, 0); 319s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 319s x, y4, "-c", x, y5, "-m", x, y6, "-k") 319s grid on 319s xlim ([0, 5]) 319s ylim ([0, 1]) 319s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 319s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 319s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 319s "location", "northeast") 319s title ("Generalized Pareto PDF") 319s xlabel ("values in x") 319s ylabel ("density") 319s ***** shared x, y1, y2, y3 319s x = [-Inf, -1, 0, 1/2, 1, Inf]; 319s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 319s y2 = [0, 0, 1, 4/9, 1/4, 0]; 319s y3 = [0, 0, 1, 1, 1, 0]; 319s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 319s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 319s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 319s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 319s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 319s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 319s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 319s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 319s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 319s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 319s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 319s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 319s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 319s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 319s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 319s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 319s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 319s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 319s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 319s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 319s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 319s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 319s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 319s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 319s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 319s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 319s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 319s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 319s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 319s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 319s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 319s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 319s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 319s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 319s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 319s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 319s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 319s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 319s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 319s ***** error gpcdf () 319s ***** error gpcdf (1) 319s ***** error gpcdf (1, 2) 319s ***** error gpcdf (1, 2, 3) 319s ***** error ... 319s gpcdf (ones (3), ones (2), ones(2), ones(2)) 319s ***** error ... 319s gpcdf (ones (2), ones (3), ones(2), ones(2)) 319s ***** error ... 319s gpcdf (ones (2), ones (2), ones(3), ones(2)) 319s ***** error ... 319s gpcdf (ones (2), ones (2), ones(2), ones(3)) 319s ***** error gpcdf (i, 2, 3, 4) 319s ***** error gpcdf (1, i, 3, 4) 319s ***** error gpcdf (1, 2, i, 4) 319s ***** error gpcdf (1, 2, 3, i) 319s 51 tests, 51 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/betarnd.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/betarnd.m 319s ***** assert (size (betarnd (2, 1/2)), [1 1]) 319s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 319s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 319s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 319s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 319s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 319s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 319s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 319s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 319s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 319s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 319s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 319s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 319s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 319s ***** assert (class (betarnd (1, 1)), "double") 319s ***** assert (class (betarnd (1, single (0))), "single") 319s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 319s ***** assert (class (betarnd (1, single (1), 2)), "single") 319s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 319s ***** assert (class (betarnd (single (1), 1, 2)), "single") 319s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 319s ***** error betarnd () 319s ***** error betarnd (1) 319s ***** error ... 319s betarnd (ones (3), ones (2)) 319s ***** error ... 319s betarnd (ones (2), ones (3)) 319s ***** error betarnd (i, 2) 319s ***** error betarnd (1, i) 319s ***** error ... 319s betarnd (1, 1/2, -1) 319s ***** error ... 319s betarnd (1, 1/2, 1.2) 319s ***** error ... 319s betarnd (1, 1/2, ones (2)) 319s ***** error ... 319s betarnd (1, 1/2, [2 -1 2]) 319s ***** error ... 319s betarnd (1, 1/2, [2 0 2.5]) 319s ***** error ... 319s betarnd (1, 1/2, 2, -1, 5) 319s ***** error ... 319s betarnd (1, 1/2, 2, 1.5, 5) 319s ***** error ... 319s betarnd (2, 1/2 * ones (2), 3) 319s ***** error ... 319s betarnd (2, 1/2 * ones (2), [3, 2]) 319s ***** error ... 319s betarnd (2, 1/2 * ones (2), 3, 2) 319s ***** error ... 319s betarnd (2 * ones (2), 1/2, 3) 319s ***** error ... 319s betarnd (2 * ones (2), 1/2, [3, 2]) 319s ***** error ... 319s betarnd (2 * ones (2), 1/2, 3, 2) 319s 40 tests, 40 passed, 0 known failure, 0 skipped 319s [inst/dist_fun/binocdf.m] 319s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/binocdf.m 319s ***** demo 319s ## Plot various CDFs from the binomial distribution 319s x = 0:40; 319s p1 = binocdf (x, 20, 0.5); 319s p2 = binocdf (x, 20, 0.7); 319s p3 = binocdf (x, 40, 0.5); 319s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 319s grid on 319s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 319s "n = 40, ps = 0.5"}, "location", "southeast") 319s title ("Binomial CDF") 319s xlabel ("values in x (number of successes)") 319s ylabel ("probability") 319s ***** shared x, p, p1 319s x = [-1 0 1 2 3]; 319s p = [0 1/4 3/4 1 1]; 319s p1 = 1 - p; 319s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 320s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 320s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 320s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 320s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 320s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 320s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 320s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 320s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 320s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 320s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 320s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 320s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 320s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 320s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 320s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 320s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 320s ***** error binocdf () 320s ***** error binocdf (1) 320s ***** error binocdf (1, 2) 320s ***** error binocdf (1, 2, 3, 4, 5) 320s ***** error binocdf (1, 2, 3, "tail") 320s ***** error binocdf (1, 2, 3, 4) 320s ***** error ... 320s binocdf (ones (3), ones (2), ones (2)) 320s ***** error ... 320s binocdf (ones (2), ones (3), ones (2)) 320s ***** error ... 320s binocdf (ones (2), ones (2), ones (3)) 320s ***** error binocdf (i, 2, 2) 320s ***** error binocdf (2, i, 2) 320s ***** error binocdf (2, 2, i) 320s 29 tests, 29 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/poissrnd.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/poissrnd.m 320s ***** assert (size (poissrnd (2)), [1, 1]) 320s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 320s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 320s ***** assert (size (poissrnd (1, 3)), [3, 3]) 320s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 320s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 320s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 320s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 320s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 320s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 320s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 320s ***** assert (poissrnd (0, 1, 1), 0) 320s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 320s ***** assert (class (poissrnd (2)), "double") 320s ***** assert (class (poissrnd (single (2))), "single") 320s ***** assert (class (poissrnd (single ([2 2]))), "single") 320s ***** error poissrnd () 320s ***** error poissrnd (i) 320s ***** error ... 320s poissrnd (1, -1) 320s ***** error ... 320s poissrnd (1, 1.2) 320s ***** error ... 320s poissrnd (1, ones (2)) 320s ***** error ... 320s poissrnd (1, [2 -1 2]) 320s ***** error ... 320s poissrnd (1, [2 0 2.5]) 320s ***** error ... 320s poissrnd (ones (2), ones (2)) 320s ***** error ... 320s poissrnd (1, 2, -1, 5) 320s ***** error ... 320s poissrnd (1, 2, 1.5, 5) 320s ***** error poissrnd (ones (2,2), 3) 320s ***** error poissrnd (ones (2,2), [3, 2]) 320s ***** error poissrnd (ones (2,2), 2, 3) 320s 29 tests, 29 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/gumbelrnd.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gumbelrnd.m 320s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 320s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 320s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 320s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 320s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 320s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 320s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 320s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 320s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 320s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 320s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 320s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 320s ***** assert (class (gumbelrnd (1, 1)), "double") 320s ***** assert (class (gumbelrnd (1, single (1))), "single") 320s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 320s ***** assert (class (gumbelrnd (single (1), 1)), "single") 320s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 320s ***** error gumbelrnd () 320s ***** error gumbelrnd (1) 320s ***** error ... 320s gumbelrnd (ones (3), ones (2)) 320s ***** error ... 320s gumbelrnd (ones (2), ones (3)) 320s ***** error gumbelrnd (i, 2, 3) 320s ***** error gumbelrnd (1, i, 3) 320s ***** error ... 320s gumbelrnd (1, 2, -1) 320s ***** error ... 320s gumbelrnd (1, 2, 1.2) 320s ***** error ... 320s gumbelrnd (1, 2, ones (2)) 320s ***** error ... 320s gumbelrnd (1, 2, [2 -1 2]) 320s ***** error ... 320s gumbelrnd (1, 2, [2 0 2.5]) 320s ***** error ... 320s gumbelrnd (1, 2, 2, -1, 5) 320s ***** error ... 320s gumbelrnd (1, 2, 2, 1.5, 5) 320s ***** error ... 320s gumbelrnd (2, ones (2), 3) 320s ***** error ... 320s gumbelrnd (2, ones (2), [3, 2]) 320s ***** error ... 320s gumbelrnd (2, ones (2), 3, 2) 320s 33 tests, 33 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/norminv.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/norminv.m 320s ***** demo 320s ## Plot various iCDFs from the normal distribution 320s p = 0.001:0.001:0.999; 320s x1 = norminv (p, 0, 0.5); 320s x2 = norminv (p, 0, 1); 320s x3 = norminv (p, 0, 2); 320s x4 = norminv (p, -2, 0.8); 320s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 320s grid on 320s ylim ([-5, 5]) 320s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 320s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 320s title ("Normal iCDF") 320s xlabel ("probability") 320s ylabel ("values in x") 320s ***** shared p 320s p = [-1 0 0.5 1 2]; 320s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 320s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 320s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 320s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 320s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 320s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 320s ***** assert (norminv (p), probit (p)) 320s ***** assert (norminv (0.31254), probit (0.31254)) 320s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 320s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 320s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 320s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 320s ***** error norminv () 320s ***** error ... 320s norminv (ones (3), ones (2), ones (2)) 320s ***** error ... 320s norminv (ones (2), ones (3), ones (2)) 320s ***** error ... 320s norminv (ones (2), ones (2), ones (3)) 320s ***** error norminv (i, 2, 2) 320s ***** error norminv (2, i, 2) 320s ***** error norminv (2, 2, i) 320s 19 tests, 19 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/geoinv.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/geoinv.m 320s ***** demo 320s ## Plot various iCDFs from the geometric distribution 320s p = 0.001:0.001:0.999; 320s x1 = geoinv (p, 0.2); 320s x2 = geoinv (p, 0.5); 320s x3 = geoinv (p, 0.7); 320s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 320s grid on 320s ylim ([0, 10]) 320s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 320s title ("Geometric iCDF") 320s xlabel ("probability") 320s ylabel ("values in x (number of failures)") 320s ***** shared p 320s p = [-1 0 0.75 1 2]; 320s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 320s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 320s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 320s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 320s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 320s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 320s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 320s ***** error geoinv () 320s ***** error geoinv (1) 320s ***** error ... 320s geoinv (ones (3), ones (2)) 320s ***** error ... 320s geoinv (ones (2), ones (3)) 320s ***** error ... 320s geoinv (i, 2) 320s ***** error ... 320s geoinv (2, i) 320s 13 tests, 13 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/nakarnd.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nakarnd.m 320s ***** assert (size (nakarnd (1, 1)), [1 1]) 320s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 320s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 320s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 320s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 320s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 320s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 320s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 320s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 320s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 320s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 320s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 320s ***** assert (class (nakarnd (1, 1)), "double") 320s ***** assert (class (nakarnd (1, single (1))), "single") 320s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 320s ***** assert (class (nakarnd (single (1), 1)), "single") 320s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 320s ***** error nakarnd () 320s ***** error nakarnd (1) 320s ***** error ... 320s nakarnd (ones (3), ones (2)) 320s ***** error ... 320s nakarnd (ones (2), ones (3)) 320s ***** error nakarnd (i, 2, 3) 320s ***** error nakarnd (1, i, 3) 320s ***** error ... 320s nakarnd (1, 2, -1) 320s ***** error ... 320s nakarnd (1, 2, 1.2) 320s ***** error ... 320s nakarnd (1, 2, ones (2)) 320s ***** error ... 320s nakarnd (1, 2, [2 -1 2]) 320s ***** error ... 320s nakarnd (1, 2, [2 0 2.5]) 320s ***** error ... 320s nakarnd (1, 2, 2, -1, 5) 320s ***** error ... 320s nakarnd (1, 2, 2, 1.5, 5) 320s ***** error ... 320s nakarnd (2, ones (2), 3) 320s ***** error ... 320s nakarnd (2, ones (2), [3, 2]) 320s ***** error ... 320s nakarnd (2, ones (2), 3, 2) 320s 33 tests, 33 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/hncdf.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hncdf.m 320s ***** demo 320s ## Plot various CDFs from the half-normal distribution 320s x = 0:0.001:10; 320s p1 = hncdf (x, 0, 1); 320s p2 = hncdf (x, 0, 2); 320s p3 = hncdf (x, 0, 3); 320s p4 = hncdf (x, 0, 5); 320s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 320s grid on 320s xlim ([0, 10]) 320s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 320s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 320s title ("Half-normal CDF") 320s xlabel ("values in x") 320s ylabel ("probability") 320s ***** demo 320s ## Plot half-normal against normal cumulative distribution function 320s x = -5:0.001:5; 320s p1 = hncdf (x, 0, 1); 320s p2 = normcdf (x); 320s plot (x, p1, "-b", x, p2, "-g") 320s grid on 320s xlim ([-5, 5]) 320s legend ({"half-normal with μ = 0, σ = 1", ... 320s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 320s title ("Half-normal against standard normal CDF") 320s xlabel ("values in x") 320s ylabel ("probability") 320s ***** shared x, p1, p1u, y2, y2u, y3, y3u 320s x = [-Inf, -1, 0, 1/2, 1, Inf]; 320s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 320s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 320s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 320s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 320s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 320s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 320s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 320s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 320s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 320s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 320s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 320s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 320s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 320s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 320s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 320s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 320s ***** error hncdf () 320s ***** error hncdf (1) 320s ***** error hncdf (1, 2) 320s ***** error hncdf (1, 2, 3, "tail") 320s ***** error hncdf (1, 2, 3, 5) 320s ***** error ... 320s hncdf (ones (3), ones (2), ones(2)) 320s ***** error ... 320s hncdf (ones (2), ones (3), ones(2)) 320s ***** error ... 320s hncdf (ones (2), ones (2), ones(3)) 320s ***** error hncdf (i, 2, 3) 320s ***** error hncdf (1, i, 3) 320s ***** error hncdf (1, 2, i) 320s 25 tests, 25 passed, 0 known failure, 0 skipped 320s [inst/dist_fun/mvtcdf.m] 320s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvtcdf.m 320s ***** demo 320s ## Compute the cdf of a multivariate Student's t distribution with 320s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 320s 320s rho = [1, 0.4; 0.4, 1]; 320s df = 2; 320s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 320s X = [X1(:), X2(:)]; 320s p = mvtcdf (X, rho, df); 320s surf (X1, X2, reshape (p, 25, 25)); 320s title ("Bivariate Student's t cummulative distribution function"); 320s ***** test 320s x = [1, 2]; 320s rho = [1, 0.5; 0.5, 1]; 320s df = 4; 320s a = [-1, 0]; 320s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 320s ***** test 320s x = [1, 2;2, 4;1, 5]; 320s rho = [1, 0.5; 0.5, 1]; 320s df = 4; 320s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 320s assert (mvtcdf(x, rho, df), p, 1e-14); 320s ***** test 320s x = [1, 2, 2, 4, 1, 5]; 320s rho = eye (6); 320s rho(rho == 0) = 0.5; 320s df = 4; 320s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 331s ***** error mvtcdf (1) 331s ***** error mvtcdf (1, 2) 331s ***** error ... 331s mvtcdf (1, [2, 3; 3, 2], 1) 331s ***** error ... 331s mvtcdf ([2, 3, 4], ones (2), 1) 331s ***** error ... 331s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 331s ***** error ... 331s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 331s ***** error ... 331s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 331s 10 tests, 10 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/geopdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/geopdf.m 331s ***** demo 331s ## Plot various PDFs from the geometric distribution 331s x = 0:10; 331s y1 = geopdf (x, 0.2); 331s y2 = geopdf (x, 0.5); 331s y3 = geopdf (x, 0.7); 331s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 331s grid on 331s ylim ([0, 0.8]) 331s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 331s title ("Geometric PDF") 331s xlabel ("values in x (number of failures)") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-1 0 1 Inf]; 331s y = [0, 1/2, 1/4, NaN]; 331s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 331s ***** assert (geopdf (x, 0.5), y) 331s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 331s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 331s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 331s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 331s ***** error geopdf () 331s ***** error geopdf (1) 331s ***** error geopdf (1,2,3) 331s ***** error geopdf (ones (3), ones (2)) 331s ***** error geopdf (ones (2), ones (3)) 331s ***** error geopdf (i, 2) 331s ***** error geopdf (2, i) 331s 13 tests, 13 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/logipdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logipdf.m 331s ***** demo 331s ## Plot various PDFs from the logistic distribution 331s x = -5:0.01:20; 331s y1 = logipdf (x, 5, 2); 331s y2 = logipdf (x, 9, 3); 331s y3 = logipdf (x, 9, 4); 331s y4 = logipdf (x, 6, 2); 331s y5 = logipdf (x, 2, 1); 331s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 331s grid on 331s ylim ([0, 0.3]) 331s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 331s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 331s title ("Logistic PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-Inf -log(4) 0 log(4) Inf]; 331s y = [0, 0.16, 1/4, 0.16, 0]; 331s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 331s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 331s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 331s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 331s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 331s ***** error logipdf () 331s ***** error logipdf (1) 331s ***** error ... 331s logipdf (1, 2) 331s ***** error ... 331s logipdf (1, ones (2), ones (3)) 331s ***** error ... 331s logipdf (ones (2), 1, ones (3)) 331s ***** error ... 331s logipdf (ones (2), ones (3), 1) 331s ***** error logipdf (i, 2, 3) 331s ***** error logipdf (1, i, 3) 331s ***** error logipdf (1, 2, i) 331s 14 tests, 14 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/copulapdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/copulapdf.m 331s ***** test 331s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 331s theta = [1; 2]; 331s y = copulapdf ("Clayton", x, theta); 331s expected_p = [0.9872; 0.7295]; 331s assert (y, expected_p, 0.001); 331s ***** test 331s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 331s y = copulapdf ("Gumbel", x, 2); 331s expected_p = [0.9468; 0.9468]; 331s assert (y, expected_p, 0.001); 331s ***** test 331s x = [0.2, 0.6; 0.2, 0.6]; 331s theta = [1; 2]; 331s y = copulapdf ("Frank", x, theta); 331s expected_p = [0.9378; 0.8678]; 331s assert (y, expected_p, 0.001); 331s ***** test 331s x = [0.2, 0.6; 0.2, 0.6]; 331s theta = [0.3; 0.7]; 331s y = copulapdf ("AMH", x, theta); 331s expected_p = [0.9540; 0.8577]; 331s assert (y, expected_p, 0.001); 331s 4 tests, 4 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/mnpdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mnpdf.m 331s ***** test 331s x = [1, 4, 2]; 331s pk = [0.2, 0.5, 0.3]; 331s y = mnpdf (x, pk); 331s assert (y, 0.11812, 0.001); 331s ***** test 331s x = [1, 4, 2; 1, 0, 9]; 331s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 331s y = mnpdf (x, pk); 331s assert (y, [0.11812; 0.13422], 0.001); 331s 2 tests, 2 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/nakainv.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nakainv.m 331s ***** demo 331s ## Plot various iCDFs from the Nakagami distribution 331s p = 0.001:0.001:0.999; 331s x1 = nakainv (p, 0.5, 1); 331s x2 = nakainv (p, 1, 1); 331s x3 = nakainv (p, 1, 2); 331s x4 = nakainv (p, 1, 3); 331s x5 = nakainv (p, 2, 1); 331s x6 = nakainv (p, 2, 2); 331s x7 = nakainv (p, 5, 1); 331s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 331s p, x5, "-k", p, x6, "-b", p, x7, "-c") 331s grid on 331s ylim ([0, 3]) 331s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 331s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 331s "μ = 5, ω = 1"}, "location", "northwest") 331s title ("Nakagami iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p, y 331s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 331s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 331s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 331s ***** assert (nakainv (p, 1, 1), y, eps) 331s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 331s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 331s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 331s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 331s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 331s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 331s ***** error nakainv () 331s ***** error nakainv (1) 331s ***** error nakainv (1, 2) 331s ***** error ... 331s nakainv (ones (3), ones (2), ones(2)) 331s ***** error ... 331s nakainv (ones (2), ones (3), ones(2)) 331s ***** error ... 331s nakainv (ones (2), ones (2), ones(3)) 331s ***** error nakainv (i, 4, 3) 331s ***** error nakainv (1, i, 3) 331s ***** error nakainv (1, 4, i) 331s 17 tests, 17 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/mnrnd.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mnrnd.m 331s ***** test 331s n = 10; 331s pk = [0.2, 0.5, 0.3]; 331s r = mnrnd (n, pk); 331s assert (size (r), size (pk)); 331s assert (all (r >= 0)); 331s assert (all (round (r) == r)); 331s assert (sum (r) == n); 331s ***** test 331s n = 10 * ones (3, 1); 331s pk = [0.2, 0.5, 0.3]; 331s r = mnrnd (n, pk); 331s assert (size (r), [length(n), length(pk)]); 331s assert (all (r >= 0)); 331s assert (all (round (r) == r)); 331s assert (all (sum (r, 2) == n)); 331s ***** test 331s n = (1:2)'; 331s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 331s r = mnrnd (n, pk); 331s assert (size (r), size (pk)); 331s assert (all (r >= 0)); 331s assert (all (round (r) == r)); 331s assert (all (sum (r, 2) == n)); 331s 3 tests, 3 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/unidcdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unidcdf.m 331s ***** demo 331s ## Plot various CDFs from the discrete uniform distribution 331s x = 0:10; 331s p1 = unidcdf (x, 5); 331s p2 = unidcdf (x, 9); 331s plot (x, p1, "*b", x, p2, "*g") 331s grid on 331s xlim ([0, 10]) 331s ylim ([0, 1]) 331s legend ({"N = 5", "N = 9"}, "location", "southeast") 331s title ("Discrete uniform CDF") 331s xlabel ("values in x") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [0 1 2.5 10 11]; 331s y = [0, 0.1 0.2 1.0 1.0]; 331s ***** assert (unidcdf (x, 10*ones (1,5)), y) 331s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 331s ***** assert (unidcdf (x, 10), y) 331s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 331s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 331s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 331s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 331s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 331s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 331s ***** error unidcdf () 331s ***** error unidcdf (1) 331s ***** error unidcdf (1, 2, 3) 331s ***** error unidcdf (1, 2, "tail") 331s ***** error ... 331s unidcdf (ones (3), ones (2)) 331s ***** error ... 331s unidcdf (ones (2), ones (3)) 331s ***** error unidcdf (i, 2) 331s ***** error unidcdf (2, i) 331s 17 tests, 17 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/cauchyinv.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/cauchyinv.m 331s ***** demo 331s ## Plot various iCDFs from the Cauchy distribution 331s p = 0.001:0.001:0.999; 331s x1 = cauchyinv (p, 0, 0.5); 331s x2 = cauchyinv (p, 0, 1); 331s x3 = cauchyinv (p, 0, 2); 331s x4 = cauchyinv (p, -2, 1); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 331s grid on 331s ylim ([-5, 5]) 331s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 331s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 331s title ("Cauchy iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p 331s p = [-1 0 0.5 1 2]; 331s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 331s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 331s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 331s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 331s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 331s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 331s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 331s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 331s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 331s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 331s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 331s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 331s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 331s ***** error cauchyinv () 331s ***** error cauchyinv (1) 331s ***** error ... 331s cauchyinv (1, 2) 331s ***** error cauchyinv (1, 2, 3, 4) 331s ***** error ... 331s cauchyinv (ones (3), ones (2), ones(2)) 331s ***** error ... 331s cauchyinv (ones (2), ones (3), ones(2)) 331s ***** error ... 331s cauchyinv (ones (2), ones (2), ones(3)) 331s ***** error cauchyinv (i, 4, 3) 331s ***** error cauchyinv (1, i, 3) 331s ***** error cauchyinv (1, 4, i) 331s 20 tests, 20 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/burrcdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/burrcdf.m 331s ***** demo 331s ## Plot various CDFs from the Burr type XII distribution 331s x = 0.001:0.001:5; 331s p1 = burrcdf (x, 1, 1, 1); 331s p2 = burrcdf (x, 1, 1, 2); 331s p3 = burrcdf (x, 1, 1, 3); 331s p4 = burrcdf (x, 1, 2, 1); 331s p5 = burrcdf (x, 1, 3, 1); 331s p6 = burrcdf (x, 1, 0.5, 2); 331s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 331s x, p4, "-c", x, p5, "-m", x, p6, "-k") 331s grid on 331s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 331s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 331s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 331s "location", "southeast") 331s title ("Burr type XII CDF") 331s xlabel ("values in x") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [-1, 0, 1, 2, Inf]; 331s y = [0, 0, 1/2, 2/3, 1]; 331s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 331s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 331s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 331s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 331s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 331s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 331s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 331s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 331s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 331s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 331s ***** error burrcdf () 331s ***** error burrcdf (1) 331s ***** error burrcdf (1, 2) 331s ***** error burrcdf (1, 2, 3) 331s ***** error ... 331s burrcdf (1, 2, 3, 4, 5, 6) 331s ***** error burrcdf (1, 2, 3, 4, "tail") 331s ***** error burrcdf (1, 2, 3, 4, 5) 331s ***** error ... 331s burrcdf (ones (3), ones (2), ones(2), ones(2)) 331s ***** error ... 331s burrcdf (ones (2), ones (3), ones(2), ones(2)) 331s ***** error ... 331s burrcdf (ones (2), ones (2), ones(3), ones(2)) 331s ***** error ... 331s burrcdf (ones (2), ones (2), ones(2), ones(3)) 331s ***** error burrcdf (i, 2, 3, 4) 331s ***** error burrcdf (1, i, 3, 4) 331s ***** error burrcdf (1, 2, i, 4) 331s ***** error burrcdf (1, 2, 3, i) 331s 25 tests, 25 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/triinv.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/triinv.m 331s ***** demo 331s ## Plot various iCDFs from the triangular distribution 331s p = 0.001:0.001:0.999; 331s x1 = triinv (p, 3, 6, 4); 331s x2 = triinv (p, 1, 5, 2); 331s x3 = triinv (p, 2, 9, 3); 331s x4 = triinv (p, 2, 9, 5); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 331s grid on 331s ylim ([0, 10]) 331s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 331s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 331s "location", "northwest") 331s title ("Triangular CDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p, y 331s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 331s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 331s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 331s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 331s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 331s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 331s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 331s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 331s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 331s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 331s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 331s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 331s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 331s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 331s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 331s ***** error triinv () 331s ***** error triinv (1) 331s ***** error triinv (1, 2) 331s ***** error triinv (1, 2, 3) 331s ***** error ... 331s triinv (1, 2, 3, 4, 5) 331s ***** error ... 331s triinv (ones (3), ones (2), ones(2), ones(2)) 331s ***** error ... 331s triinv (ones (2), ones (3), ones(2), ones(2)) 331s ***** error ... 331s triinv (ones (2), ones (2), ones(3), ones(2)) 331s ***** error ... 331s triinv (ones (2), ones (2), ones(2), ones(3)) 331s ***** error triinv (i, 2, 3, 4) 331s ***** error triinv (1, i, 3, 4) 331s ***** error triinv (1, 2, i, 4) 331s ***** error triinv (1, 2, 3, i) 331s 26 tests, 26 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/ricecdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ricecdf.m 331s ***** demo 331s ## Plot various CDFs from the Rician distribution 331s x = 0:0.01:10; 331s p1 = ricecdf (x, 0, 1); 331s p2 = ricecdf (x, 0.5, 1); 331s p3 = ricecdf (x, 1, 1); 331s p4 = ricecdf (x, 2, 1); 331s p5 = ricecdf (x, 4, 1); 331s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 331s grid on 331s ylim ([0, 1]) 331s xlim ([0, 8]) 331s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 331s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 331s title ("Rician CDF") 331s xlabel ("values in x") 331s ylabel ("probability") 331s ***** demo 331s ## Plot various CDFs from the Rician distribution 331s x = 0:0.01:10; 331s p1 = ricecdf (x, 0, 0.5); 331s p2 = ricecdf (x, 0, 2); 331s p3 = ricecdf (x, 0, 3); 331s p4 = ricecdf (x, 2, 2); 331s p5 = ricecdf (x, 4, 2); 331s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 331s grid on 331s ylim ([0, 1]) 331s xlim ([0, 8]) 331s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 331s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 331s title ("Rician CDF") 331s xlabel ("values in x") 331s ylabel ("probability") 331s ***** test 331s x = 0:0.5:2.5; 331s s = 1:6; 331s p = ricecdf (x, s, 1); 331s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 331s assert (p, expected_p, 0.001); 331s ***** test 331s x = 0:0.5:2.5; 331s sigma = 1:6; 331s p = ricecdf (x, 1, sigma); 331s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 331s assert (p, expected_p, 0.001); 331s ***** test 331s x = 0:0.5:2.5; 331s p = ricecdf (x, 0, 1); 331s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 331s assert (p, expected_p, 0.001); 331s ***** test 331s x = 0:0.5:2.5; 331s p = ricecdf (x, 1, 1); 331s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 331s assert (p, expected_p, 0.001); 331s ***** shared x, p 331s x = [-1, 0, 1, 2, Inf]; 331s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 331s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 331s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 331s ***** error ricecdf () 331s ***** error ricecdf (1) 331s ***** error ricecdf (1, 2) 331s ***** error ricecdf (1, 2, 3, "uper") 331s ***** error ricecdf (1, 2, 3, 4) 331s ***** error ... 331s ricecdf (ones (3), ones (2), ones (2)) 331s ***** error ... 331s ricecdf (ones (2), ones (3), ones (2)) 331s ***** error ... 331s ricecdf (ones (2), ones (2), ones (3)) 331s ***** error ricecdf (i, 2, 3) 331s ***** error ricecdf (2, i, 3) 331s ***** error ricecdf (2, 2, i) 331s 17 tests, 17 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/nakapdf.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nakapdf.m 331s ***** demo 331s ## Plot various PDFs from the Nakagami distribution 331s x = 0:0.01:3; 331s y1 = nakapdf (x, 0.5, 1); 331s y2 = nakapdf (x, 1, 1); 331s y3 = nakapdf (x, 1, 2); 331s y4 = nakapdf (x, 1, 3); 331s y5 = nakapdf (x, 2, 1); 331s y6 = nakapdf (x, 2, 2); 331s y7 = nakapdf (x, 5, 1); 331s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 331s x, y5, "-k", x, y6, "-b", x, y7, "-c") 331s grid on 331s xlim ([0, 3]) 331s ylim ([0, 2]) 331s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 331s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 331s "μ = 5, ω = 1"}, "location", "northeast") 331s title ("Nakagami PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-1, 0, 1, 2, Inf]; 331s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 331s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 331s ***** assert (nakapdf (x, 1, 1), y, eps) 331s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 331s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 331s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 331s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 331s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 331s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 331s ***** error nakapdf () 331s ***** error nakapdf (1) 331s ***** error nakapdf (1, 2) 331s ***** error ... 331s nakapdf (ones (3), ones (2), ones(2)) 331s ***** error ... 331s nakapdf (ones (2), ones (3), ones(2)) 331s ***** error ... 331s nakapdf (ones (2), ones (2), ones(3)) 331s ***** error nakapdf (i, 4, 3) 331s ***** error nakapdf (1, i, 3) 331s ***** error nakapdf (1, 4, i) 331s 17 tests, 17 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/raylrnd.m] 331s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/raylrnd.m 331s ***** assert (size (raylrnd (2)), [1, 1]) 331s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 331s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 331s ***** assert (size (raylrnd (1, 3)), [3, 3]) 331s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 331s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 331s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 331s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 331s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 331s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 331s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 331s ***** assert (raylrnd (0, 1, 1), NaN) 331s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 332s ***** assert (class (raylrnd (2)), "double") 332s ***** assert (class (raylrnd (single (2))), "single") 332s ***** assert (class (raylrnd (single ([2 2]))), "single") 332s ***** error raylrnd () 332s ***** error raylrnd (i) 332s ***** error ... 332s raylrnd (1, -1) 332s ***** error ... 332s raylrnd (1, 1.2) 332s ***** error ... 332s raylrnd (1, ones (2)) 332s ***** error ... 332s raylrnd (1, [2 -1 2]) 332s ***** error ... 332s raylrnd (1, [2 0 2.5]) 332s ***** error ... 332s raylrnd (ones (2), ones (2)) 332s ***** error ... 332s raylrnd (1, 2, -1, 5) 332s ***** error ... 332s raylrnd (1, 2, 1.5, 5) 332s ***** error raylrnd (ones (2,2), 3) 332s ***** error raylrnd (ones (2,2), [3, 2]) 332s ***** error raylrnd (ones (2,2), 2, 3) 332s 29 tests, 29 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/invginv.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/invginv.m 332s ***** demo 332s ## Plot various iCDFs from the inverse Gaussian distribution 332s p = 0.001:0.001:0.999; 332s x1 = invginv (p, 1, 0.2); 332s x2 = invginv (p, 1, 1); 332s x3 = invginv (p, 1, 3); 332s x4 = invginv (p, 3, 0.2); 332s x5 = invginv (p, 3, 1); 332s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 332s grid on 332s ylim ([0, 3]) 332s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 332s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 332s title ("Inverse Gaussian iCDF") 332s xlabel ("probability") 332s ylabel ("x") 332s ***** shared p, x 332s p = [0, 0.3829, 0.6827, 1]; 332s x = [0, 0.5207, 1.0376, Inf]; 332s ***** assert (invginv (p, 1, 1), x, 1e-4); 332s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 332s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 332s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 332s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 332s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 332s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 332s ***** error invginv (1) 332s ***** error invginv (1, 2) 332s ***** error ... 332s invginv (1, ones (2), ones (3)) 332s ***** error ... 332s invginv (ones (2), 1, ones (3)) 332s ***** error ... 332s invginv (ones (2), ones (3), 1) 332s ***** error invginv (i, 2, 3) 332s ***** error invginv (1, i, 3) 332s ***** error invginv (1, 2, i) 332s 15 tests, 15 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/wienrnd.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wienrnd.m 332s ***** error wienrnd (0) 332s ***** error wienrnd (1, 3, -50) 332s ***** error wienrnd (5, 0) 332s ***** error wienrnd (0.4, 3, 5) 332s ***** error wienrnd ([1 4], 3, 5) 332s 5 tests, 5 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/betainv.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/betainv.m 332s ***** demo 332s ## Plot various iCDFs from the Beta distribution 332s p = 0.001:0.001:0.999; 332s x1 = betainv (p, 0.5, 0.5); 332s x2 = betainv (p, 5, 1); 332s x3 = betainv (p, 1, 3); 332s x4 = betainv (p, 2, 2); 332s x5 = betainv (p, 2, 5); 332s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 332s grid on 332s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 332s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 332s title ("Beta iCDF") 332s xlabel ("probability") 332s ylabel ("values in x") 332s ***** shared p 332s p = [-1 0 0.75 1 2]; 332s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 332s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 332s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 332s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 332s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 332s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 332s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 332s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 332s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 332s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 332s ***** error betainv () 332s ***** error betainv (1) 332s ***** error betainv (1,2) 332s ***** error betainv (1,2,3,4) 332s ***** error ... 332s betainv (ones (3), ones (2), ones (2)) 332s ***** error ... 332s betainv (ones (2), ones (3), ones (2)) 332s ***** error ... 332s betainv (ones (2), ones (2), ones (3)) 332s ***** error betainv (i, 2, 2) 332s ***** error betainv (2, i, 2) 332s ***** error betainv (2, 2, i) 332s 20 tests, 20 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/nbinpdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nbinpdf.m 332s ***** demo 332s ## Plot various PDFs from the negative binomial distribution 332s x = 0:40; 332s y1 = nbinpdf (x, 2, 0.15); 332s y2 = nbinpdf (x, 5, 0.2); 332s y3 = nbinpdf (x, 4, 0.4); 332s y4 = nbinpdf (x, 10, 0.3); 332s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 332s grid on 332s xlim ([0, 40]) 332s ylim ([0, 0.12]) 332s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 332s "r = 10, ps = 0.3"}, "location", "northeast") 332s title ("Negative binomial PDF") 332s xlabel ("values in x (number of failures)") 332s ylabel ("density") 332s ***** shared x, y 332s x = [-1 0 1 2 Inf]; 332s y = [0 1/2 1/4 1/8 NaN]; 332s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 332s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 332s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 332s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 332s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 332s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 332s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 332s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 332s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 332s ***** error nbinpdf () 332s ***** error nbinpdf (1) 332s ***** error nbinpdf (1, 2) 332s ***** error ... 332s nbinpdf (ones (3), ones (2), ones (2)) 332s ***** error ... 332s nbinpdf (ones (2), ones (3), ones (2)) 332s ***** error ... 332s nbinpdf (ones (2), ones (2), ones (3)) 332s ***** error nbinpdf (i, 2, 2) 332s ***** error nbinpdf (2, i, 2) 332s ***** error nbinpdf (2, 2, i) 332s 18 tests, 18 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/riceinv.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/riceinv.m 332s ***** demo 332s ## Plot various iCDFs from the Rician distribution 332s p = 0.001:0.001:0.999; 332s x1 = riceinv (p, 0, 1); 332s x2 = riceinv (p, 0.5, 1); 332s x3 = riceinv (p, 1, 1); 332s x4 = riceinv (p, 2, 1); 332s x5 = riceinv (p, 4, 1); 332s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 332s grid on 332s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 332s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 332s title ("Rician iCDF") 332s xlabel ("probability") 332s ylabel ("values in x") 332s ***** shared p 332s p = [-1 0 0.75 1 2]; 332s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 332s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 332s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 332s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 332s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 332s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 332s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 332s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 332s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 332s ***** assert (riceinv ([p, NaN], single (1), 2), ... 332s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 332s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 332s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 332s ***** error riceinv () 332s ***** error riceinv (1) 332s ***** error riceinv (1,2) 332s ***** error riceinv (1,2,3,4) 332s ***** error ... 332s riceinv (ones (3), ones (2), ones (2)) 332s ***** error ... 332s riceinv (ones (2), ones (3), ones (2)) 332s ***** error ... 332s riceinv (ones (2), ones (2), ones (3)) 332s ***** error riceinv (i, 2, 2) 332s ***** error riceinv (2, i, 2) 332s ***** error riceinv (2, 2, i) 332s 20 tests, 20 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/chi2cdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/chi2cdf.m 332s ***** demo 332s ## Plot various CDFs from the chi-squared distribution 332s x = 0:0.01:8; 332s p1 = chi2cdf (x, 1); 332s p2 = chi2cdf (x, 2); 332s p3 = chi2cdf (x, 3); 332s p4 = chi2cdf (x, 4); 332s p5 = chi2cdf (x, 6); 332s p6 = chi2cdf (x, 9); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 332s x, p4, "-c", x, p5, "-m", x, p6, "-y") 332s grid on 332s xlim ([0, 8]) 332s legend ({"df = 1", "df = 2", "df = 3", ... 332s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 332s title ("Chi-squared CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, p, u 332s x = [-1, 0, 0.5, 1, 2]; 332s p = [0, (1 - exp (-x(2:end) / 2))]; 332s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 332s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 332s ***** assert (chi2cdf (x, 2), p, eps) 332s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 332s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 332s [p(1), 1, NaN, u(4:5)], eps) 332s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 332s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 332s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 332s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 332s ***** error chi2cdf () 332s ***** error chi2cdf (1) 332s ***** error chi2cdf (1, 2, 3, 4) 332s ***** error chi2cdf (1, 2, 3) 332s ***** error chi2cdf (1, 2, "uper") 332s ***** error ... 332s chi2cdf (ones (3), ones (2)) 332s ***** error ... 332s chi2cdf (ones (2), ones (3)) 332s ***** error chi2cdf (i, 2) 332s ***** error chi2cdf (2, i) 332s 17 tests, 17 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/plpdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/plpdf.m 332s ***** demo 332s ## Plot various PDFs from the Piecewise linear distribution 332s data = 0:0.01:10; 332s x1 = [0, 1, 3, 4, 7, 10]; 332s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 332s x2 = [0, 2, 5, 6, 7, 8]; 332s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 332s y1 = plpdf (data, x1, Fx1); 332s y2 = plpdf (data, x2, Fx2); 332s plot (data, y1, "-b", data, y2, "g") 332s grid on 332s ylim ([0, 0.6]) 332s xlim ([0, 10]) 332s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 332s title ("Piecewise linear CDF") 332s xlabel ("values in data") 332s ylabel ("density") 332s ***** shared x, Fx 332s x = [0, 1, 3, 4, 7, 10]; 332s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 332s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 332s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 332s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 332s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 332s ***** assert (plpdf (8, x, Fx), 0.1, eps); 332s ***** error plpdf () 332s ***** error plpdf (1) 332s ***** error plpdf (1, 2) 332s ***** error ... 332s plpdf (1, [0, 1, 2], [0, 1]) 332s ***** error ... 332s plpdf (1, [0], [1]) 332s ***** error ... 332s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 332s ***** error ... 332s plpdf (1, [0, 1, 2], [0, i, 1]) 332s ***** error ... 332s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 332s ***** error ... 332s plpdf (1, [0, i, 2], [0, 0.5, 1]) 332s ***** error ... 332s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 332s 15 tests, 15 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/hnrnd.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hnrnd.m 332s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 332s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 332s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 332s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 332s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 332s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 332s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 332s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 332s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 332s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 332s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 332s ***** test 332s r = hnrnd (1, [1, 0, -1]); 332s assert (r([2:3]), [NaN, NaN]) 332s ***** assert (class (hnrnd (1, 0)), "double") 332s ***** assert (class (hnrnd (1, single (0))), "single") 332s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 332s ***** assert (class (hnrnd (1, single (1))), "single") 332s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 332s ***** assert (class (hnrnd (single (1), 1)), "single") 332s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 332s ***** error hnrnd () 332s ***** error hnrnd (1) 332s ***** error ... 332s hnrnd (ones (3), ones (2)) 332s ***** error ... 332s hnrnd (ones (2), ones (3)) 332s ***** error hnrnd (i, 2, 3) 332s ***** error hnrnd (1, i, 3) 332s ***** error ... 332s hnrnd (1, 2, -1) 332s ***** error ... 332s hnrnd (1, 2, 1.2) 332s ***** error ... 332s hnrnd (1, 2, ones (2)) 332s ***** error ... 332s hnrnd (1, 2, [2 -1 2]) 332s ***** error ... 332s hnrnd (1, 2, [2 0 2.5]) 332s ***** error ... 332s hnrnd (1, 2, 2, -1, 5) 332s ***** error ... 332s hnrnd (1, 2, 2, 1.5, 5) 332s ***** error ... 332s hnrnd (2, ones (2), 3) 332s ***** error ... 332s hnrnd (2, ones (2), [3, 2]) 332s ***** error ... 332s hnrnd (2, ones (2), 3, 2) 332s 35 tests, 35 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/raylinv.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/raylinv.m 332s ***** demo 332s ## Plot various iCDFs from the Rayleigh distribution 332s p = 0.001:0.001:0.999; 332s x1 = raylinv (p, 0.5); 332s x2 = raylinv (p, 1); 332s x3 = raylinv (p, 2); 332s x4 = raylinv (p, 3); 332s x5 = raylinv (p, 4); 332s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 332s grid on 332s ylim ([0, 10]) 332s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 332s "σ = 3", "σ = 4"}, "location", "northwest") 332s title ("Rayleigh iCDF") 332s xlabel ("probability") 332s ylabel ("values in x") 332s ***** test 332s p = 0:0.1:0.5; 332s sigma = 1:6; 332s x = raylinv (p, sigma); 332s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 332s assert (x, expected_x, 0.001); 332s ***** test 332s p = 0:0.1:0.5; 332s x = raylinv (p, 0.5); 332s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 332s assert (x, expected_x, 0.001); 332s ***** error raylinv () 332s ***** error raylinv (1) 332s ***** error ... 332s raylinv (ones (3), ones (2)) 332s ***** error ... 332s raylinv (ones (2), ones (3)) 332s ***** error raylinv (i, 2) 332s ***** error raylinv (2, i) 332s 8 tests, 8 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/invgcdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/invgcdf.m 332s ***** demo 332s ## Plot various CDFs from the inverse Gaussian distribution 332s x = 0:0.001:3; 332s p1 = invgcdf (x, 1, 0.2); 332s p2 = invgcdf (x, 1, 1); 332s p3 = invgcdf (x, 1, 3); 332s p4 = invgcdf (x, 3, 0.2); 332s p5 = invgcdf (x, 3, 1); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 332s grid on 332s xlim ([0, 3]) 332s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 332s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 332s title ("Inverse Gaussian CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, p1, p1u, y2, y2u, y3, y3u 332s x = [-Inf, -1, 0, 1/2, 1, Inf]; 332s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 332s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 332s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 332s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 332s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 332s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 332s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 332s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 332s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 332s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 332s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 332s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 332s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 332s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 332s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 332s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 332s ***** error invgcdf () 332s ***** error invgcdf (1) 332s ***** error invgcdf (1, 2) 332s ***** error invgcdf (1, 2, 3, "tail") 332s ***** error invgcdf (1, 2, 3, 5) 332s ***** error ... 332s invgcdf (ones (3), ones (2), ones(2)) 332s ***** error ... 332s invgcdf (ones (2), ones (3), ones(2)) 332s ***** error ... 332s invgcdf (ones (2), ones (2), ones(3)) 332s ***** error invgcdf (i, 2, 3) 332s ***** error invgcdf (1, i, 3) 332s ***** error invgcdf (1, 2, i) 332s 25 tests, 25 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/gumbelcdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gumbelcdf.m 332s ***** demo 332s ## Plot various CDFs from the Gumbel distribution 332s x = -5:0.01:20; 332s p1 = gumbelcdf (x, 0.5, 2); 332s p2 = gumbelcdf (x, 1.0, 2); 332s p3 = gumbelcdf (x, 1.5, 3); 332s p4 = gumbelcdf (x, 3.0, 4); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 332s grid on 332s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 332s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 332s title ("Gumbel CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, y 332s x = [-Inf, 1, 2, Inf]; 332s y = [0, 0.3679, 0.6922, 1]; 332s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 332s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 332s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 332s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 332s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 332s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 332s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 332s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 332s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 332s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 332s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 332s ***** error gumbelcdf () 332s ***** error gumbelcdf (1,2,3,4,5,6,7) 332s ***** error gumbelcdf (1, 2, 3, 4, "uper") 332s ***** error ... 332s gumbelcdf (ones (3), ones (2), ones (2)) 332s ***** error gumbelcdf (2, 3, 4, [1, 2]) 332s ***** error ... 332s [p, plo, pup] = gumbelcdf (1, 2, 3) 332s ***** error [p, plo, pup] = ... 332s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 332s ***** error [p, plo, pup] = ... 332s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 332s ***** error [p, plo, pup] = ... 332s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 332s ***** error gumbelcdf (i, 2, 2) 332s ***** error gumbelcdf (2, i, 2) 332s ***** error gumbelcdf (2, 2, i) 332s ***** error ... 332s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 332s 24 tests, 24 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/evcdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/evcdf.m 332s ***** demo 332s ## Plot various CDFs from the extreme value distribution 332s x = -10:0.01:10; 332s p1 = evcdf (x, 0.5, 2); 332s p2 = evcdf (x, 1.0, 2); 332s p3 = evcdf (x, 1.5, 3); 332s p4 = evcdf (x, 3.0, 4); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 332s grid on 332s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 332s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 332s title ("Extreme value CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, y 332s x = [-Inf, 1, 2, Inf]; 332s y = [0, 0.6321, 0.9340, 1]; 332s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 332s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 332s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 332s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 332s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 332s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 332s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 332s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 332s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 332s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 332s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 332s ***** error evcdf () 332s ***** error evcdf (1,2,3,4,5,6,7) 332s ***** error evcdf (1, 2, 3, 4, "uper") 332s ***** error ... 332s evcdf (ones (3), ones (2), ones (2)) 332s ***** error evcdf (2, 3, 4, [1, 2]) 332s ***** error ... 332s [p, plo, pup] = evcdf (1, 2, 3) 332s ***** error [p, plo, pup] = ... 332s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 332s ***** error [p, plo, pup] = ... 332s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 332s ***** error [p, plo, pup] = ... 332s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 332s ***** error evcdf (i, 2, 2) 332s ***** error evcdf (2, i, 2) 332s ***** error evcdf (2, 2, i) 332s ***** error ... 332s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 332s 24 tests, 24 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/vmpdf.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/vmpdf.m 332s ***** demo 332s ## Plot various PDFs from the von Mises distribution 332s x1 = [-pi:0.1:pi]; 332s y1 = vmpdf (x1, 0, 0.5); 332s y2 = vmpdf (x1, 0, 1); 332s y3 = vmpdf (x1, 0, 2); 332s y4 = vmpdf (x1, 0, 4); 332s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 332s grid on 332s xlim ([-pi, pi]) 332s ylim ([0, 0.8]) 332s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 332s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 332s title ("Von Mises PDF") 332s xlabel ("values in x") 332s ylabel ("density") 332s ***** shared x, y0, y1 332s x = [-pi:pi/2:pi]; 332s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 332s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 332s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 332s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 332s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 332s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 332s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 332s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 332s ***** error vmpdf () 332s ***** error vmpdf (1) 332s ***** error vmpdf (1, 2) 332s ***** error ... 332s vmpdf (ones (3), ones (2), ones (2)) 332s ***** error ... 332s vmpdf (ones (2), ones (3), ones (2)) 332s ***** error ... 332s vmpdf (ones (2), ones (2), ones (3)) 332s ***** error vmpdf (i, 2, 2) 332s ***** error vmpdf (2, i, 2) 332s ***** error vmpdf (2, 2, i) 332s 15 tests, 15 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/hygeinv.m] 332s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hygeinv.m 332s ***** demo 332s ## Plot various iCDFs from the hypergeometric distribution 332s p = 0.001:0.001:0.999; 332s x1 = hygeinv (p, 500, 50, 100); 332s x2 = hygeinv (p, 500, 60, 200); 332s x3 = hygeinv (p, 500, 70, 300); 332s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 332s grid on 332s ylim ([0, 60]) 332s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 332s "m = 500, k = 70, n = 300"}, "location", "northwest") 332s title ("Hypergeometric iCDF") 332s xlabel ("probability") 332s ylabel ("values in p (number of successes)") 332s ***** shared p 332s p = [-1 0 0.5 1 2]; 332s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 333s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 333s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 333s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 333s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 333s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 333s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 333s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 333s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 333s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 333s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 333s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 333s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 333s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 333s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 333s ***** error hygeinv () 333s ***** error hygeinv (1) 333s ***** error hygeinv (1,2) 333s ***** error hygeinv (1,2,3) 333s ***** error ... 333s hygeinv (ones (2), ones (3), 1, 1) 333s ***** error ... 333s hygeinv (1, ones (2), ones (3), 1) 333s ***** error ... 333s hygeinv (1, 1, ones (2), ones (3)) 333s ***** error hygeinv (i, 2, 2, 2) 333s ***** error hygeinv (2, i, 2, 2) 333s ***** error hygeinv (2, 2, i, 2) 333s ***** error hygeinv (2, 2, 2, i) 333s 26 tests, 26 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/nbincdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nbincdf.m 333s ***** demo 333s ## Plot various CDFs from the negative binomial distribution 333s x = 0:50; 333s p1 = nbincdf (x, 2, 0.15); 333s p2 = nbincdf (x, 5, 0.2); 333s p3 = nbincdf (x, 4, 0.4); 333s p4 = nbincdf (x, 10, 0.3); 333s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 333s grid on 333s xlim ([0, 40]) 333s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 333s "r = 10, ps = 0.3"}, "location", "southeast") 333s title ("Negative binomial CDF") 333s xlabel ("values in x (number of failures)") 333s ylabel ("probability") 333s ***** shared x, y 333s x = [-1 0 1 2 Inf]; 333s y = [0 1/2 3/4 7/8 1]; 333s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 333s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 333s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 333s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 333s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 333s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 333s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 333s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 333s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 333s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 333s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 333s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 333s ***** error nbincdf () 333s ***** error nbincdf (1) 333s ***** error nbincdf (1, 2) 333s ***** error nbincdf (1, 2, 3, 4) 333s ***** error nbincdf (1, 2, 3, "some") 333s ***** error ... 333s nbincdf (ones (3), ones (2), ones (2)) 333s ***** error ... 333s nbincdf (ones (2), ones (3), ones (2)) 333s ***** error ... 333s nbincdf (ones (2), ones (2), ones (3)) 333s ***** error nbincdf (i, 2, 2) 333s ***** error nbincdf (2, i, 2) 333s ***** error nbincdf (2, 2, i) 333s 22 tests, 22 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/copularnd.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/copularnd.m 333s ***** test 333s theta = 0.5; 333s r = copularnd ("Gaussian", theta); 333s assert (size (r), [1, 2]); 333s assert (all ((r >= 0) & (r <= 1))); 333s ***** test 333s theta = 0.5; 333s df = 2; 333s r = copularnd ("t", theta, df); 333s assert (size (r), [1, 2]); 333s assert (all ((r >= 0) & (r <= 1))); 333s ***** test 333s theta = 0.5; 333s r = copularnd ("Clayton", theta); 333s assert (size (r), [1, 2]); 333s assert (all ((r >= 0) & (r <= 1))); 333s ***** test 333s theta = 0.5; 333s n = 2; 333s r = copularnd ("Clayton", theta, n); 333s assert (size (r), [n, 2]); 333s assert (all ((r >= 0) & (r <= 1))); 333s ***** test 333s theta = [1; 2]; 333s n = 2; 333s d = 3; 333s r = copularnd ("Clayton", theta, n, d); 333s assert (size (r), [n, d]); 333s assert (all ((r >= 0) & (r <= 1))); 333s 5 tests, 5 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/unifpdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unifpdf.m 333s ***** demo 333s ## Plot various PDFs from the continuous uniform distribution 333s x = 0:0.001:10; 333s y1 = unifpdf (x, 2, 5); 333s y2 = unifpdf (x, 3, 9); 333s plot (x, y1, "-b", x, y2, "-g") 333s grid on 333s xlim ([0, 10]) 333s ylim ([0, 0.4]) 333s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 333s title ("Continuous uniform PDF") 333s xlabel ("values in x") 333s ylabel ("density") 333s ***** shared x, y 333s x = [-1 0 0.5 1 2] + 1; 333s y = [0 1 1 1 0]; 333s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 333s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 333s ***** assert (unifpdf (x, ones (1,5), 2), y) 333s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 333s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 333s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 333s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 333s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 333s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 333s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 333s ***** error unifpdf () 333s ***** error unifpdf (1) 333s ***** error unifpdf (1, 2) 333s ***** error ... 333s unifpdf (ones (3), ones (2), ones (2)) 333s ***** error ... 333s unifpdf (ones (2), ones (3), ones (2)) 333s ***** error ... 333s unifpdf (ones (2), ones (2), ones (3)) 333s ***** error unifpdf (i, 2, 2) 333s ***** error unifpdf (2, i, 2) 333s ***** error unifpdf (2, 2, i) 333s 19 tests, 19 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/bisainv.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bisainv.m 333s ***** demo 333s ## Plot various iCDFs from the Birnbaum-Saunders distribution 333s p = 0.001:0.001:0.999; 333s x1 = bisainv (p, 1, 0.5); 333s x2 = bisainv (p, 1, 1); 333s x3 = bisainv (p, 1, 2); 333s x4 = bisainv (p, 1, 5); 333s x5 = bisainv (p, 1, 10); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 333s grid on 333s ylim ([0, 10]) 333s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 333s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 333s title ("Birnbaum-Saunders iCDF") 333s xlabel ("probability") 333s ylabel ("values in x") 333s ***** demo 333s ## Plot various iCDFs from the Birnbaum-Saunders distribution 333s p = 0.001:0.001:0.999; 333s x1 = bisainv (p, 1, 0.3); 333s x2 = bisainv (p, 2, 0.3); 333s x3 = bisainv (p, 1, 0.5); 333s x4 = bisainv (p, 3, 0.5); 333s x5 = bisainv (p, 5, 0.5); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 333s grid on 333s ylim ([0, 10]) 333s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 333s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 333s title ("Birnbaum-Saunders iCDF") 333s xlabel ("probability") 333s ylabel ("values in x") 333s ***** shared p, y, f 333s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 333s p = [-1, 0, 1/4, 1/2, 1, 2]; 333s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 333s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 333s ***** assert (bisainv (p, 1, ones (1,6)), y) 333s ***** assert (bisainv (p, ones (1,6), 1), y) 333s ***** assert (bisainv (p, 1, 1), y) 333s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 333s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 333s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 333s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 333s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 333s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 333s ***** error bisainv () 333s ***** error bisainv (1) 333s ***** error bisainv (1, 2) 333s ***** error bisainv (1, 2, 3, 4) 333s ***** error ... 333s bisainv (ones (3), ones (2), ones(2)) 333s ***** error ... 333s bisainv (ones (2), ones (3), ones(2)) 333s ***** error ... 333s bisainv (ones (2), ones (2), ones(3)) 333s ***** error bisainv (i, 4, 3) 333s ***** error bisainv (1, i, 3) 333s ***** error bisainv (1, 4, i) 333s 20 tests, 20 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/ricepdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ricepdf.m 333s ***** demo 333s ## Plot various PDFs from the Rician distribution 333s x = 0:0.01:8; 333s y1 = ricepdf (x, 0, 1); 333s y2 = ricepdf (x, 0.5, 1); 333s y3 = ricepdf (x, 1, 1); 333s y4 = ricepdf (x, 2, 1); 333s y5 = ricepdf (x, 4, 1); 333s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 333s grid on 333s ylim ([0, 0.65]) 333s xlim ([0, 8]) 333s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 333s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 333s title ("Rician PDF") 333s xlabel ("values in x") 333s ylabel ("density") 333s ***** shared x, y 333s x = [-1 0 0.5 1 2]; 333s y = [0 0 0.1073 0.1978 0.2846]; 333s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 333s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 333s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 333s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 333s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 333s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 333s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 333s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 333s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 333s ***** error ricepdf () 333s ***** error ricepdf (1) 333s ***** error ricepdf (1,2) 333s ***** error ricepdf (1,2,3,4) 333s ***** error ... 333s ricepdf (ones (3), ones (2), ones (2)) 333s ***** error ... 333s ricepdf (ones (2), ones (3), ones (2)) 333s ***** error ... 333s ricepdf (ones (2), ones (2), ones (3)) 333s ***** error ricepdf (i, 2, 2) 333s ***** error ricepdf (2, i, 2) 333s ***** error ricepdf (2, 2, i) 333s 19 tests, 19 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/poissinv.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/poissinv.m 333s ***** demo 333s ## Plot various iCDFs from the Poisson distribution 333s p = 0.001:0.001:0.999; 333s x1 = poissinv (p, 13); 333s x2 = poissinv (p, 4); 333s x3 = poissinv (p, 10); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 333s grid on 333s ylim ([0, 20]) 333s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 333s title ("Poisson iCDF") 333s xlabel ("probability") 333s ylabel ("values in x (number of occurences)") 333s ***** shared p 333s p = [-1 0 0.5 1 2]; 333s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 333s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 333s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 333s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 333s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 333s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 333s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 333s ***** error poissinv () 333s ***** error poissinv (1) 333s ***** error ... 333s poissinv (ones (3), ones (2)) 333s ***** error ... 333s poissinv (ones (2), ones (3)) 333s ***** error poissinv (i, 2) 333s ***** error poissinv (2, i) 333s 13 tests, 13 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/normpdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/normpdf.m 333s ***** demo 333s ## Plot various PDFs from the normal distribution 333s x = -5:0.01:5; 333s y1 = normpdf (x, 0, 0.5); 333s y2 = normpdf (x, 0, 1); 333s y3 = normpdf (x, 0, 2); 333s y4 = normpdf (x, -2, 0.8); 333s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 333s grid on 333s xlim ([-5, 5]) 333s ylim ([0, 0.9]) 333s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 333s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 333s title ("Normal PDF") 333s xlabel ("values in x") 333s ylabel ("density") 333s ***** shared x, y 333s x = [-Inf, 1, 2, Inf]; 333s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 333s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 333s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 333s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 333s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 333s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 333s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 333s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 333s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 333s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 333s ***** error normpdf () 333s ***** error ... 333s normpdf (ones (3), ones (2), ones (2)) 333s ***** error ... 333s normpdf (ones (2), ones (3), ones (2)) 333s ***** error ... 333s normpdf (ones (2), ones (2), ones (3)) 333s ***** error normpdf (i, 2, 2) 333s ***** error normpdf (2, i, 2) 333s ***** error normpdf (2, 2, i) 333s 16 tests, 16 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/raylcdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/raylcdf.m 333s ***** demo 333s ## Plot various CDFs from the Rayleigh distribution 333s x = 0:0.01:10; 333s p1 = raylcdf (x, 0.5); 333s p2 = raylcdf (x, 1); 333s p3 = raylcdf (x, 2); 333s p4 = raylcdf (x, 3); 333s p5 = raylcdf (x, 4); 333s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 333s grid on 333s ylim ([0, 1]) 333s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 333s "σ = 3", "σ = 4"}, "location", "southeast") 333s title ("Rayleigh CDF") 333s xlabel ("values in x") 333s ylabel ("probability") 333s ***** test 333s x = 0:0.5:2.5; 333s sigma = 1:6; 333s p = raylcdf (x, sigma); 333s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 333s assert (p, expected_p, 0.001); 333s ***** test 333s x = 0:0.5:2.5; 333s p = raylcdf (x, 0.5); 333s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 333s assert (p, expected_p, 0.001); 333s ***** shared x, p 333s x = [-1, 0, 1, 2, Inf]; 333s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 333s ***** assert (raylcdf (x, 1), p, 1e-14) 333s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 333s ***** error raylcdf () 333s ***** error raylcdf (1) 333s ***** error raylcdf (1, 2, "uper") 333s ***** error raylcdf (1, 2, 3) 333s ***** error ... 333s raylcdf (ones (3), ones (2)) 333s ***** error ... 333s raylcdf (ones (2), ones (3)) 333s ***** error raylcdf (i, 2) 333s ***** error raylcdf (2, i) 333s 12 tests, 12 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/gumbelinv.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gumbelinv.m 333s ***** demo 333s ## Plot various iCDFs from the Gumbel distribution 333s p = 0.001:0.001:0.999; 333s x1 = gumbelinv (p, 0.5, 2); 333s x2 = gumbelinv (p, 1.0, 2); 333s x3 = gumbelinv (p, 1.5, 3); 333s x4 = gumbelinv (p, 3.0, 4); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 333s grid on 333s ylim ([-5, 20]) 333s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 333s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 333s title ("Gumbel iCDF") 333s xlabel ("probability") 333s ylabel ("values in x") 333s ***** shared p, x 333s p = [0, 0.05, 0.5 0.95]; 333s x = [-Inf, -1.0972, 0.3665, 2.9702]; 333s ***** assert (gumbelinv (p), x, 1e-4) 333s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 333s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 333s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 333s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 333s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 333s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 333s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 333s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 333s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 333s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 333s p = [0.05, 0.5, 0.95]; 333s x = gumbelinv(p); 333s ***** assert (gumbelcdf(x), p, 1e-4) 333s ***** error gumbelinv () 333s ***** error gumbelinv (1,2,3,4,5,6) 333s ***** error ... 333s gumbelinv (ones (3), ones (2), ones (2)) 333s ***** error ... 333s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 333s ***** error ... 333s [p, plo, pup] = gumbelinv (1, 2, 3) 333s ***** error [p, plo, pup] = ... 333s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 333s ***** error [p, plo, pup] = ... 333s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 333s ***** error gumbelinv (i, 2, 2) 333s ***** error gumbelinv (2, i, 2) 333s ***** error gumbelinv (2, 2, i) 333s ***** error ... 333s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 333s 23 tests, 23 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/wblinv.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wblinv.m 333s ***** demo 333s ## Plot various iCDFs from the Weibull distribution 333s p = 0.001:0.001:0.999; 333s x1 = wblinv (p, 1, 0.5); 333s x2 = wblinv (p, 1, 1); 333s x3 = wblinv (p, 1, 1.5); 333s x4 = wblinv (p, 1, 5); 333s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 333s ylim ([0, 2.5]) 333s grid on 333s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 333s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 333s title ("Weibull iCDF") 333s xlabel ("probability") 333s ylabel ("x") 333s ***** shared p 333s p = [-1 0 0.63212055882855778 1 2]; 333s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 333s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 333s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 333s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 333s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 333s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 333s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 333s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 333s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 333s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 333s ***** error wblinv () 333s ***** error wblinv (1,2,3,4) 333s ***** error ... 333s wblinv (ones (3), ones (2), ones (2)) 333s ***** error ... 333s wblinv (ones (2), ones (3), ones (2)) 333s ***** error ... 333s wblinv (ones (2), ones (2), ones (3)) 333s ***** error wblinv (i, 2, 2) 333s ***** error wblinv (2, i, 2) 333s ***** error wblinv (2, 2, i) 333s 18 tests, 18 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/gevrnd.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gevrnd.m 333s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 333s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 333s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 333s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 333s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 333s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 333s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 333s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 333s ***** assert (class (gevrnd (1,1,1)), "double") 333s ***** assert (class (gevrnd (single (1),1,1)), "single") 333s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 333s ***** assert (class (gevrnd (1,single (1),1)), "single") 333s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 333s ***** assert (class (gevrnd (1,1,single (1))), "single") 333s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 333s ***** error gevrnd () 333s ***** error gevrnd (1) 333s ***** error gevrnd (1, 2) 333s ***** error ... 333s gevrnd (ones (3), ones (2), ones (2)) 333s ***** error ... 333s gevrnd (ones (2), ones (3), ones (2)) 333s ***** error ... 333s gevrnd (ones (2), ones (2), ones (3)) 333s ***** error gevrnd (i, 2, 3) 333s ***** error gevrnd (1, i, 3) 333s ***** error gevrnd (1, 2, i) 333s ***** error ... 333s gevrnd (1, 2, 3, -1) 333s ***** error ... 333s gevrnd (1, 2, 3, 1.2) 333s ***** error ... 333s gevrnd (1, 2, 3, ones (2)) 333s ***** error ... 333s gevrnd (1, 2, 3, [2 -1 2]) 333s ***** error ... 333s gevrnd (1, 2, 3, [2 0 2.5]) 333s ***** error ... 333s gevrnd (1, 2, 3, 2, -1, 5) 333s ***** error ... 333s gevrnd (1, 2, 3, 2, 1.5, 5) 333s ***** error ... 333s gevrnd (2, ones (2), 2, 3) 333s ***** error ... 333s gevrnd (2, ones (2), 2, [3, 2]) 333s ***** error ... 333s gevrnd (2, ones (2), 2, 3, 2) 333s 34 tests, 34 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/geocdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/geocdf.m 333s ***** demo 333s ## Plot various CDFs from the geometric distribution 333s x = 0:10; 333s p1 = geocdf (x, 0.2); 333s p2 = geocdf (x, 0.5); 333s p3 = geocdf (x, 0.7); 333s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 333s grid on 333s xlim ([0, 10]) 333s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 333s title ("Geometric CDF") 333s xlabel ("values in x (number of failures)") 333s ylabel ("probability") 333s ***** test 333s p = geocdf ([1, 2, 3, 4], 0.25); 333s assert (p(1), 0.4375000000, 1e-14); 333s assert (p(2), 0.5781250000, 1e-14); 333s assert (p(3), 0.6835937500, 1e-14); 333s assert (p(4), 0.7626953125, 1e-14); 333s ***** test 333s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 333s assert (p(1), 0.5625000000, 1e-14); 333s assert (p(2), 0.4218750000, 1e-14); 333s assert (p(3), 0.3164062500, 1e-14); 333s assert (p(4), 0.2373046875, 1e-14); 333s ***** shared x, p 333s x = [-1 0 1 Inf]; 333s p = [0 0.5 0.75 1]; 333s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 333s ***** assert (geocdf (x, 0.5), p) 333s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 333s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 333s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 333s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 333s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 333s ***** error geocdf () 333s ***** error geocdf (1) 333s ***** error ... 333s geocdf (ones (3), ones (2)) 333s ***** error ... 333s geocdf (ones (2), ones (3)) 333s ***** error geocdf (i, 2) 333s ***** error geocdf (2, i) 333s ***** error geocdf (2, 3, "tail") 333s ***** error geocdf (2, 3, 5) 333s 17 tests, 17 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/tlspdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tlspdf.m 333s ***** demo 333s ## Plot various PDFs from the Student's T distribution 333s x = -8:0.01:8; 333s y1 = tlspdf (x, 0, 1, 1); 333s y2 = tlspdf (x, 0, 2, 2); 333s y3 = tlspdf (x, 3, 2, 5); 333s y4 = tlspdf (x, -1, 3, Inf); 333s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 333s grid on 333s xlim ([-8, 8]) 333s ylim ([0, 0.41]) 333s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 333s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 333s "location", "northwest") 333s title ("Location-scale Student's T PDF") 333s xlabel ("values in x") 333s ylabel ("density") 333s ***** test 333s x = rand (10,1); 333s y = 1./(pi * (1 + x.^2)); 333s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 333s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 333s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 333s ***** shared x, y 333s x = [-Inf 0 0.5 1 Inf]; 333s y = 1./(pi * (1 + x.^2)); 333s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 333s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 333s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 333s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 333s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 333s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 333s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 333s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 333s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 333s ***** error tlspdf () 333s ***** error tlspdf (1) 333s ***** error tlspdf (1, 2) 333s ***** error tlspdf (1, 2, 3) 333s ***** error ... 333s tlspdf (ones (3), ones (2), 1, 1) 333s ***** error ... 333s tlspdf (ones (2), 1, ones (3), 1) 333s ***** error ... 333s tlspdf (ones (2), 1, 1, ones (3)) 333s ***** error tlspdf (i, 2, 1, 1) 333s ***** error tlspdf (2, i, 1, 1) 333s ***** error tlspdf (2, 1, i, 1) 333s ***** error tlspdf (2, 1, 1, i) 333s 21 tests, 21 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/ncfcdf.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncfcdf.m 333s ***** demo 333s ## Plot various CDFs from the noncentral F distribution 333s x = 0:0.01:5; 333s p1 = ncfcdf (x, 2, 5, 1); 333s p2 = ncfcdf (x, 2, 5, 2); 333s p3 = ncfcdf (x, 5, 10, 1); 333s p4 = ncfcdf (x, 10, 20, 10); 333s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 333s grid on 333s xlim ([0, 5]) 333s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 333s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 333s "location", "southeast") 333s title ("Noncentral F CDF") 333s xlabel ("values in x") 333s ylabel ("probability") 333s ***** demo 333s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 333s ## same number of numerator and denominator degrees of freedom (5, 20) 333s 333s x = 0.01:0.1:10.01; 333s p1 = ncfcdf (x, 5, 20, 10); 333s p2 = fcdf (x, 5, 20); 333s plot (x, p1, "-", x, p2, "-"); 333s grid on 333s xlim ([0, 10]) 333s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 333s title ("Noncentral F vs F CDFs") 333s xlabel ("values in x") 333s ylabel ("probability") 333s ***** test 333s x = -2:0.1:2; 333s p = ncfcdf (x, 10, 1, 3); 333s assert (p([1:21]), zeros (1, 21), 1e-76); 333s assert (p(22), 0.004530737275319753, 1e-14); 333s assert (p(30), 0.255842099135669, 1e-14); 333s assert (p(41), 0.4379890998457305, 1e-14); 333s ***** test 333s p = ncfcdf (12, 10, 3, 2); 333s assert (p, 0.9582287900447416, 1e-14); 333s ***** test 333s p = ncfcdf (2, 3, 2, 1); 333s assert (p, 0.5731985522994989, 1e-14); 333s ***** test 333s p = ncfcdf (2, 3, 2, 1, "upper"); 333s assert (p, 0.4268014477004823, 1e-14); 333s ***** test 333s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 333s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 333s ***** error ncfcdf () 333s ***** error ncfcdf (1) 333s ***** error ncfcdf (1, 2) 333s ***** error ncfcdf (1, 2, 3) 333s ***** error ncfcdf (1, 2, 3, 4, "tail") 333s ***** error ncfcdf (1, 2, 3, 4, 5) 333s ***** error ... 333s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 333s ***** error ... 333s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 333s ***** error ... 333s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 333s ***** error ... 333s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 333s ***** error ncfcdf (i, 2, 2, 2) 333s ***** error ncfcdf (2, i, 2, 2) 333s ***** error ncfcdf (2, 2, i, 2) 333s ***** error ncfcdf (2, 2, 2, i) 333s 19 tests, 19 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/gamrnd.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gamrnd.m 333s ***** assert (size (gamrnd (1, 1)), [1 1]) 333s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 333s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 333s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 333s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 333s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 333s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 333s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 333s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 333s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 333s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 333s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 333s ***** assert (class (gamrnd (1, 1)), "double") 333s ***** assert (class (gamrnd (1, single (1))), "single") 333s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 333s ***** assert (class (gamrnd (single (1), 1)), "single") 333s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 333s ***** error gamrnd () 333s ***** error gamrnd (1) 333s ***** error ... 333s gamrnd (ones (3), ones (2)) 333s ***** error ... 333s gamrnd (ones (2), ones (3)) 333s ***** error gamrnd (i, 2, 3) 333s ***** error gamrnd (1, i, 3) 333s ***** error ... 333s gamrnd (1, 2, -1) 333s ***** error ... 333s gamrnd (1, 2, 1.2) 333s ***** error ... 333s gamrnd (1, 2, ones (2)) 333s ***** error ... 333s gamrnd (1, 2, [2 -1 2]) 333s ***** error ... 333s gamrnd (1, 2, [2 0 2.5]) 333s ***** error ... 333s gamrnd (1, 2, 2, -1, 5) 333s ***** error ... 333s gamrnd (1, 2, 2, 1.5, 5) 333s ***** error ... 333s gamrnd (2, ones (2), 3) 333s ***** error ... 333s gamrnd (2, ones (2), [3, 2]) 333s ***** error ... 333s gamrnd (2, ones (2), 3, 2) 333s 33 tests, 33 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/iwishrnd.m] 333s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/iwishrnd.m 333s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 333s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 333s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 333s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 333s ***** error iwishrnd () 334s ***** error iwishrnd (1) 334s ***** error iwishrnd ([-3 1; 1 3],1) 334s ***** error iwishrnd ([1; 1],1) 334s 8 tests, 8 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/lognrnd.m] 334s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/lognrnd.m 334s ***** assert (size (lognrnd (1, 1)), [1 1]) 334s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 334s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 334s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 334s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 334s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 334s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 334s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 334s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 334s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 334s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 334s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 334s ***** assert (class (lognrnd (1, 1)), "double") 334s ***** assert (class (lognrnd (1, single (1))), "single") 334s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 334s ***** assert (class (lognrnd (single (1), 1)), "single") 334s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 334s ***** error lognrnd () 334s ***** error lognrnd (1) 334s ***** error ... 334s lognrnd (ones (3), ones (2)) 334s ***** error ... 334s lognrnd (ones (2), ones (3)) 334s ***** error lognrnd (i, 2, 3) 334s ***** error lognrnd (1, i, 3) 334s ***** error ... 334s lognrnd (1, 2, -1) 334s ***** error ... 334s lognrnd (1, 2, 1.2) 334s ***** error ... 334s lognrnd (1, 2, ones (2)) 334s ***** error ... 334s lognrnd (1, 2, [2 -1 2]) 334s ***** error ... 334s lognrnd (1, 2, [2 0 2.5]) 334s ***** error ... 334s lognrnd (1, 2, 2, -1, 5) 334s ***** error ... 334s lognrnd (1, 2, 2, 1.5, 5) 334s ***** error ... 334s lognrnd (2, ones (2), 3) 334s ***** error ... 334s lognrnd (2, ones (2), [3, 2]) 334s ***** error ... 334s lognrnd (2, ones (2), 3, 2) 334s 33 tests, 33 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/ncx2inv.m] 334s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncx2inv.m 334s ***** demo 334s ## Plot various iCDFs from the noncentral chi-squared distribution 334s p = 0.001:0.001:0.999; 334s x1 = ncx2inv (p, 2, 1); 334s x2 = ncx2inv (p, 2, 2); 334s x3 = ncx2inv (p, 2, 3); 334s x4 = ncx2inv (p, 4, 1); 334s x5 = ncx2inv (p, 4, 2); 334s x6 = ncx2inv (p, 4, 3); 334s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 334s p, x4, "-m", p, x5, "-c", p, x6, "-y") 334s grid on 334s ylim ([0, 10]) 334s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 334s "df = 2, λ = 3", "df = 4, λ = 1", ... 334s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 334s title ("Noncentral chi-squared iCDF") 334s xlabel ("probability") 334s ylabel ("values in x") 334s ***** demo 334s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 334s ## chi-squared CDF with the same number of degrees of freedom (4). 334s 334s p = 0.001:0.001:0.999; 334s x1 = ncx2inv (p, 4, 2); 334s x2 = chi2inv (p, 4); 334s plot (p, x1, "-", p, x2, "-"); 334s grid on 334s ylim ([0, 10]) 334s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 334s title ("Noncentral chi-squared vs chi-squared quantile functions") 334s xlabel ("probability") 334s ylabel ("values in x") 334s ***** test 334s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 334s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 334s ***** test 334s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 334s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 334s ***** test 334s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 334s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 334s ***** test 334s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 334s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 334s ***** test 334s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 334s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 334s ***** test 334s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 334s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 335s ***** test 335s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 335s ***** error ncx2inv () 335s ***** error ncx2inv (1) 335s ***** error ncx2inv (1, 2) 335s ***** error ... 335s ncx2inv (ones (3), ones (2), ones (2)) 335s ***** error ... 335s ncx2inv (ones (2), ones (3), ones (2)) 335s ***** error ... 335s ncx2inv (ones (2), ones (2), ones (3)) 335s ***** error ncx2inv (i, 2, 2) 335s ***** error ncx2inv (2, i, 2) 335s ***** error ncx2inv (2, 2, i) 335s 16 tests, 16 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/bvncdf.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bvncdf.m 335s ***** demo 335s mu = [1, -1]; 335s sigma = [0.9, 0.4; 0.4, 0.3]; 335s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 335s x = [X1(:), X2(:)]; 335s p = bvncdf (x, mu, sigma); 335s Z = reshape (p, 25, 25); 335s surf (X1, X2, Z); 335s title ("Bivariate Normal Distribution"); 335s ylabel "X1" 335s xlabel "X2" 335s ***** test 335s mu = [1, -1]; 335s sigma = [0.9, 0.4; 0.4, 0.3]; 335s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 335s x = [X1(:), X2(:)]; 335s p = bvncdf (x, mu, sigma); 335s p_out = [0.00011878988774500, 0.00034404112322371, ... 335s 0.00087682502191813, 0.00195221905058185, ... 335s 0.00378235566873474, 0.00638175749734415, ... 335s 0.00943764224329656, 0.01239164888125426, ... 335s 0.01472750274376648, 0.01623228313374828]'; 335s assert (p([1:10]), p_out, 1e-16); 335s ***** test 335s mu = [1, -1]; 335s sigma = [0.9, 0.4; 0.4, 0.3]; 335s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 335s x = [X1(:), X2(:)]; 335s p = bvncdf (x, mu, sigma); 335s p_out = [0.8180695783608276, 0.8854485749482751, ... 335s 0.9308108777385832, 0.9579855743025508, ... 335s 0.9722897881414742, 0.9788150170059926, ... 335s 0.9813597788804785, 0.9821977956568989, ... 335s 0.9824283794464095, 0.9824809345614861]'; 335s assert (p([616:625]), p_out, 3e-16); 335s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 335s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 335s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 335s 5 tests, 5 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/ncx2pdf.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncx2pdf.m 335s ***** demo 335s ## Plot various PDFs from the noncentral chi-squared distribution 335s x = 0:0.1:10; 335s y1 = ncx2pdf (x, 2, 1); 335s y2 = ncx2pdf (x, 2, 2); 335s y3 = ncx2pdf (x, 2, 3); 335s y4 = ncx2pdf (x, 4, 1); 335s y5 = ncx2pdf (x, 4, 2); 335s y6 = ncx2pdf (x, 4, 3); 335s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 335s x, y4, "-m", x, y5, "-c", x, y6, "-y") 335s grid on 335s xlim ([0, 10]) 335s ylim ([0, 0.32]) 335s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 335s "df = 2, λ = 3", "df = 4, λ = 1", ... 335s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 335s title ("Noncentral chi-squared PDF") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** demo 335s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 335s ## chi-squared PDF with the same number of degrees of freedom (4). 335s 335s x = 0:0.1:10; 335s y1 = ncx2pdf (x, 4, 2); 335s y2 = chi2pdf (x, 4); 335s plot (x, y1, "-", x, y2, "-"); 335s grid on 335s xlim ([0, 10]) 335s ylim ([0, 0.32]) 335s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 335s title ("Noncentral chi-squared vs chi-squared PDFs") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** shared x1, df, d1 335s x1 = [-Inf, 2, NaN, 4, Inf]; 335s df = [2, 0, -1, 1, 4]; 335s d1 = [1, NaN, 3, -1, 2]; 335s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 335s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 335s 0.06160064323277038, 0], 1e-14); 335s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 335s 0.09631299762429098, 0], 1e-14); 335s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 335s 0.08430464047296625, 0], 1e-14); 335s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 335s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 335s NaN, 0.1076346446244688], 1e-14); 335s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 335s NaN, 0.1192317192431485], 1e-14); 335s ***** error ncx2pdf () 335s ***** error ncx2pdf (1) 335s ***** error ncx2pdf (1, 2) 335s ***** error ... 335s ncx2pdf (ones (3), ones (2), ones (2)) 335s ***** error ... 335s ncx2pdf (ones (2), ones (3), ones (2)) 335s ***** error ... 335s ncx2pdf (ones (2), ones (2), ones (3)) 335s ***** error ncx2pdf (i, 2, 2) 335s ***** error ncx2pdf (2, i, 2) 335s ***** error ncx2pdf (2, 2, i) 335s 16 tests, 16 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/expinv.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/expinv.m 335s ***** demo 335s ## Plot various iCDFs from the exponential distribution 335s p = 0.001:0.001:0.999; 335s x1 = expinv (p, 2/3); 335s x2 = expinv (p, 1.0); 335s x3 = expinv (p, 2.0); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 335s grid on 335s ylim ([0, 5]) 335s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 335s title ("Exponential iCDF") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** shared p 335s p = [-1 0 0.3934693402873666 1 2]; 335s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 335s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 335s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 335s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 335s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 335s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 335s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 335s ***** error expinv () 335s ***** error expinv (1, 2 ,3 ,4 ,5) 335s ***** error ... 335s expinv (ones (3), ones (2)) 335s ***** error ... 335s expinv (2, 3, [1, 2]) 335s ***** error ... 335s [x, xlo, xup] = expinv (1, 2) 335s ***** error [x, xlo, xup] = ... 335s expinv (1, 2, 3, 0) 335s ***** error [x, xlo, xup] = ... 335s expinv (1, 2, 3, 1.22) 335s ***** error [x, xlo, xup] = ... 335s expinv (1, 2, 3, [0.05, 0.1]) 335s ***** error expinv (i, 2) 335s ***** error expinv (2, i) 335s ***** error ... 335s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 335s 18 tests, 18 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/cauchyrnd.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/cauchyrnd.m 335s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 335s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 335s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 335s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 335s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 335s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 335s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 335s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 335s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 335s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 335s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 335s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 335s ***** assert (class (cauchyrnd (1, 1)), "double") 335s ***** assert (class (cauchyrnd (1, single (1))), "single") 335s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 335s ***** assert (class (cauchyrnd (single (1), 1)), "single") 335s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 335s ***** error cauchyrnd () 335s ***** error cauchyrnd (1) 335s ***** error ... 335s cauchyrnd (ones (3), ones (2)) 335s ***** error ... 335s cauchyrnd (ones (2), ones (3)) 335s ***** error cauchyrnd (i, 2, 3) 335s ***** error cauchyrnd (1, i, 3) 335s ***** error ... 335s cauchyrnd (1, 2, -1) 335s ***** error ... 335s cauchyrnd (1, 2, 1.2) 335s ***** error ... 335s cauchyrnd (1, 2, ones (2)) 335s ***** error ... 335s cauchyrnd (1, 2, [2 -1 2]) 335s ***** error ... 335s cauchyrnd (1, 2, [2 0 2.5]) 335s ***** error ... 335s cauchyrnd (1, 2, 2, -1, 5) 335s ***** error ... 335s cauchyrnd (1, 2, 2, 1.5, 5) 335s ***** error ... 335s cauchyrnd (2, ones (2), 3) 335s ***** error ... 335s cauchyrnd (2, ones (2), [3, 2]) 335s ***** error ... 335s cauchyrnd (2, ones (2), 3, 2) 335s 33 tests, 33 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/tripdf.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tripdf.m 335s ***** demo 335s ## Plot various CDFs from the triangular distribution 335s x = 0.001:0.001:10; 335s y1 = tripdf (x, 3, 4, 6); 335s y2 = tripdf (x, 1, 2, 5); 335s y3 = tripdf (x, 2, 3, 9); 335s y4 = tripdf (x, 2, 5, 9); 335s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 335s grid on 335s xlim ([0, 10]) 335s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 335s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 335s "location", "northeast") 335s title ("Triangular CDF") 335s xlabel ("values in x") 335s ylabel ("probability") 335s ***** shared x, y, deps 335s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 335s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 335s deps = 2*eps; 335s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 335s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 335s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 335s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 335s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 335s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 335s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 335s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 335s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 335s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 335s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 335s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 335s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 335s ***** error tripdf () 335s ***** error tripdf (1) 335s ***** error tripdf (1, 2) 335s ***** error tripdf (1, 2, 3) 335s ***** error ... 335s tripdf (1, 2, 3, 4, 5) 335s ***** error ... 335s tripdf (ones (3), ones (2), ones(2), ones(2)) 335s ***** error ... 335s tripdf (ones (2), ones (3), ones(2), ones(2)) 335s ***** error ... 335s tripdf (ones (2), ones (2), ones(3), ones(2)) 335s ***** error ... 335s tripdf (ones (2), ones (2), ones(2), ones(3)) 335s ***** error tripdf (i, 2, 3, 4) 335s ***** error tripdf (1, i, 3, 4) 335s ***** error tripdf (1, 2, i, 4) 335s ***** error tripdf (1, 2, 3, i) 335s 26 tests, 26 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/ncfinv.m] 335s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncfinv.m 335s ***** demo 335s ## Plot various iCDFs from the noncentral F distribution 335s p = 0.001:0.001:0.999; 335s x1 = ncfinv (p, 2, 5, 1); 335s x2 = ncfinv (p, 2, 5, 2); 335s x3 = ncfinv (p, 5, 10, 1); 335s x4 = ncfinv (p, 10, 20, 10); 335s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 335s grid on 335s ylim ([0, 5]) 335s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 335s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 335s "location", "northwest") 335s title ("Noncentral F iCDF") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** demo 335s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 335s ## same number of numerator and denominator degrees of freedom (5, 20) 335s 335s p = 0.001:0.001:0.999; 335s x1 = ncfinv (p, 5, 20, 10); 335s x2 = finv (p, 5, 20); 335s plot (p, x1, "-", p, x2, "-"); 335s grid on 335s ylim ([0, 10]) 335s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 335s title ("Noncentral F vs F quantile functions") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** test 335s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 335s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 335s ***** test 335s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 335s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 335s ***** test 335s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 335s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 335s ***** test 335s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 335s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 335s ***** test 335s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 335s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 335s ***** test 335s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 335s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 336s ***** test 336s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 336s ***** error ncfinv () 336s ***** error ncfinv (1) 336s ***** error ncfinv (1, 2) 336s ***** error ncfinv (1, 2, 3) 336s ***** error ... 336s ncfinv (ones (3), ones (2), ones (2), ones (2)) 336s ***** error ... 336s ncfinv (ones (2), ones (3), ones (2), ones (2)) 336s ***** error ... 336s ncfinv (ones (2), ones (2), ones (3), ones (2)) 336s ***** error ... 336s ncfinv (ones (2), ones (2), ones (2), ones (3)) 336s ***** error ncfinv (i, 2, 2, 2) 336s ***** error ncfinv (2, i, 2, 2) 336s ***** error ncfinv (2, 2, i, 2) 336s ***** error ncfinv (2, 2, 2, i) 336s 19 tests, 19 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/poisspdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/poisspdf.m 336s ***** demo 336s ## Plot various PDFs from the Poisson distribution 336s x = 0:20; 336s y1 = poisspdf (x, 1); 336s y2 = poisspdf (x, 4); 336s y3 = poisspdf (x, 10); 336s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 336s grid on 336s ylim ([0, 0.4]) 336s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 336s title ("Poisson PDF") 336s xlabel ("values in x (number of occurences)") 336s ylabel ("density") 336s ***** shared x, y 336s x = [-1 0 1 2 Inf]; 336s y = [0, exp(-1)*[1 1 0.5], 0]; 336s ***** assert (poisspdf (x, ones (1,5)), y, eps) 336s ***** assert (poisspdf (x, 1), y, eps) 336s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 336s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 336s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 336s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 336s ***** error poisspdf () 336s ***** error poisspdf (1) 336s ***** error ... 336s poisspdf (ones (3), ones (2)) 336s ***** error ... 336s poisspdf (ones (2), ones (3)) 336s ***** error poisspdf (i, 2) 336s ***** error poisspdf (2, i) 336s 12 tests, 12 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/jsucdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/jsucdf.m 336s ***** error jsucdf () 336s ***** error jsucdf (1, 2, 3, 4) 336s ***** error ... 336s jsucdf (1, ones (2), ones (3)) 336s 3 tests, 3 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/nctcdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nctcdf.m 336s ***** demo 336s ## Plot various CDFs from the noncentral Τ distribution 336s x = -5:0.01:5; 336s p1 = nctcdf (x, 1, 0); 336s p2 = nctcdf (x, 4, 0); 336s p3 = nctcdf (x, 1, 2); 336s p4 = nctcdf (x, 4, 2); 336s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 336s grid on 336s xlim ([-5, 5]) 336s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 336s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 336s title ("Noncentral Τ CDF") 336s xlabel ("values in x") 336s ylabel ("probability") 336s ***** demo 336s ## Compare the noncentral T CDF with MU = 1 to the T CDF 336s ## with the same number of degrees of freedom (10). 336s 336s x = -5:0.1:5; 336s p1 = nctcdf (x, 10, 1); 336s p2 = tcdf (x, 10); 336s plot (x, p1, "-", x, p2, "-") 336s grid on 336s xlim ([-5, 5]) 336s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 336s title ("Noncentral T vs T CDFs") 336s xlabel ("values in x") 336s ylabel ("probability") 336s ***** test 336s x = -2:0.1:2; 336s p = nctcdf (x, 10, 1); 336s assert (p(1), 0.003302485766631558, 1e-14); 336s assert (p(2), 0.004084668193532631, 1e-14); 336s assert (p(3), 0.005052800319478737, 1e-14); 336s assert (p(41), 0.8076115625303751, 1e-14); 336s ***** test 336s p = nctcdf (12, 10, 3); 336s assert (p, 0.9997719343243797, 1e-14); 336s ***** test 336s p = nctcdf (2, 3, 2); 336s assert (p, 0.4430757822176028, 1e-14); 336s ***** test 336s p = nctcdf (2, 3, 2, "upper"); 336s assert (p, 0.5569242177823971, 1e-14); 336s ***** test 336s p = nctcdf ([3, 6], 3, 2, "upper"); 336s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 336s ***** error nctcdf () 336s ***** error nctcdf (1) 336s ***** error nctcdf (1, 2) 336s ***** error nctcdf (1, 2, 3, "tail") 336s ***** error nctcdf (1, 2, 3, 4) 336s ***** error ... 336s nctcdf (ones (3), ones (2), ones (2)) 336s ***** error ... 336s nctcdf (ones (2), ones (3), ones (2)) 336s ***** error ... 336s nctcdf (ones (2), ones (2), ones (3)) 336s ***** error nctcdf (i, 2, 2) 336s ***** error nctcdf (2, i, 2) 336s ***** error nctcdf (2, 2, i) 336s 16 tests, 16 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/evinv.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/evinv.m 336s ***** demo 336s ## Plot various iCDFs from the extreme value distribution 336s p = 0.001:0.001:0.999; 336s x1 = evinv (p, 0.5, 2); 336s x2 = evinv (p, 1.0, 2); 336s x3 = evinv (p, 1.5, 3); 336s x4 = evinv (p, 3.0, 4); 336s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 336s grid on 336s ylim ([-10, 10]) 336s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 336s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 336s title ("Extreme value iCDF") 336s xlabel ("probability") 336s ylabel ("values in x") 336s ***** shared p, x 336s p = [0, 0.05, 0.5 0.95]; 336s x = [-Inf, -2.9702, -0.3665, 1.0972]; 336s ***** assert (evinv (p), x, 1e-4) 336s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 336s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 336s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 336s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 336s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 336s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 336s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 336s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 336s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 336s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 336s ***** error evinv () 336s ***** error evinv (1,2,3,4,5,6) 336s ***** error ... 336s evinv (ones (3), ones (2), ones (2)) 336s ***** error ... 336s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 336s ***** error ... 336s [p, plo, pup] = evinv (1, 2, 3) 336s ***** error [p, plo, pup] = ... 336s evinv (1, 2, 3, [1, 0; 0, 1], 0) 336s ***** error [p, plo, pup] = ... 336s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 336s ***** error evinv (i, 2, 2) 336s ***** error evinv (2, i, 2) 336s ***** error evinv (2, 2, i) 336s ***** error ... 336s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 336s 22 tests, 22 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/laplacecdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/laplacecdf.m 336s ***** demo 336s ## Plot various CDFs from the Laplace distribution 336s x = -10:0.01:10; 336s p1 = laplacecdf (x, 0, 1); 336s p2 = laplacecdf (x, 0, 2); 336s p3 = laplacecdf (x, 0, 4); 336s p4 = laplacecdf (x, -5, 4); 336s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 336s grid on 336s xlim ([-10, 10]) 336s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 336s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 336s title ("Laplace CDF") 336s xlabel ("values in x") 336s ylabel ("probability") 336s ***** shared x, y 336s x = [-Inf, -log(2), 0, log(2), Inf]; 336s y = [0, 1/4, 1/2, 3/4, 1]; 336s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 336s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 336s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 336s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 336s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 336s ***** error laplacecdf () 336s ***** error laplacecdf (1) 336s ***** error ... 336s laplacecdf (1, 2) 336s ***** error ... 336s laplacecdf (1, 2, 3, 4, 5) 336s ***** error laplacecdf (1, 2, 3, "tail") 336s ***** error laplacecdf (1, 2, 3, 4) 336s ***** error ... 336s laplacecdf (ones (3), ones (2), ones (2)) 336s ***** error ... 336s laplacecdf (ones (2), ones (3), ones (2)) 336s ***** error ... 336s laplacecdf (ones (2), ones (2), ones (3)) 336s ***** error laplacecdf (i, 2, 2) 336s ***** error laplacecdf (2, i, 2) 336s ***** error laplacecdf (2, 2, i) 336s 17 tests, 17 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/logninv.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logninv.m 336s ***** demo 336s ## Plot various iCDFs from the log-normal distribution 336s p = 0.001:0.001:0.999; 336s x1 = logninv (p, 0, 1); 336s x2 = logninv (p, 0, 0.5); 336s x3 = logninv (p, 0, 0.25); 336s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 336s grid on 336s ylim ([0, 3]) 336s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 336s "location", "northwest") 336s title ("Log-normal iCDF") 336s xlabel ("probability") 336s ylabel ("values in x") 336s ***** shared p 336s p = [-1 0 0.5 1 2]; 336s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 336s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 336s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 336s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 336s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 336s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 336s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 336s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 336s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 336s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 336s ***** error logninv () 336s ***** error logninv (1,2,3,4) 336s ***** error logninv (ones (3), ones (2), ones (2)) 336s ***** error logninv (ones (2), ones (3), ones (2)) 336s ***** error logninv (ones (2), ones (2), ones (3)) 336s ***** error logninv (i, 2, 2) 336s ***** error logninv (2, i, 2) 336s ***** error logninv (2, 2, i) 336s 18 tests, 18 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/chi2inv.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/chi2inv.m 336s ***** demo 336s ## Plot various iCDFs from the chi-squared distribution 336s p = 0.001:0.001:0.999; 336s x1 = chi2inv (p, 1); 336s x2 = chi2inv (p, 2); 336s x3 = chi2inv (p, 3); 336s x4 = chi2inv (p, 4); 336s x5 = chi2inv (p, 6); 336s x6 = chi2inv (p, 9); 336s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 336s p, x4, "-c", p, x5, "-m", p, x6, "-y") 336s grid on 336s ylim ([0, 8]) 336s legend ({"df = 1", "df = 2", "df = 3", ... 336s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 336s title ("Chi-squared iCDF") 336s xlabel ("probability") 336s ylabel ("values in x") 336s ***** shared p 336s p = [-1 0 0.3934693402873666 1 2]; 336s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 336s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 336s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 336s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 336s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 336s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 336s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 336s ***** error chi2inv () 336s ***** error chi2inv (1) 336s ***** error chi2inv (1,2,3) 336s ***** error ... 336s chi2inv (ones (3), ones (2)) 336s ***** error ... 336s chi2inv (ones (2), ones (3)) 336s ***** error chi2inv (i, 2) 336s ***** error chi2inv (2, i) 336s 14 tests, 14 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/ncfpdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncfpdf.m 336s ***** demo 336s ## Plot various PDFs from the noncentral F distribution 336s x = 0:0.01:5; 336s y1 = ncfpdf (x, 2, 5, 1); 336s y2 = ncfpdf (x, 2, 5, 2); 336s y3 = ncfpdf (x, 5, 10, 1); 336s y4 = ncfpdf (x, 10, 20, 10); 336s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 336s grid on 336s xlim ([0, 5]) 336s ylim ([0, 0.8]) 336s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 336s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 336s "location", "northeast") 336s title ("Noncentral F PDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** demo 336s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 336s ## same number of numerator and denominator degrees of freedom (5, 20) 336s 336s x = 0.01:0.1:10.01; 336s y1 = ncfpdf (x, 5, 20, 10); 336s y2 = fpdf (x, 5, 20); 336s plot (x, y1, "-", x, y2, "-"); 336s grid on 336s xlim ([0, 10]) 336s ylim ([0, 0.8]) 336s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 336s title ("Noncentral F vs F PDFs") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** shared x1, df1, df2, lambda 336s x1 = [-Inf, 2, NaN, 4, Inf]; 336s df1 = [2, 0, -1, 1, 4]; 336s df2 = [2, 4, 5, 6, 8]; 336s lambda = [1, NaN, 3, -1, 2]; 336s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 336s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 336s 0.05607937264237208, NaN], 1e-14); 336s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 336s 0.080125760971946518, NaN], 1e-14); 336s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 336s 0.0715902008258656, NaN], 1e-14); 336s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 336s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 336s NaN, 0.2152571783045893], 1e-14); 336s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 336s NaN, 0.05560846335398539], 1e-14); 336s ***** error ncfpdf () 336s ***** error ncfpdf (1) 336s ***** error ncfpdf (1, 2) 336s ***** error ncfpdf (1, 2, 3) 336s ***** error ... 336s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 336s ***** error ... 336s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 336s ***** error ... 336s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 336s ***** error ... 336s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 336s ***** error ncfpdf (i, 2, 2, 2) 336s ***** error ncfpdf (2, i, 2, 2) 336s ***** error ncfpdf (2, 2, i, 2) 336s ***** error ncfpdf (2, 2, 2, i) 336s 19 tests, 19 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/loglinv.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/loglinv.m 336s ***** demo 336s ## Plot various iCDFs from the log-logistic distribution 336s p = 0.001:0.001:0.999; 336s x1 = loglinv (p, log (1), 1/0.5); 336s x2 = loglinv (p, log (1), 1); 336s x3 = loglinv (p, log (1), 1/2); 336s x4 = loglinv (p, log (1), 1/4); 336s x5 = loglinv (p, log (1), 1/8); 336s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 336s ylim ([0, 20]) 336s grid on 336s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 336s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 336s title ("Log-logistic iCDF") 336s xlabel ("probability") 336s ylabel ("x") 336s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 336s ***** shared p, out1, out2 336s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 336s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 336s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 336s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 336s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 336s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 336s ***** assert (class (loglinv (single (1), 2, 3)), "single") 336s ***** assert (class (loglinv (1, single (2), 3)), "single") 336s ***** assert (class (loglinv (1, 2, single (3))), "single") 336s ***** error loglinv (1) 336s ***** error loglinv (1, 2) 336s ***** error ... 336s loglinv (1, ones (2), ones (3)) 336s ***** error ... 336s loglinv (ones (2), 1, ones (3)) 336s ***** error ... 336s loglinv (ones (2), ones (3), 1) 336s ***** error loglinv (i, 2, 3) 336s ***** error loglinv (1, i, 3) 336s ***** error loglinv (1, 2, i) 336s 14 tests, 14 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/mvnpdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvnpdf.m 336s ***** demo 336s mu = [1, -1]; 336s sigma = [0.9, 0.4; 0.4, 0.3]; 336s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 336s x = [X1(:), X2(:)]; 336s p = mvnpdf (x, mu, sigma); 336s surf (X1, X2, reshape (p, 25, 25)); 336s ***** error y = mvnpdf (); 336s ***** error y = mvnpdf ([]); 336s ***** error y = mvnpdf (ones (3,3,3)); 336s ***** error ... 336s y = mvnpdf (ones (10, 2), [4, 2, 3]); 336s ***** error ... 336s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 336s ***** error ... 336s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 336s ***** shared x, mu, sigma 336s x = [1, 2, 5, 4, 6]; 336s mu = [2, 0, -1, 1, 4]; 336s sigma = [2, 2, 2, 2, 2]; 336s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 336s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 336s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 336s 9 tests, 9 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/invgpdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/invgpdf.m 336s ***** demo 336s ## Plot various PDFs from the inverse Gaussian distribution 336s x = 0:0.001:3; 336s y1 = invgpdf (x, 1, 0.2); 336s y2 = invgpdf (x, 1, 1); 336s y3 = invgpdf (x, 1, 3); 336s y4 = invgpdf (x, 3, 0.2); 336s y5 = invgpdf (x, 3, 1); 336s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 336s grid on 336s xlim ([0, 3]) 336s ylim ([0, 3]) 336s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 336s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 336s title ("Inverse Gaussian PDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** shared x, y 336s x = [-Inf, -1, 0, 1/2, 1, Inf]; 336s y = [0, 0, 0, 0.8788, 0.3989, 0]; 336s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 336s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 336s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 336s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 336s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 336s ***** error invgpdf () 336s ***** error invgpdf (1) 336s ***** error invgpdf (1, 2) 336s ***** error ... 336s invgpdf (1, ones (2), ones (3)) 336s ***** error ... 336s invgpdf (ones (2), 1, ones (3)) 336s ***** error ... 336s invgpdf (ones (2), ones (3), 1) 336s ***** error invgpdf (i, 2, 3) 336s ***** error invgpdf (1, i, 3) 336s ***** error invgpdf (1, 2, i) 336s 14 tests, 14 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/gpcdf.m] 336s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gpcdf.m 336s ***** demo 336s ## Plot various CDFs from the generalized Pareto distribution 336s x = 0:0.001:5; 336s p1 = gpcdf (x, 1, 1, 0); 336s p2 = gpcdf (x, 5, 1, 0); 336s p3 = gpcdf (x, 20, 1, 0); 336s p4 = gpcdf (x, 1, 2, 0); 336s p5 = gpcdf (x, 5, 2, 0); 336s p6 = gpcdf (x, 20, 2, 0); 336s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 336s x, p4, "-c", x, p5, "-m", x, p6, "-k") 336s grid on 336s xlim ([0, 5]) 336s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 336s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 336s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 336s "location", "northwest") 336s title ("Generalized Pareto CDF") 336s xlabel ("values in x") 336s ylabel ("probability") 336s ***** shared x, y1, y1u, y2, y2u, y3, y3u 336s x = [-Inf, -1, 0, 1/2, 1, Inf]; 336s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 336s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 336s y2 = [0, 0, 0, 1/3, 1/2, 1]; 336s y2u = [1, 1, 1, 2/3, 1/2, 0]; 336s y3 = [0, 0, 0, 1/2, 1, 1]; 336s y3u = [1, 1, 1, 1/2, 0, 0]; 336s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 336s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 336s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 336s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 336s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 336s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 336s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 337s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 337s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 337s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 337s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 337s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 337s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 337s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 337s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 337s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 337s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 337s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 337s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 337s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 337s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 337s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 337s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 337s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 337s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 337s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 337s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 337s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 337s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 337s [y2u(1:3), NaN, y2u(5:6)], eps) 337s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 337s [y2u(1:3), NaN, y2u(5:6)], eps) 337s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 337s [y2u(1:3), NaN, y2u(5:6)], eps) 337s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 337s [y2u(1:3), NaN, y2u(5:6)], eps) 337s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 337s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 337s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 337s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 337s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 337s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 337s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 337s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 337s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 337s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 337s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 337s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 337s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 337s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 337s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 337s [y3u(1:3), NaN, y3u(5:6)], eps) 337s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 337s [y3u(1:3), NaN, y3u(5:6)], eps) 337s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 337s [y3u(1:3), NaN, y3u(5:6)], eps) 337s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 337s [y3u(1:3), NaN, y3u(5:6)], eps) 337s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 337s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 337s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 337s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 337s ***** error gpcdf () 337s ***** error gpcdf (1) 337s ***** error gpcdf (1, 2) 337s ***** error gpcdf (1, 2, 3) 337s ***** error gpcdf (1, 2, 3, 4, "tail") 337s ***** error gpcdf (1, 2, 3, 4, 5) 337s ***** error ... 337s gpcdf (ones (3), ones (2), ones(2), ones(2)) 337s ***** error ... 337s gpcdf (ones (2), ones (3), ones(2), ones(2)) 337s ***** error ... 337s gpcdf (ones (2), ones (2), ones(3), ones(2)) 337s ***** error ... 337s gpcdf (ones (2), ones (2), ones(2), ones(3)) 337s ***** error gpcdf (i, 2, 3, 4) 337s ***** error gpcdf (1, i, 3, 4) 337s ***** error gpcdf (1, 2, i, 4) 337s ***** error gpcdf (1, 2, 3, i) 337s 76 tests, 76 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/hnpdf.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hnpdf.m 337s ***** demo 337s ## Plot various PDFs from the half-normal distribution 337s x = 0:0.001:10; 337s y1 = hnpdf (x, 0, 1); 337s y2 = hnpdf (x, 0, 2); 337s y3 = hnpdf (x, 0, 3); 337s y4 = hnpdf (x, 0, 5); 337s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 337s grid on 337s xlim ([0, 10]) 337s ylim ([0, 0.9]) 337s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 337s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 337s title ("Half-normal PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** demo 337s ## Plot half-normal against normal probability density function 337s x = -5:0.001:5; 337s y1 = hnpdf (x, 0, 1); 337s y2 = normpdf (x); 337s plot (x, y1, "-b", x, y2, "-g") 337s grid on 337s xlim ([-5, 5]) 337s ylim ([0, 0.9]) 337s legend ({"half-normal with μ = 0, σ = 1", ... 337s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 337s title ("Half-normal against standard normal PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** shared x, y 337s x = [-Inf, -1, 0, 1/2, 1, Inf]; 337s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 337s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 337s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 337s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 337s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 337s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 337s ***** error hnpdf () 337s ***** error hnpdf (1) 337s ***** error hnpdf (1, 2) 337s ***** error ... 337s hnpdf (1, ones (2), ones (3)) 337s ***** error ... 337s hnpdf (ones (2), 1, ones (3)) 337s ***** error ... 337s hnpdf (ones (2), ones (3), 1) 337s ***** error hnpdf (i, 2, 3) 337s ***** error hnpdf (1, i, 3) 337s ***** error hnpdf (1, 2, i) 337s 14 tests, 14 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/ncx2rnd.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncx2rnd.m 337s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 337s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 337s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 337s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 337s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 337s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 337s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 337s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 337s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 337s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 337s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (class (ncx2rnd (1, 1)), "double") 337s ***** assert (class (ncx2rnd (1, single (1))), "single") 337s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 337s ***** assert (class (ncx2rnd (single (1), 1)), "single") 337s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 337s ***** error ncx2rnd () 337s ***** error ncx2rnd (1) 337s ***** error ... 337s ncx2rnd (ones (3), ones (2)) 337s ***** error ... 337s ncx2rnd (ones (2), ones (3)) 337s ***** error ncx2rnd (i, 2) 337s ***** error ncx2rnd (1, i) 337s ***** error ... 337s ncx2rnd (1, 2, -1) 337s ***** error ... 337s ncx2rnd (1, 2, 1.2) 337s ***** error ... 337s ncx2rnd (1, 2, ones (2)) 337s ***** error ... 337s ncx2rnd (1, 2, [2 -1 2]) 337s ***** error ... 337s ncx2rnd (1, 2, [2 0 2.5]) 337s ***** error ... 337s ncx2rnd (1, 2, 2, -1, 5) 337s ***** error ... 337s ncx2rnd (1, 2, 2, 1.5, 5) 337s ***** error ... 337s ncx2rnd (2, ones (2), 3) 337s ***** error ... 337s ncx2rnd (2, ones (2), [3, 2]) 337s ***** error ... 337s ncx2rnd (2, ones (2), 3, 2) 337s 33 tests, 33 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/tlsrnd.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tlsrnd.m 337s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 337s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 337s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 337s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 337s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 337s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 337s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 337s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 337s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 337s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 337s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 337s ***** assert (class (tlsrnd (1, 2, 3)), "double") 337s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 337s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 337s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 337s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 337s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 337s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 337s ***** error tlsrnd () 337s ***** error tlsrnd (1) 337s ***** error tlsrnd (1, 2) 337s ***** error ... 337s tlsrnd (ones (3), ones (2), 1) 337s ***** error ... 337s tlsrnd (ones (2), 1, ones (3)) 337s ***** error ... 337s tlsrnd (1, ones (2), ones (3)) 337s ***** error tlsrnd (i, 2, 3) 337s ***** error tlsrnd (1, i, 3) 337s ***** error tlsrnd (1, 2, i) 337s ***** error ... 337s tlsrnd (1, 2, 3, -1) 337s ***** error ... 337s tlsrnd (1, 2, 3, 1.2) 337s ***** error ... 337s tlsrnd (1, 2, 3, ones (2)) 337s ***** error ... 337s tlsrnd (1, 2, 3, [2 -1 2]) 337s ***** error ... 337s tlsrnd (1, 2, 3, [2 0 2.5]) 337s ***** error ... 337s tlsrnd (ones (2), 2, 3, ones (2)) 337s ***** error ... 337s tlsrnd (1, 2, 3, 2, -1, 5) 337s ***** error ... 337s tlsrnd (1, 2, 3, 2, 1.5, 5) 337s ***** error ... 337s tlsrnd (ones (2,2), 2, 3, 3) 337s ***** error ... 337s tlsrnd (1, ones (2,2), 3, 3) 337s ***** error ... 337s tlsrnd (1, 2, ones (2,2), 3) 337s ***** error ... 337s tlsrnd (1, 2, ones (2,2), [3, 3]) 337s ***** error ... 337s tlsrnd (1, 2, ones (2,2), 2, 3) 337s 42 tests, 42 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/chi2pdf.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/chi2pdf.m 337s ***** demo 337s ## Plot various PDFs from the chi-squared distribution 337s x = 0:0.01:8; 337s y1 = chi2pdf (x, 1); 337s y2 = chi2pdf (x, 2); 337s y3 = chi2pdf (x, 3); 337s y4 = chi2pdf (x, 4); 337s y5 = chi2pdf (x, 6); 337s y6 = chi2pdf (x, 9); 337s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 337s x, y4, "-c", x, y5, "-m", x, y6, "-y") 337s grid on 337s xlim ([0, 8]) 337s ylim ([0, 0.5]) 337s legend ({"df = 1", "df = 2", "df = 3", ... 337s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 337s title ("Chi-squared PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** shared x, y 337s x = [-1 0 0.5 1 Inf]; 337s y = [0, 1/2 * exp(-x(2:5)/2)]; 337s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 337s ***** assert (chi2pdf (x, 2), y) 337s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 337s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 337s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 337s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 337s ***** error chi2pdf () 337s ***** error chi2pdf (1) 337s ***** error chi2pdf (1,2,3) 337s ***** error ... 337s chi2pdf (ones (3), ones (2)) 337s ***** error ... 337s chi2pdf (ones (2), ones (3)) 337s ***** error chi2pdf (i, 2) 337s ***** error chi2pdf (2, i) 337s 13 tests, 13 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/lognpdf.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/lognpdf.m 337s ***** demo 337s ## Plot various PDFs from the log-normal distribution 337s x = 0:0.01:5; 337s y1 = lognpdf (x, 0, 1); 337s y2 = lognpdf (x, 0, 0.5); 337s y3 = lognpdf (x, 0, 0.25); 337s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 337s grid on 337s ylim ([0, 2]) 337s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 337s "location", "northeast") 337s title ("Log-normal PDF") 337s xlabel ("values in x") 337s ylabel ("density") 337s ***** shared x, y 337s x = [-1 0 e Inf]; 337s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 337s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 337s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 337s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 337s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 337s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 337s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 337s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 337s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 337s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 337s ***** error lognpdf () 337s ***** error lognpdf (1,2,3,4) 337s ***** error lognpdf (ones (3), ones (2), ones (2)) 337s ***** error lognpdf (ones (2), ones (3), ones (2)) 337s ***** error lognpdf (ones (2), ones (2), ones (3)) 337s ***** error lognpdf (i, 2, 2) 337s ***** error lognpdf (2, i, 2) 337s ***** error lognpdf (2, 2, i) 337s 17 tests, 17 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/trnd.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/trnd.m 337s ***** assert (size (trnd (2)), [1, 1]) 337s ***** assert (size (trnd (ones (2,1))), [2, 1]) 337s ***** assert (size (trnd (ones (2,2))), [2, 2]) 337s ***** assert (size (trnd (1, 3)), [3, 3]) 337s ***** assert (size (trnd (1, [4 1])), [4, 1]) 337s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 337s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 337s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 337s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 337s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (trnd (0, 1, 1), NaN) 337s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 337s ***** assert (class (trnd (2)), "double") 337s ***** assert (class (trnd (single (2))), "single") 337s ***** assert (class (trnd (single ([2 2]))), "single") 337s ***** error trnd () 337s ***** error trnd (i) 337s ***** error ... 337s trnd (1, -1) 337s ***** error ... 337s trnd (1, 1.2) 337s ***** error ... 337s trnd (1, ones (2)) 337s ***** error ... 337s trnd (1, [2 -1 2]) 337s ***** error ... 337s trnd (1, [2 0 2.5]) 337s ***** error ... 337s trnd (ones (2), ones (2)) 337s ***** error ... 337s trnd (1, 2, -1, 5) 337s ***** error ... 337s trnd (1, 2, 1.5, 5) 337s ***** error trnd (ones (2,2), 3) 337s ***** error trnd (ones (2,2), [3, 2]) 337s ***** error trnd (ones (2,2), 2, 3) 337s 29 tests, 29 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/hygernd.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hygernd.m 337s ***** assert (size (hygernd (4,2,2)), [1, 1]) 337s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 337s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 337s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 337s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 337s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 337s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 337s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 337s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 337s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 337s ***** assert (class (hygernd (4,2,2)), "double") 337s ***** assert (class (hygernd (single (4),2,2)), "single") 337s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 337s ***** assert (class (hygernd (4,single (2),2)), "single") 337s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 337s ***** assert (class (hygernd (4,2,single (2))), "single") 337s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 337s ***** error hygernd () 337s ***** error hygernd (1) 337s ***** error hygernd (1, 2) 337s ***** error ... 337s hygernd (ones (3), ones (2), ones (2)) 337s ***** error ... 337s hygernd (ones (2), ones (3), ones (2)) 337s ***** error ... 337s hygernd (ones (2), ones (2), ones (3)) 337s ***** error hygernd (i, 2, 3) 337s ***** error hygernd (1, i, 3) 337s ***** error hygernd (1, 2, i) 337s ***** error ... 337s hygernd (1, 2, 3, -1) 337s ***** error ... 337s hygernd (1, 2, 3, 1.2) 337s ***** error ... 337s hygernd (1, 2, 3, ones (2)) 337s ***** error ... 337s hygernd (1, 2, 3, [2 -1 2]) 337s ***** error ... 337s hygernd (1, 2, 3, [2 0 2.5]) 337s ***** error ... 337s hygernd (1, 2, 3, 2, -1, 5) 337s ***** error ... 337s hygernd (1, 2, 3, 2, 1.5, 5) 337s ***** error ... 337s hygernd (2, ones (2), 2, 3) 337s ***** error ... 337s hygernd (2, ones (2), 2, [3, 2]) 337s ***** error ... 337s hygernd (2, ones (2), 2, 3, 2) 337s 36 tests, 36 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/ncx2cdf.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncx2cdf.m 337s ***** demo 337s ## Plot various CDFs from the noncentral chi-squared distribution 337s x = 0:0.1:10; 337s p1 = ncx2cdf (x, 2, 1); 337s p2 = ncx2cdf (x, 2, 2); 337s p3 = ncx2cdf (x, 2, 3); 337s p4 = ncx2cdf (x, 4, 1); 337s p5 = ncx2cdf (x, 4, 2); 337s p6 = ncx2cdf (x, 4, 3); 337s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 337s x, p4, "-m", x, p5, "-c", x, p6, "-y") 337s grid on 337s xlim ([0, 10]) 337s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 337s "df = 2, λ = 3", "df = 4, λ = 1", ... 337s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 337s title ("Noncentral chi-squared CDF") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** demo 337s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 337s ## chi-squared CDF with the same number of degrees of freedom (4). 337s 337s x = 0:0.1:10; 337s p1 = ncx2cdf (x, 4, 2); 337s p2 = chi2cdf (x, 4); 337s plot (x, p1, "-", x, p2, "-") 337s grid on 337s xlim ([0, 10]) 337s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 337s title ("Noncentral chi-squared vs chi-squared CDFs") 337s xlabel ("values in x") 337s ylabel ("probability") 337s ***** test 337s x = -2:0.1:2; 337s p = ncx2cdf (x, 10, 1); 337s assert (p([1:21]), zeros (1, 21), 3e-84); 337s assert (p(22), 1.521400636466575e-09, 1e-14); 337s assert (p(30), 6.665480510026046e-05, 1e-14); 337s assert (p(41), 0.002406447308399836, 1e-14); 337s ***** test 337s p = ncx2cdf (12, 10, 3); 337s assert (p, 0.4845555602398649, 1e-14); 337s ***** test 337s p = ncx2cdf (2, 3, 2); 337s assert (p, 0.2207330870741212, 1e-14); 337s ***** test 337s p = ncx2cdf (2, 3, 2, "upper"); 337s assert (p, 0.7792669129258789, 1e-14); 337s ***** test 337s p = ncx2cdf ([3, 6], 3, 2, "upper"); 337s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 337s ***** error ncx2cdf () 337s ***** error ncx2cdf (1) 337s ***** error ncx2cdf (1, 2) 337s ***** error ncx2cdf (1, 2, 3, "tail") 337s ***** error ncx2cdf (1, 2, 3, 4) 337s ***** error ... 337s ncx2cdf (ones (3), ones (2), ones (2)) 337s ***** error ... 337s ncx2cdf (ones (2), ones (3), ones (2)) 337s ***** error ... 337s ncx2cdf (ones (2), ones (2), ones (3)) 337s ***** error ncx2cdf (i, 2, 2) 337s ***** error ncx2cdf (2, i, 2) 337s ***** error ncx2cdf (2, 2, i) 337s 16 tests, 16 passed, 0 known failure, 0 skipped 337s [inst/dist_fun/normrnd.m] 337s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/normrnd.m 337s ***** assert (size (normrnd (1, 1)), [1 1]) 337s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 337s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 337s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 337s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 337s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 337s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 337s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 337s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 337s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 337s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 337s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 337s ***** assert (class (normrnd (1, 1)), "double") 337s ***** assert (class (normrnd (1, single (1))), "single") 337s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 337s ***** assert (class (normrnd (single (1), 1)), "single") 337s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 337s ***** error normrnd () 337s ***** error normrnd (1) 337s ***** error ... 337s normrnd (ones (3), ones (2)) 338s ***** error ... 338s normrnd (ones (2), ones (3)) 338s ***** error normrnd (i, 2, 3) 338s ***** error normrnd (1, i, 3) 338s ***** error ... 338s normrnd (1, 2, -1) 338s ***** error ... 338s normrnd (1, 2, 1.2) 338s ***** error ... 338s normrnd (1, 2, ones (2)) 338s ***** error ... 338s normrnd (1, 2, [2 -1 2]) 338s ***** error ... 338s normrnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s normrnd (1, 2, 2, -1, 5) 338s ***** error ... 338s normrnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s normrnd (2, ones (2), 3) 338s ***** error ... 338s normrnd (2, ones (2), [3, 2]) 338s ***** error ... 338s normrnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/tlscdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tlscdf.m 338s ***** demo 338s ## Plot various CDFs from the location-scale Student's T distribution 338s x = -8:0.01:8; 338s p1 = tlscdf (x, 0, 1, 1); 338s p2 = tlscdf (x, 0, 2, 2); 338s p3 = tlscdf (x, 3, 2, 5); 338s p4 = tlscdf (x, -1, 3, Inf); 338s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 338s grid on 338s xlim ([-8, 8]) 338s ylim ([0, 1]) 338s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 338s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 338s "location", "northwest") 338s title ("Location-scale Student's T CDF") 338s xlabel ("values in x") 338s ylabel ("probability") 338s ***** shared x,y 338s x = [-Inf 0 1 Inf]; 338s y = [0 1/2 3/4 1]; 338s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 338s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 338s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 338s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 338s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 338s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 338s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 338s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 338s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 338s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 338s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 338s ***** error tlscdf () 338s ***** error tlscdf (1) 338s ***** error tlscdf (1, 2) 338s ***** error tlscdf (1, 2, 3) 338s ***** error tlscdf (1, 2, 3, 4, "uper") 338s ***** error tlscdf (1, 2, 3, 4, 5) 338s ***** error ... 338s tlscdf (ones (3), ones (2), 1, 1) 338s ***** error ... 338s tlscdf (ones (3), 1, ones (2), 1) 338s ***** error ... 338s tlscdf (ones (3), 1, 1, ones (2)) 338s ***** error ... 338s tlscdf (ones (3), ones (2), 1, 1, "upper") 338s ***** error ... 338s tlscdf (ones (3), 1, ones (2), 1, "upper") 338s ***** error ... 338s tlscdf (ones (3), 1, 1, ones (2), "upper") 338s ***** error tlscdf (i, 2, 1, 1) 338s ***** error tlscdf (2, i, 1, 1) 338s ***** error tlscdf (2, 1, i, 1) 338s ***** error tlscdf (2, 1, 1, i) 338s 27 tests, 27 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/bisarnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bisarnd.m 338s ***** assert (size (bisarnd (1, 1)), [1 1]) 338s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 338s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 338s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 338s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 338s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 338s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 338s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 338s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 338s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 338s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (bisarnd (1, 1)), "double") 338s ***** assert (class (bisarnd (1, single (1))), "single") 338s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 338s ***** assert (class (bisarnd (single (1), 1)), "single") 338s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 338s ***** error bisarnd () 338s ***** error bisarnd (1) 338s ***** error ... 338s bisarnd (ones (3), ones (2)) 338s ***** error ... 338s bisarnd (ones (2), ones (3)) 338s ***** error bisarnd (i, 2, 3) 338s ***** error bisarnd (1, i, 3) 338s ***** error ... 338s bisarnd (1, 2, -1) 338s ***** error ... 338s bisarnd (1, 2, 1.2) 338s ***** error ... 338s bisarnd (1, 2, ones (2)) 338s ***** error ... 338s bisarnd (1, 2, [2 -1 2]) 338s ***** error ... 338s bisarnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s bisarnd (1, 2, 2, -1, 5) 338s ***** error ... 338s bisarnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s bisarnd (2, ones (2), 3) 338s ***** error ... 338s bisarnd (2, ones (2), [3, 2]) 338s ***** error ... 338s bisarnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/gevcdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gevcdf.m 338s ***** demo 338s ## Plot various CDFs from the generalized extreme value distribution 338s x = -1:0.001:10; 338s p1 = gevcdf (x, 1, 1, 1); 338s p2 = gevcdf (x, 0.5, 1, 1); 338s p3 = gevcdf (x, 1, 1, 5); 338s p4 = gevcdf (x, 1, 2, 5); 338s p5 = gevcdf (x, 1, 5, 5); 338s p6 = gevcdf (x, 1, 0.5, 5); 338s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 338s x, p4, "-c", x, p5, "-m", x, p6, "-k") 338s grid on 338s xlim ([-1, 10]) 338s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 338s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 338s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 338s "location", "southeast") 338s title ("Generalized extreme value CDF") 338s xlabel ("values in x") 338s ylabel ("probability") 338s ***** test 338s x = 0:0.5:2.5; 338s sigma = 1:6; 338s k = 1; 338s mu = 0; 338s p = gevcdf (x, k, sigma, mu); 338s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 338s assert (p, expected_p, 0.001); 338s ***** test 338s x = -0.5:0.5:2.5; 338s sigma = 0.5; 338s k = 1; 338s mu = 0; 338s p = gevcdf (x, k, sigma, mu); 338s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 338s assert (p, expected_p, 0.001); 338s ***** test # check for continuity for k near 0 338s x = 1; 338s sigma = 0.5; 338s k = -0.03:0.01:0.03; 338s mu = 0; 338s p = gevcdf (x, k, sigma, mu); 338s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 338s assert (p, expected_p, 0.001); 338s ***** error gevcdf () 338s ***** error gevcdf (1) 338s ***** error gevcdf (1, 2) 338s ***** error gevcdf (1, 2, 3) 338s ***** error ... 338s gevcdf (1, 2, 3, 4, 5, 6) 338s ***** error gevcdf (1, 2, 3, 4, "tail") 338s ***** error gevcdf (1, 2, 3, 4, 5) 338s ***** error ... 338s gevcdf (ones (3), ones (2), ones(2), ones(2)) 338s ***** error ... 338s gevcdf (ones (2), ones (3), ones(2), ones(2)) 338s ***** error ... 338s gevcdf (ones (2), ones (2), ones(3), ones(2)) 338s ***** error ... 338s gevcdf (ones (2), ones (2), ones(2), ones(3)) 338s ***** error gevcdf (i, 2, 3, 4) 338s ***** error gevcdf (1, i, 3, 4) 338s ***** error gevcdf (1, 2, i, 4) 338s ***** error gevcdf (1, 2, 3, i) 338s 18 tests, 18 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/tinv.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tinv.m 338s ***** demo 338s ## Plot various iCDFs from the Student's T distribution 338s p = 0.001:0.001:0.999; 338s x1 = tinv (p, 1); 338s x2 = tinv (p, 2); 338s x3 = tinv (p, 5); 338s x4 = tinv (p, Inf); 338s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 338s grid on 338s xlim ([0, 1]) 338s ylim ([-5, 5]) 338s legend ({"df = 1", "df = 2", ... 338s "df = 5", 'df = \infty'}, "location", "northwest") 338s title ("Student's T iCDF") 338s xlabel ("probability") 338s ylabel ("values in x") 338s ***** shared p 338s p = [-1 0 0.5 1 2]; 338s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 338s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 338s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 338s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 338s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 338s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 338s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 338s ***** error tinv () 338s ***** error tinv (1) 338s ***** error ... 338s tinv (ones (3), ones (2)) 338s ***** error ... 338s tinv (ones (2), ones (3)) 338s ***** error tinv (i, 2) 338s ***** error tinv (2, i) 338s 13 tests, 13 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/copulacdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/copulacdf.m 338s ***** test 338s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 338s theta = [1; 2]; 338s p = copulacdf ("Clayton", x, theta); 338s expected_p = [0.1395; 0.1767]; 338s assert (p, expected_p, 0.001); 338s ***** test 338s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 338s p = copulacdf ("Gumbel", x, 2); 338s expected_p = [0.1464; 0.1464]; 338s assert (p, expected_p, 0.001); 338s ***** test 338s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 338s theta = [1; 2]; 338s p = copulacdf ("Frank", x, theta); 338s expected_p = [0.0699; 0.0930]; 338s assert (p, expected_p, 0.001); 338s ***** test 338s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 338s theta = [0.3; 0.7]; 338s p = copulacdf ("AMH", x, theta); 338s expected_p = [0.0629; 0.0959]; 338s assert (p, expected_p, 0.001); 338s ***** test 338s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 338s theta = [0.2, 0.1, 0.1, 0.05]; 338s p = copulacdf ("FGM", x, theta); 338s expected_p = [0.0558; 0.0293]; 338s assert (p, expected_p, 0.001); 338s 5 tests, 5 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/trirnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/trirnd.m 338s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 338s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 338s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 338s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 338s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 338s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 338s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 338s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 338s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 338s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 338s ***** assert (class (trirnd (1, 1.5, 2)), "double") 338s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 338s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 338s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 338s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 338s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 338s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 338s ***** error trirnd () 338s ***** error trirnd (1) 338s ***** error trirnd (1, 2) 338s ***** error ... 338s trirnd (ones (3), 5 * ones (2), ones (2)) 338s ***** error ... 338s trirnd (ones (2), 5 * ones (3), ones (2)) 338s ***** error ... 338s trirnd (ones (2), 5 * ones (2), ones (3)) 338s ***** error trirnd (i, 5, 3) 338s ***** error trirnd (1, 5+i, 3) 338s ***** error trirnd (1, 5, i) 338s ***** error ... 338s trirnd (1, 5, 3, -1) 338s ***** error ... 338s trirnd (1, 5, 3, 1.2) 338s ***** error ... 338s trirnd (1, 5, 3, ones (2)) 338s ***** error ... 338s trirnd (1, 5, 3, [2 -1 2]) 338s ***** error ... 338s trirnd (1, 5, 3, [2 0 2.5]) 338s ***** error ... 338s trirnd (1, 5, 3, 2, -1, 5) 338s ***** error ... 338s trirnd (1, 5, 3, 2, 1.5, 5) 338s ***** error ... 338s trirnd (2, 5 * ones (2), 2, 3) 338s ***** error ... 338s trirnd (2, 5 * ones (2), 2, [3, 2]) 338s ***** error ... 338s trirnd (2, 5 * ones (2), 2, 3, 2) 338s 36 tests, 36 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/wblrnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wblrnd.m 338s ***** assert (size (wblrnd (1, 1)), [1 1]) 338s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 338s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 338s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 338s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 338s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 338s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 338s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 338s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 338s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 338s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (wblrnd (1, 1)), "double") 338s ***** assert (class (wblrnd (1, single (1))), "single") 338s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 338s ***** assert (class (wblrnd (single (1), 1)), "single") 338s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 338s ***** error wblrnd () 338s ***** error wblrnd (1) 338s ***** error ... 338s wblrnd (ones (3), ones (2)) 338s ***** error ... 338s wblrnd (ones (2), ones (3)) 338s ***** error wblrnd (i, 2, 3) 338s ***** error wblrnd (1, i, 3) 338s ***** error ... 338s wblrnd (1, 2, -1) 338s ***** error ... 338s wblrnd (1, 2, 1.2) 338s ***** error ... 338s wblrnd (1, 2, ones (2)) 338s ***** error ... 338s wblrnd (1, 2, [2 -1 2]) 338s ***** error ... 338s wblrnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s wblrnd (1, 2, 2, -1, 5) 338s ***** error ... 338s wblrnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s wblrnd (2, ones (2), 3) 338s ***** error ... 338s wblrnd (2, ones (2), [3, 2]) 338s ***** error ... 338s wblrnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/plrnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/plrnd.m 338s ***** shared x, Fx 338s x = [0, 1, 3, 4, 7, 10]; 338s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 338s ***** assert (size (plrnd (x, Fx)), [1, 1]) 338s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 338s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 338s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 338s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 338s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 338s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (plrnd (x, Fx)), "double") 338s ***** assert (class (plrnd (x, single (Fx))), "single") 338s ***** assert (class (plrnd (single (x), Fx)), "single") 338s ***** error plrnd () 338s ***** error plrnd (1) 338s ***** error ... 338s plrnd ([0, 1, 2], [0, 1]) 338s ***** error ... 338s plrnd ([0], [1]) 338s ***** error ... 338s plrnd ([0, 1, 2], [0, 1, 1.5]) 338s ***** error ... 338s plrnd ([0, 1, 2], [0, i, 1]) 338s ***** error ... 338s plrnd ([0, i, 2], [0, 0.5, 1]) 338s ***** error ... 338s plrnd ([0, i, 2], [0, 0.5i, 1]) 338s ***** error ... 338s plrnd (x, Fx, -1) 338s ***** error ... 338s plrnd (x, Fx, 1.2) 338s ***** error ... 338s plrnd (x, Fx, ones (2)) 338s ***** error ... 338s plrnd (x, Fx, [2 -1 2]) 338s ***** error ... 338s plrnd (x, Fx, [2 0 2.5]) 338s ***** error ... 338s plrnd (x, Fx, 2, -1, 5) 338s ***** error ... 338s plrnd (x, Fx, 2, 1.5, 5) 338s 26 tests, 26 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/laplacepdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/laplacepdf.m 338s ***** demo 338s ## Plot various PDFs from the Laplace distribution 338s x = -10:0.01:10; 338s y1 = laplacepdf (x, 0, 1); 338s y2 = laplacepdf (x, 0, 2); 338s y3 = laplacepdf (x, 0, 4); 338s y4 = laplacepdf (x, -5, 4); 338s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 338s grid on 338s xlim ([-10, 10]) 338s ylim ([0, 0.6]) 338s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 338s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 338s title ("Laplace PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** shared x, y 338s x = [-Inf -log(2) 0 log(2) Inf]; 338s y = [0, 1/4, 1/2, 1/4, 0]; 338s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 338s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 338s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 338s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 338s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 338s ***** error laplacepdf () 338s ***** error laplacepdf (1) 338s ***** error ... 338s laplacepdf (1, 2) 338s ***** error laplacepdf (1, 2, 3, 4) 338s ***** error ... 338s laplacepdf (1, ones (2), ones (3)) 338s ***** error ... 338s laplacepdf (ones (2), 1, ones (3)) 338s ***** error ... 338s laplacepdf (ones (2), ones (3), 1) 338s ***** error laplacepdf (i, 2, 3) 338s ***** error laplacepdf (1, i, 3) 338s ***** error laplacepdf (1, 2, i) 338s 15 tests, 15 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/mvncdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvncdf.m 338s ***** demo 338s mu = [1, -1]; 338s Sigma = [0.9, 0.4; 0.4, 0.3]; 338s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 338s X = [X1(:), X2(:)]; 338s p = mvncdf (X, mu, Sigma); 338s Z = reshape (p, 25, 25); 338s surf (X1, X2, Z); 338s title ("Bivariate Normal Distribution"); 338s ylabel "X1" 338s xlabel "X2" 338s ***** demo 338s mu = [0, 0]; 338s Sigma = [0.25, 0.3; 0.3, 1]; 338s p = mvncdf ([0 0], [1 1], mu, Sigma); 338s x1 = -3:.2:3; 338s x2 = -3:.2:3; 338s [X1, X2] = meshgrid (x1, x2); 338s X = [X1(:), X2(:)]; 338s p = mvnpdf (X, mu, Sigma); 338s p = reshape (p, length (x2), length (x1)); 338s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 338s xlabel ("x"); 338s ylabel ("p"); 338s title ("Probability over Rectangular Region"); 338s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 338s ***** test 338s fD = (-2:2)'; 338s X = repmat (fD, 1, 4); 338s p = mvncdf (X); 338s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 338s ***** test 338s mu = [1, -1]; 338s Sigma = [0.9, 0.4; 0.4, 0.3]; 338s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 338s X = [X1(:), X2(:)]; 338s p = mvncdf (X, mu, Sigma); 338s p_out = [0.00011878988774500, 0.00034404112322371, ... 338s 0.00087682502191813, 0.00195221905058185, ... 338s 0.00378235566873474, 0.00638175749734415, ... 338s 0.00943764224329656, 0.01239164888125426, ... 338s 0.01472750274376648, 0.01623228313374828]'; 338s assert (p([1:10]), p_out, 1e-16); 338s ***** test 338s mu = [1, -1]; 338s Sigma = [0.9, 0.4; 0.4, 0.3]; 338s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 338s X = [X1(:), X2(:)]; 338s p = mvncdf (X, mu, Sigma); 338s p_out = [0.8180695783608276, 0.8854485749482751, ... 338s 0.9308108777385832, 0.9579855743025508, ... 338s 0.9722897881414742, 0.9788150170059926, ... 338s 0.9813597788804785, 0.9821977956568989, ... 338s 0.9824283794464095, 0.9824809345614861]'; 338s assert (p([616:625]), p_out, 3e-16); 338s ***** test 338s mu = [0, 0]; 338s Sigma = [0.25, 0.3; 0.3, 1]; 338s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 338s assert (p, 0.2097424404755626, 1e-16); 338s assert (err, 1e-08); 338s ***** test 338s x = [1 2]; 338s mu = [0.5 1.5]; 338s sigma = [1.0, 0.5; 0.5, 1.0]; 338s p = mvncdf (x, mu, sigma); 338s assert (p, 0.546244443857090, 1e-15); 338s ***** test 338s x = [1 2]; 338s mu = [0.5 1.5]; 338s sigma = [1.0, 0.5; 0.5, 1.0]; 338s a = [-inf 0]; 338s p = mvncdf (a, x, mu, sigma); 338s assert (p, 0.482672935215631, 1e-15); 338s ***** error p = mvncdf (randn (25,26), [], eye (26)); 338s ***** error p = mvncdf (randn (25,8), [], eye (9)); 338s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 338s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 338s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 338s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 338s 12 tests, 12 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/raylpdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/raylpdf.m 338s ***** demo 338s ## Plot various PDFs from the Rayleigh distribution 338s x = 0:0.01:10; 338s y1 = raylpdf (x, 0.5); 338s y2 = raylpdf (x, 1); 338s y3 = raylpdf (x, 2); 338s y4 = raylpdf (x, 3); 338s y5 = raylpdf (x, 4); 338s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 338s grid on 338s ylim ([0, 1.25]) 338s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 338s "σ = 3", "σ = 4"}, "location", "northeast") 338s title ("Rayleigh PDF") 338s xlabel ("values in x") 338s ylabel ("density") 338s ***** test 338s x = 0:0.5:2.5; 338s sigma = 1:6; 338s y = raylpdf (x, sigma); 338s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 338s assert (y, expected_y, 0.001); 338s ***** test 338s x = 0:0.5:2.5; 338s y = raylpdf (x, 0.5); 338s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 338s assert (y, expected_y, 0.001); 338s ***** error raylpdf () 338s ***** error raylpdf (1) 338s ***** error ... 338s raylpdf (ones (3), ones (2)) 338s ***** error ... 338s raylpdf (ones (2), ones (3)) 338s ***** error raylpdf (i, 2) 338s ***** error raylpdf (2, i) 338s 8 tests, 8 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/nbinrnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nbinrnd.m 338s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 338s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 338s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 338s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 338s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 338s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 338s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 338s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 338s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 338s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 338s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (nbinrnd (1, 0.5)), "double") 338s ***** assert (class (nbinrnd (1, single (0.5))), "single") 338s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 338s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 338s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 338s ***** error nbinrnd () 338s ***** error nbinrnd (1) 338s ***** error ... 338s nbinrnd (ones (3), ones (2)) 338s ***** error ... 338s nbinrnd (ones (2), ones (3)) 338s ***** error nbinrnd (i, 2, 3) 338s ***** error nbinrnd (1, i, 3) 338s ***** error ... 338s nbinrnd (1, 2, -1) 338s ***** error ... 338s nbinrnd (1, 2, 1.2) 338s ***** error ... 338s nbinrnd (1, 2, ones (2)) 338s ***** error ... 338s nbinrnd (1, 2, [2 -1 2]) 338s ***** error ... 338s nbinrnd (1, 2, [2 0 2.5]) 338s ***** error ... 338s nbinrnd (1, 2, 2, -1, 5) 338s ***** error ... 338s nbinrnd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s nbinrnd (2, ones (2), 3) 338s ***** error ... 338s nbinrnd (2, ones (2), [3, 2]) 338s ***** error ... 338s nbinrnd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/laplacernd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/laplacernd.m 338s ***** assert (size (laplacernd (1, 1)), [1 1]) 338s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 338s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 338s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 338s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 338s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 338s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 338s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 338s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 338s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 338s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 338s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 338s ***** assert (class (laplacernd (1, 1)), "double") 338s ***** assert (class (laplacernd (1, single (1))), "single") 338s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 338s ***** assert (class (laplacernd (single (1), 1)), "single") 338s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 338s ***** error laplacernd () 338s ***** error laplacernd (1) 338s ***** error ... 338s laplacernd (ones (3), ones (2)) 338s ***** error ... 338s laplacernd (ones (2), ones (3)) 338s ***** error laplacernd (i, 2, 3) 338s ***** error laplacernd (1, i, 3) 338s ***** error ... 338s laplacernd (1, 2, -1) 338s ***** error ... 338s laplacernd (1, 2, 1.2) 338s ***** error ... 338s laplacernd (1, 2, ones (2)) 338s ***** error ... 338s laplacernd (1, 2, [2 -1 2]) 338s ***** error ... 338s laplacernd (1, 2, [2 0 2.5]) 338s ***** error ... 338s laplacernd (1, 2, 2, -1, 5) 338s ***** error ... 338s laplacernd (1, 2, 2, 1.5, 5) 338s ***** error ... 338s laplacernd (2, ones (2), 3) 338s ***** error ... 338s laplacernd (2, ones (2), [3, 2]) 338s ***** error ... 338s laplacernd (2, ones (2), 3, 2) 338s 33 tests, 33 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/mvnrnd.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvnrnd.m 338s ***** error mvnrnd () 338s ***** error mvnrnd ([2, 3, 4]) 338s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 338s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 338s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 338s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 338s 6 tests, 6 passed, 0 known failure, 0 skipped 338s [inst/dist_fun/vmcdf.m] 338s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/vmcdf.m 338s ***** demo 338s ## Plot various CDFs from the von Mises distribution 338s x1 = [-pi:0.1:pi]; 338s p1 = vmcdf (x1, 0, 0.5); 338s p2 = vmcdf (x1, 0, 1); 338s p3 = vmcdf (x1, 0, 2); 338s p4 = vmcdf (x1, 0, 4); 338s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 338s grid on 338s xlim ([-pi, pi]) 338s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 338s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 338s title ("Von Mises CDF") 338s xlabel ("values in x") 338s ylabel ("probability") 338s ***** shared x, p0, p1 338s x = [-pi:pi/2:pi]; 338s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 338s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 338s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 338s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 339s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 339s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 339s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 339s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 339s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 339s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 339s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 339s ***** error vmcdf () 339s ***** error vmcdf (1) 339s ***** error vmcdf (1, 2) 339s ***** error vmcdf (1, 2, 3, "tail") 339s ***** error vmcdf (1, 2, 3, 4) 339s ***** error ... 339s vmcdf (ones (3), ones (2), ones (2)) 339s ***** error ... 339s vmcdf (ones (2), ones (3), ones (2)) 339s ***** error ... 339s vmcdf (ones (2), ones (2), ones (3)) 339s ***** error vmcdf (i, 2, 2) 339s ***** error vmcdf (2, i, 2) 339s ***** error vmcdf (2, 2, i) 339s 20 tests, 20 passed, 0 known failure, 0 skipped 339s [inst/dist_fun/binornd.m] 339s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/binornd.m 339s ***** assert (size (binornd (2, 1/2)), [1 1]) 339s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 339s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 339s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 339s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 339s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 339s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 339s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 339s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 339s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 339s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 339s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 339s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 339s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 339s ***** assert (class (binornd (1, 1)), "double") 339s ***** assert (class (binornd (1, single (0))), "single") 339s ***** assert (class (binornd (1, single ([0, 0]))), "single") 339s ***** assert (class (binornd (1, single (1), 2)), "single") 339s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 339s ***** assert (class (binornd (single (1), 1, 2)), "single") 339s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 339s ***** error binornd () 339s ***** error binornd (1) 339s ***** error ... 339s binornd (ones (3), ones (2)) 339s ***** error ... 339s binornd (ones (2), ones (3)) 339s ***** error binornd (i, 2) 339s ***** error binornd (1, i) 339s ***** error ... 339s binornd (1, 1/2, -1) 339s ***** error ... 339s binornd (1, 1/2, 1.2) 339s ***** error ... 339s binornd (1, 1/2, ones (2)) 339s ***** error ... 339s binornd (1, 1/2, [2 -1 2]) 339s ***** error ... 339s binornd (1, 1/2, [2 0 2.5]) 339s ***** error ... 339s binornd (1, 1/2, 2, -1, 5) 339s ***** error ... 339s binornd (1, 1/2, 2, 1.5, 5) 339s ***** error ... 339s binornd (2, 1/2 * ones (2), 3) 339s ***** error ... 339s binornd (2, 1/2 * ones (2), [3, 2]) 339s ***** error ... 339s binornd (2, 1/2 * ones (2), 3, 2) 339s ***** error ... 339s binornd (2 * ones (2), 1/2, 3) 339s ***** error ... 339s binornd (2 * ones (2), 1/2, [3, 2]) 339s ***** error ... 339s binornd (2 * ones (2), 1/2, 3, 2) 339s 40 tests, 40 passed, 0 known failure, 0 skipped 339s [inst/dist_fun/frnd.m] 339s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/frnd.m 339s ***** assert (size (frnd (1, 1)), [1 1]) 339s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 339s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 339s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 339s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 339s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 339s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 339s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 339s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 339s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 339s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 339s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 339s ***** assert (class (frnd (1, 1)), "double") 339s ***** assert (class (frnd (1, single (1))), "single") 339s ***** assert (class (frnd (1, single ([1, 1]))), "single") 339s ***** assert (class (frnd (single (1), 1)), "single") 339s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 339s ***** error frnd () 339s ***** error frnd (1) 339s ***** error ... 339s frnd (ones (3), ones (2)) 339s ***** error ... 339s frnd (ones (2), ones (3)) 339s ***** error frnd (i, 2, 3) 339s ***** error frnd (1, i, 3) 339s ***** error ... 339s frnd (1, 2, -1) 339s ***** error ... 339s frnd (1, 2, 1.2) 339s ***** error ... 339s frnd (1, 2, ones (2)) 339s ***** error ... 339s frnd (1, 2, [2 -1 2]) 339s ***** error ... 339s frnd (1, 2, [2 0 2.5]) 339s ***** error ... 339s frnd (1, 2, 2, -1, 5) 339s ***** error ... 339s frnd (1, 2, 2, 1.5, 5) 339s ***** error ... 339s frnd (2, ones (2), 3) 339s ***** error ... 339s frnd (2, ones (2), [3, 2]) 339s ***** error ... 339s frnd (2, ones (2), 3, 2) 339s 33 tests, 33 passed, 0 known failure, 0 skipped 339s [inst/dist_fun/normcdf.m] 339s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/normcdf.m 339s ***** demo 339s ## Plot various CDFs from the normal distribution 339s x = -5:0.01:5; 339s p1 = normcdf (x, 0, 0.5); 339s p2 = normcdf (x, 0, 1); 339s p3 = normcdf (x, 0, 2); 339s p4 = normcdf (x, -2, 0.8); 339s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 339s grid on 339s xlim ([-5, 5]) 339s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 339s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 339s title ("Normal CDF") 339s xlabel ("values in x") 339s ylabel ("probability") 339s ***** shared x, y 339s x = [-Inf 1 2 Inf]; 339s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 339s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 339s ***** assert (normcdf (x, 1, ones (1,4)), y) 339s ***** assert (normcdf (x, ones (1,4), 1), y) 339s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 339s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 339s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 339s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 339s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 339s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 339s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 339s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 339s ***** error normcdf () 339s ***** error normcdf (1,2,3,4,5,6,7) 339s ***** error normcdf (1, 2, 3, 4, "uper") 339s ***** error ... 339s normcdf (ones (3), ones (2), ones (2)) 339s ***** error normcdf (2, 3, 4, [1, 2]) 339s ***** error ... 339s [p, plo, pup] = normcdf (1, 2, 3) 339s ***** error [p, plo, pup] = ... 339s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 339s ***** error [p, plo, pup] = ... 339s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 339s ***** error [p, plo, pup] = ... 339s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 339s ***** error normcdf (i, 2, 2) 339s ***** error normcdf (2, i, 2) 339s ***** error normcdf (2, 2, i) 339s ***** error ... 339s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 339s 24 tests, 24 passed, 0 known failure, 0 skipped 339s [inst/dist_fun/gaminv.m] 339s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gaminv.m 339s ***** demo 339s ## Plot various iCDFs from the Gamma distribution 339s p = 0.001:0.001:0.999; 339s x1 = gaminv (p, 1, 2); 339s x2 = gaminv (p, 2, 2); 339s x3 = gaminv (p, 3, 2); 339s x4 = gaminv (p, 5, 1); 339s x5 = gaminv (p, 9, 0.5); 339s x6 = gaminv (p, 7.5, 1); 339s x7 = gaminv (p, 0.5, 1); 339s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 339s p, x5, "-k", p, x6, "-b", p, x7, "-c") 339s ylim ([0, 20]) 339s grid on 339s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 339s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 339s "α = 0.5, β = 1"}, "location", "northwest") 339s title ("Gamma iCDF") 339s xlabel ("probability") 339s ylabel ("x") 339s ***** shared p 339s p = [-1 0 0.63212055882855778 1 2]; 339s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 339s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 339s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 339s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 339s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 339s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 339s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 339s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 339s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 339s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 339s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 339s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 339s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 339s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 339s eps ("single")) 339s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 339s eps ("single")) 339s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 339s eps ("single")) 339s ***** error gaminv () 339s ***** error gaminv (1) 339s ***** error gaminv (1,2) 339s ***** error ... 339s gaminv (ones (3), ones (2), ones (2)) 339s ***** error ... 339s gaminv (ones (2), ones (3), ones (2)) 339s ***** error ... 339s gaminv (ones (2), ones (2), ones (3)) 339s ***** error gaminv (i, 2, 2) 339s ***** error gaminv (2, i, 2) 339s ***** error gaminv (2, 2, i) 339s 25 tests, 25 passed, 0 known failure, 0 skipped 339s [inst/dist_fun/logirnd.m] 339s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logirnd.m 339s ***** assert (size (logirnd (1, 1)), [1 1]) 339s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 339s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 339s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 339s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 339s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 339s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 339s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 339s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 339s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 339s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 339s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 339s ***** assert (class (logirnd (1, 1)), "double") 339s ***** assert (class (logirnd (1, single (1))), "single") 339s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 339s ***** assert (class (logirnd (single (1), 1)), "single") 339s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 339s ***** error logirnd () 339s ***** error logirnd (1) 339s ***** error ... 339s logirnd (ones (3), ones (2)) 339s ***** error ... 339s logirnd (ones (2), ones (3)) 339s ***** error logirnd (i, 2, 3) 339s ***** error logirnd (1, i, 3) 339s ***** error ... 339s logirnd (1, 2, -1) 339s ***** error ... 339s logirnd (1, 2, 1.2) 340s ***** error ... 340s logirnd (1, 2, ones (2)) 340s ***** error ... 340s logirnd (1, 2, [2 -1 2]) 340s ***** error ... 340s logirnd (1, 2, [2 0 2.5]) 340s ***** error ... 340s logirnd (1, 2, 2, -1, 5) 340s ***** error ... 340s logirnd (1, 2, 2, 1.5, 5) 340s ***** error ... 340s logirnd (2, ones (2), 3) 340s ***** error ... 340s logirnd (2, ones (2), [3, 2]) 340s ***** error ... 340s logirnd (2, ones (2), 3, 2) 340s 33 tests, 33 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/unidinv.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unidinv.m 340s ***** demo 340s ## Plot various iCDFs from the discrete uniform distribution 340s p = 0.001:0.001:0.999; 340s x1 = unidinv (p, 5); 340s x2 = unidinv (p, 9); 340s plot (p, x1, "-b", p, x2, "-g") 340s grid on 340s xlim ([0, 1]) 340s ylim ([0, 10]) 340s legend ({"N = 5", "N = 9"}, "location", "northwest") 340s title ("Discrete uniform iCDF") 340s xlabel ("probability") 340s ylabel ("values in x") 340s ***** shared p 340s p = [-1 0 0.5 1 2]; 340s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 340s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 340s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 340s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 340s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 340s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 340s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 340s ***** error unidinv () 340s ***** error unidinv (1) 340s ***** error ... 340s unidinv (ones (3), ones (2)) 340s ***** error ... 340s unidinv (ones (2), ones (3)) 340s ***** error unidinv (i, 2) 340s ***** error unidinv (2, i) 340s 13 tests, 13 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/gprnd.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gprnd.m 340s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 340s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 340s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 340s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 340s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 340s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 340s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 340s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 340s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 340s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 340s ***** assert (size (gprnd (1,1,0)), [1, 1]) 340s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 340s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 340s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 340s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 340s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 340s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 340s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 340s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 340s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 340s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 340s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 340s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 340s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 340s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 340s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 340s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 340s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 340s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 340s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 340s ***** assert (class (gprnd (0, 1, 0)), "double") 340s ***** assert (class (gprnd (0, 1, single (0))), "single") 340s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 340s ***** assert (class (gprnd (0, single (1),0)), "single") 340s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 340s ***** assert (class (gprnd (single (0), 1, 0)), "single") 340s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 340s ***** error gprnd () 340s ***** error gprnd (1) 340s ***** error gprnd (1, 2) 340s ***** error ... 340s gprnd (ones (3), ones (2), ones (2)) 340s ***** error ... 340s gprnd (ones (2), ones (3), ones (2)) 340s ***** error ... 340s gprnd (ones (2), ones (2), ones (3)) 340s ***** error gprnd (i, 2, 3) 340s ***** error gprnd (1, i, 3) 340s ***** error gprnd (1, 2, i) 340s ***** error ... 340s gprnd (1, 2, 3, -1) 340s ***** error ... 340s gprnd (1, 2, 3, 1.2) 340s ***** error ... 340s gprnd (1, 2, 3, ones (2)) 340s ***** error ... 340s gprnd (1, 2, 3, [2 -1 2]) 340s ***** error ... 340s gprnd (1, 2, 3, [2 0 2.5]) 340s ***** error ... 340s gprnd (1, 2, 3, 2, -1, 5) 340s ***** error ... 340s gprnd (1, 2, 3, 2, 1.5, 5) 340s ***** error ... 340s gprnd (2, ones (2), 2, 3) 340s ***** error ... 340s gprnd (2, ones (2), 2, [3, 2]) 340s ***** error ... 340s gprnd (2, ones (2), 2, 3, 2) 340s 56 tests, 56 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/hygecdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hygecdf.m 340s ***** demo 340s ## Plot various CDFs from the hypergeometric distribution 340s x = 0:60; 340s p1 = hygecdf (x, 500, 50, 100); 340s p2 = hygecdf (x, 500, 60, 200); 340s p3 = hygecdf (x, 500, 70, 300); 340s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 340s grid on 340s xlim ([0, 60]) 340s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 340s "m = 500, k = 70, n = 300"}, "location", "southeast") 340s title ("Hypergeometric CDF") 340s xlabel ("values in x (number of successes)") 340s ylabel ("probability") 340s ***** shared x, y 340s x = [-1 0 1 2 3]; 340s y = [0 1/6 5/6 1 1]; 340s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 340s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 340s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 340s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 340s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 340s [y(5) NaN NaN NaN y(1)], 5*eps) 340s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 340s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 340s [y(5) NaN NaN NaN y(1)], 5*eps) 340s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 340s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 340s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 340s [y(5) NaN NaN NaN y(1)], 5*eps) 340s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 340s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 340s ***** test 340s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 340s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 340s ***** test 340s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 340s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 340s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 340s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 340s eps ("single")) 340s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 340s eps ("single")) 340s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 340s eps ("single")) 340s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 340s eps ("single")) 340s ***** error hygecdf () 340s ***** error hygecdf (1) 340s ***** error hygecdf (1,2) 340s ***** error hygecdf (1,2,3) 340s ***** error hygecdf (1,2,3,4,5) 340s ***** error hygecdf (1,2,3,4,"uper") 340s ***** error ... 340s hygecdf (ones (2), ones (3), 1, 1) 340s ***** error ... 340s hygecdf (1, ones (2), ones (3), 1) 340s ***** error ... 340s hygecdf (1, 1, ones (2), ones (3)) 340s ***** error hygecdf (i, 2, 2, 2) 340s ***** error hygecdf (2, i, 2, 2) 340s ***** error hygecdf (2, 2, i, 2) 340s ***** error hygecdf (2, 2, 2, i) 340s 32 tests, 32 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/loglpdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/loglpdf.m 340s ***** demo 340s ## Plot various PDFs from the log-logistic distribution 340s x = 0.001:0.001:2; 340s y1 = loglpdf (x, log (1), 1/0.5); 340s y2 = loglpdf (x, log (1), 1); 340s y3 = loglpdf (x, log (1), 1/2); 340s y4 = loglpdf (x, log (1), 1/4); 340s y5 = loglpdf (x, log (1), 1/8); 340s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 340s grid on 340s ylim ([0,3]) 340s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 340s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 340s title ("Log-logistic PDF") 340s xlabel ("values in x") 340s ylabel ("density") 340s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 340s ***** shared out1, out2 340s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 340s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 340s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 340s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 340s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 340s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 340s ***** assert (class (loglpdf (1, single (2), 3)), "single") 340s ***** assert (class (loglpdf (1, 2, single (3))), "single") 340s ***** error loglpdf (1) 340s ***** error loglpdf (1, 2) 340s ***** error ... 340s loglpdf (1, ones (2), ones (3)) 340s ***** error ... 340s loglpdf (ones (2), 1, ones (3)) 340s ***** error ... 340s loglpdf (ones (2), ones (3), 1) 340s ***** error loglpdf (i, 2, 3) 340s ***** error loglpdf (1, i, 3) 340s ***** error loglpdf (1, 2, i) 340s 14 tests, 14 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/cauchycdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/cauchycdf.m 340s ***** demo 340s ## Plot various CDFs from the Cauchy distribution 340s x = -5:0.01:5; 340s p1 = cauchycdf (x, 0, 0.5); 340s p2 = cauchycdf (x, 0, 1); 340s p3 = cauchycdf (x, 0, 2); 340s p4 = cauchycdf (x, -2, 1); 340s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 340s grid on 340s xlim ([-5, 5]) 340s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 340s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 340s title ("Cauchy CDF") 340s xlabel ("values in x") 340s ylabel ("probability") 340s ***** shared x, y 340s x = [-1 0 0.5 1 2]; 340s y = 1/pi * atan ((x-1) / 2) + 1/2; 340s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 340s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 340s ***** assert (cauchycdf (x, ones (1,5), 2), y) 340s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 340s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 340s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 340s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 340s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 340s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 340s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 340s ***** error cauchycdf () 340s ***** error cauchycdf (1) 340s ***** error ... 340s cauchycdf (1, 2) 340s ***** error ... 340s cauchycdf (1, 2, 3, 4, 5) 340s ***** error cauchycdf (1, 2, 3, "tail") 340s ***** error cauchycdf (1, 2, 3, 4) 340s ***** error ... 340s cauchycdf (ones (3), ones (2), ones (2)) 340s ***** error ... 340s cauchycdf (ones (2), ones (3), ones (2)) 340s ***** error ... 340s cauchycdf (ones (2), ones (2), ones (3)) 340s ***** error cauchycdf (i, 2, 2) 340s ***** error cauchycdf (2, i, 2) 340s ***** error cauchycdf (2, 2, i) 340s 22 tests, 22 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/poisscdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/poisscdf.m 340s ***** demo 340s ## Plot various CDFs from the Poisson distribution 340s x = 0:20; 340s p1 = poisscdf (x, 1); 340s p2 = poisscdf (x, 4); 340s p3 = poisscdf (x, 10); 340s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 340s grid on 340s ylim ([0, 1]) 340s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 340s title ("Poisson CDF") 340s xlabel ("values in x (number of occurences)") 340s ylabel ("probability") 340s ***** shared x, y 340s x = [-1 0 1 2 Inf]; 340s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 340s ***** assert (poisscdf (x, ones (1,5)), y) 340s ***** assert (poisscdf (x, 1), y) 340s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 340s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 340s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 340s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 340s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 340s ***** error poisscdf () 340s ***** error poisscdf (1) 340s ***** error poisscdf (1, 2, 3) 340s ***** error poisscdf (1, 2, "tail") 340s ***** error ... 340s poisscdf (ones (3), ones (2)) 340s ***** error ... 340s poisscdf (ones (2), ones (3)) 340s ***** error poisscdf (i, 2) 340s ***** error poisscdf (2, i) 340s 15 tests, 15 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/fpdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/fpdf.m 340s ***** demo 340s ## Plot various PDFs from the F distribution 340s x = 0.01:0.01:4; 340s y1 = fpdf (x, 1, 1); 340s y2 = fpdf (x, 2, 1); 340s y3 = fpdf (x, 5, 2); 340s y4 = fpdf (x, 10, 1); 340s y5 = fpdf (x, 100, 100); 340s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 340s grid on 340s ylim ([0, 2.5]) 340s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 340s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 340s "df1 = 100, df2 = 100"}, "location", "northeast") 340s title ("F PDF") 340s xlabel ("values in x") 340s ylabel ("density") 340s ***** shared x, y 340s x = [-1 0 0.5 1 2]; 340s y = [0 0 4/9 1/4 1/9]; 340s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 340s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 340s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 340s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 340s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 340s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 340s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 340s rand ("seed", 1234); # for reproducibility 340s xr = rand (10,1); 340s xr = xr(x > 0.1 & x < 0.9); 340s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 340s assert (fpdf (xr, 1, 2), yr, 5*eps); 340s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 340s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 340s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 340s ***** error fpdf () 340s ***** error fpdf (1) 340s ***** error fpdf (1,2) 340s ***** error ... 340s fpdf (ones (3), ones (2), ones (2)) 340s ***** error ... 340s fpdf (ones (2), ones (3), ones (2)) 340s ***** error ... 340s fpdf (ones (2), ones (2), ones (3)) 340s ***** error fpdf (i, 2, 2) 340s ***** error fpdf (2, i, 2) 340s ***** error fpdf (2, 2, i) 340s 19 tests, 19 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/wishrnd.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wishrnd.m 340s ***** assert(size (wishrnd (1,2)), [1, 1]); 340s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 340s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 340s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 340s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 340s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 340s ***** error wishrnd () 340s ***** error wishrnd (1) 340s ***** error wishrnd ([1; 1], 2) 340s 9 tests, 9 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/evpdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/evpdf.m 340s ***** demo 340s ## Plot various PDFs from the Extreme value distribution 340s x = -10:0.001:10; 340s y1 = evpdf (x, 0.5, 2); 340s y2 = evpdf (x, 1.0, 2); 340s y3 = evpdf (x, 1.5, 3); 340s y4 = evpdf (x, 3.0, 4); 340s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 340s grid on 340s ylim ([0, 0.2]) 340s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 340s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 340s title ("Extreme value PDF") 340s xlabel ("values in x") 340s ylabel ("density") 340s ***** shared x, y0, y1 340s x = [-5, 0, 1, 2, 3]; 340s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 340s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 340s ***** assert (evpdf (x), y0, 1e-4) 340s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 340s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 340s ***** error evpdf () 340s ***** error ... 340s evpdf (ones (3), ones (2), ones (2)) 340s ***** error evpdf (i, 2, 2) 340s ***** error evpdf (2, i, 2) 340s ***** error evpdf (2, 2, i) 340s 8 tests, 8 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/unifinv.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unifinv.m 340s ***** demo 340s ## Plot various iCDFs from the continuous uniform distribution 340s p = 0.001:0.001:0.999; 340s x1 = unifinv (p, 2, 5); 340s x2 = unifinv (p, 3, 9); 340s plot (p, x1, "-b", p, x2, "-g") 340s grid on 340s xlim ([0, 1]) 340s ylim ([0, 10]) 340s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 340s title ("Continuous uniform iCDF") 340s xlabel ("probability") 340s ylabel ("values in x") 340s ***** shared p 340s p = [-1 0 0.5 1 2]; 340s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 340s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 340s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 340s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 340s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 340s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 340s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 340s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 340s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 340s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 340s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 340s ***** error unifinv () 340s ***** error unifinv (1, 2) 340s ***** error ... 340s unifinv (ones (3), ones (2), ones (2)) 340s ***** error ... 340s unifinv (ones (2), ones (3), ones (2)) 340s ***** error ... 340s unifinv (ones (2), ones (2), ones (3)) 340s ***** error unifinv (i, 2, 2) 340s ***** error unifinv (2, i, 2) 340s ***** error unifinv (2, 2, i) 340s 19 tests, 19 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/laplaceinv.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/laplaceinv.m 340s ***** demo 340s ## Plot various iCDFs from the Laplace distribution 340s p = 0.001:0.001:0.999; 340s x1 = cauchyinv (p, 0, 1); 340s x2 = cauchyinv (p, 0, 2); 340s x3 = cauchyinv (p, 0, 4); 340s x4 = cauchyinv (p, -5, 4); 340s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 340s grid on 340s ylim ([-10, 10]) 340s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 340s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 340s title ("Laplace iCDF") 340s xlabel ("probability") 340s ylabel ("values in x") 340s ***** shared p, x 340s p = [-1 0 0.5 1 2]; 340s x = [NaN, -Inf, 0, Inf, NaN]; 340s ***** assert (laplaceinv (p, 0, 1), x) 340s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 340s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 340s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 340s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 340s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 340s ***** error laplaceinv () 340s ***** error laplaceinv (1) 340s ***** error ... 340s laplaceinv (1, 2) 340s ***** error laplaceinv (1, 2, 3, 4) 340s ***** error ... 340s laplaceinv (1, ones (2), ones (3)) 340s ***** error ... 340s laplaceinv (ones (2), 1, ones (3)) 340s ***** error ... 340s laplaceinv (ones (2), ones (3), 1) 340s ***** error laplaceinv (i, 2, 3) 340s ***** error laplaceinv (1, i, 3) 340s ***** error laplaceinv (1, 2, i) 340s 16 tests, 16 passed, 0 known failure, 0 skipped 340s [inst/dist_fun/hygepdf.m] 340s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hygepdf.m 340s ***** demo 340s ## Plot various PDFs from the hypergeometric distribution 340s x = 0:60; 340s y1 = hygepdf (x, 500, 50, 100); 340s y2 = hygepdf (x, 500, 60, 200); 340s y3 = hygepdf (x, 500, 70, 300); 340s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 340s grid on 340s xlim ([0, 60]) 340s ylim ([0, 0.18]) 340s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 340s "m = 500, k = 70, μ = 300"}, "location", "northeast") 340s title ("Hypergeometric PDF") 340s xlabel ("values in x (number of successes)") 340s ylabel ("density") 340s ***** shared x, y 340s x = [-1 0 1 2 3]; 340s y = [0 1/6 4/6 1/6 0]; 340s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 340s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 340s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 340s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 340s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 340s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 340s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 341s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 341s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 341s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 341s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 341s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 341s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 341s ***** test 341s z = zeros(3,5); 341s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 341s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 341s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 341s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 341s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 341s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 341s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 341s ***** error hygepdf () 341s ***** error hygepdf (1) 341s ***** error hygepdf (1,2) 341s ***** error hygepdf (1,2,3) 341s ***** error ... 341s hygepdf (1, ones (3), ones (2), ones (2)) 341s ***** error ... 341s hygepdf (1, ones (2), ones (3), ones (2)) 341s ***** error ... 341s hygepdf (1, ones (2), ones (2), ones (3)) 341s ***** error hygepdf (i, 2, 2, 2) 341s ***** error hygepdf (2, i, 2, 2) 341s ***** error hygepdf (2, 2, i, 2) 341s ***** error hygepdf (2, 2, 2, i) 341s 25 tests, 25 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/burrinv.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/burrinv.m 341s ***** demo 341s ## Plot various iCDFs from the Burr type XII distribution 341s p = 0.001:0.001:0.999; 341s x1 = burrinv (p, 1, 1, 1); 341s x2 = burrinv (p, 1, 1, 2); 341s x3 = burrinv (p, 1, 1, 3); 341s x4 = burrinv (p, 1, 2, 1); 341s x5 = burrinv (p, 1, 3, 1); 341s x6 = burrinv (p, 1, 0.5, 2); 341s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 341s p, x4, "-c", p, x5, "-m", p, x6, "-k") 341s grid on 341s ylim ([0, 5]) 341s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 341s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 341s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 341s "location", "northwest") 341s title ("Burr type XII iCDF") 341s xlabel ("probability") 341s ylabel ("values in x") 341s ***** shared p, y 341s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 341s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 341s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 341s ***** assert (burrinv (p, 1, 1, 1), y, eps) 341s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 341s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 341s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 341s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 341s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 341s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 341s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 341s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 341s ***** error burrinv () 341s ***** error burrinv (1) 341s ***** error burrinv (1, 2) 341s ***** error burrinv (1, 2, 3) 341s ***** error ... 341s burrinv (1, 2, 3, 4, 5) 341s ***** error ... 341s burrinv (ones (3), ones (2), ones(2), ones(2)) 341s ***** error ... 341s burrinv (ones (2), ones (3), ones(2), ones(2)) 341s ***** error ... 341s burrinv (ones (2), ones (2), ones(3), ones(2)) 341s ***** error ... 341s burrinv (ones (2), ones (2), ones(2), ones(3)) 341s ***** error burrinv (i, 2, 3, 4) 341s ***** error burrinv (1, i, 3, 4) 341s ***** error burrinv (1, 2, i, 4) 341s ***** error burrinv (1, 2, 3, i) 341s 23 tests, 23 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/gevpdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gevpdf.m 341s ***** demo 341s ## Plot various PDFs from the generalized extreme value distribution 341s x = -1:0.001:10; 341s y1 = gevpdf (x, 1, 1, 1); 341s y2 = gevpdf (x, 0.5, 1, 1); 341s y3 = gevpdf (x, 1, 1, 5); 341s y4 = gevpdf (x, 1, 2, 5); 341s y5 = gevpdf (x, 1, 5, 5); 341s y6 = gevpdf (x, 1, 0.5, 5); 341s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 341s x, y4, "-c", x, y5, "-m", x, y6, "-k") 341s grid on 341s xlim ([-1, 10]) 341s ylim ([0, 1.1]) 341s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 341s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 341s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 341s "location", "northeast") 341s title ("Generalized extreme value PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** test 341s x = 0:0.5:2.5; 341s sigma = 1:6; 341s k = 1; 341s mu = 0; 341s y = gevpdf (x, k, sigma, mu); 341s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 341s assert (y, expected_y, 0.001); 341s ***** test 341s x = -0.5:0.5:2.5; 341s sigma = 0.5; 341s k = 1; 341s mu = 0; 341s y = gevpdf (x, k, sigma, mu); 341s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 341s assert (y, expected_y, 0.001); 341s ***** test # check for continuity for k near 0 341s x = 1; 341s sigma = 0.5; 341s k = -0.03:0.01:0.03; 341s mu = 0; 341s y = gevpdf (x, k, sigma, mu); 341s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 341s assert (y, expected_y, 0.001); 341s ***** error gevpdf () 341s ***** error gevpdf (1) 341s ***** error gevpdf (1, 2) 341s ***** error gevpdf (1, 2, 3) 341s ***** error ... 341s gevpdf (ones (3), ones (2), ones(2), ones(2)) 341s ***** error ... 341s gevpdf (ones (2), ones (3), ones(2), ones(2)) 341s ***** error ... 341s gevpdf (ones (2), ones (2), ones(3), ones(2)) 341s ***** error ... 341s gevpdf (ones (2), ones (2), ones(2), ones(3)) 341s ***** error gevpdf (i, 2, 3, 4) 341s ***** error gevpdf (1, i, 3, 4) 341s ***** error gevpdf (1, 2, i, 4) 341s ***** error gevpdf (1, 2, 3, i) 341s 15 tests, 15 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/tlsinv.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tlsinv.m 341s ***** demo 341s ## Plot various iCDFs from the location-scale Student's T distribution 341s p = 0.001:0.001:0.999; 341s x1 = tlsinv (p, 0, 1, 1); 341s x2 = tlsinv (p, 0, 2, 2); 341s x3 = tlsinv (p, 3, 2, 5); 341s x4 = tlsinv (p, -1, 3, Inf); 341s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 341s grid on 341s xlim ([0, 1]) 341s ylim ([-8, 8]) 341s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 341s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 341s "location", "southeast") 341s title ("Location-scale Student's T iCDF") 341s xlabel ("probability") 341s ylabel ("values in x") 341s ***** shared p 341s p = [-1 0 0.5 1 2]; 341s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 341s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 341s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 341s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 341s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 341s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 341s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 341s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 341s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 341s ***** error tlsinv () 341s ***** error tlsinv (1) 341s ***** error tlsinv (1, 2) 341s ***** error tlsinv (1, 2, 3) 341s ***** error ... 341s tlsinv (ones (3), ones (2), 1, 1) 341s ***** error ... 341s tlsinv (ones (2), 1, ones (3), 1) 341s ***** error ... 341s tlsinv (ones (2), 1, 1, ones (3)) 341s ***** error tlsinv (i, 2, 3, 4) 341s ***** error tlsinv (2, i, 3, 4) 341s ***** error tlsinv (2, 2, i, 4) 341s ***** error tlsinv (2, 2, 3, i) 341s 20 tests, 20 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/exppdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/exppdf.m 341s ***** demo 341s ## Plot various PDFs from the exponential distribution 341s x = 0:0.01:5; 341s y1 = exppdf (x, 2/3); 341s y2 = exppdf (x, 1.0); 341s y3 = exppdf (x, 2.0); 341s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 341s grid on 341s ylim ([0, 1.5]) 341s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 341s title ("Exponential PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** shared x,y 341s x = [-1 0 0.5 1 Inf]; 341s y = gampdf (x, 1, 2); 341s ***** assert (exppdf (x, 2*ones (1,5)), y) 341s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 341s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 341s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 341s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 341s ***** error exppdf () 341s ***** error exppdf (1,2,3) 341s ***** error ... 341s exppdf (ones (3), ones (2)) 341s ***** error ... 341s exppdf (ones (2), ones (3)) 341s ***** error exppdf (i, 2) 341s ***** error exppdf (2, i) 341s 11 tests, 11 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/burrpdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/burrpdf.m 341s ***** demo 341s ## Plot various PDFs from the Burr type XII distribution 341s x = 0.001:0.001:3; 341s y1 = burrpdf (x, 1, 1, 1); 341s y2 = burrpdf (x, 1, 1, 2); 341s y3 = burrpdf (x, 1, 1, 3); 341s y4 = burrpdf (x, 1, 2, 1); 341s y5 = burrpdf (x, 1, 3, 1); 341s y6 = burrpdf (x, 1, 0.5, 2); 341s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 341s x, y4, "-c", x, y5, "-m", x, y6, "-k") 341s grid on 341s ylim ([0, 2]) 341s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 341s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 341s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 341s "location", "northeast") 341s title ("Burr type XII PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** shared x, y 341s x = [-1, 0, 1, 2, Inf]; 341s y = [0, 1, 1/4, 1/9, 0]; 341s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 341s ***** assert (burrpdf (x, 1, 1, 1), y) 341s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 341s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 341s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 341s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 341s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 341s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 341s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 341s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 341s ***** error burrpdf () 341s ***** error burrpdf (1) 341s ***** error burrpdf (1, 2) 341s ***** error burrpdf (1, 2, 3) 341s ***** error ... 341s burrpdf (1, 2, 3, 4, 5) 341s ***** error ... 341s burrpdf (ones (3), ones (2), ones(2), ones(2)) 341s ***** error ... 341s burrpdf (ones (2), ones (3), ones(2), ones(2)) 341s ***** error ... 341s burrpdf (ones (2), ones (2), ones(3), ones(2)) 341s ***** error ... 341s burrpdf (ones (2), ones (2), ones(2), ones(3)) 341s ***** error burrpdf (i, 2, 3, 4) 341s ***** error burrpdf (1, i, 3, 4) 341s ***** error burrpdf (1, 2, i, 4) 341s ***** error burrpdf (1, 2, 3, i) 341s 23 tests, 23 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/invgrnd.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/invgrnd.m 341s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 341s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 341s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 341s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 341s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 341s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 341s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 341s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 341s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 341s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 341s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 341s ***** test 341s r = invgrnd (1, [1, 0, -1]); 341s assert (r([2:3]), [NaN, NaN]) 341s ***** assert (class (invgrnd (1, 0)), "double") 341s ***** assert (class (invgrnd (1, single (0))), "single") 341s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 341s ***** assert (class (invgrnd (1, single (1))), "single") 341s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 341s ***** assert (class (invgrnd (single (1), 1)), "single") 341s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 341s ***** error invgrnd () 341s ***** error invgrnd (1) 341s ***** error ... 341s invgrnd (ones (3), ones (2)) 341s ***** error ... 341s invgrnd (ones (2), ones (3)) 341s ***** error invgrnd (i, 2, 3) 341s ***** error invgrnd (1, i, 3) 341s ***** error ... 341s invgrnd (1, 2, -1) 341s ***** error ... 341s invgrnd (1, 2, 1.2) 341s ***** error ... 341s invgrnd (1, 2, ones (2)) 341s ***** error ... 341s invgrnd (1, 2, [2 -1 2]) 341s ***** error ... 341s invgrnd (1, 2, [2 0 2.5]) 341s ***** error ... 341s invgrnd (1, 2, 2, -1, 5) 341s ***** error ... 341s invgrnd (1, 2, 2, 1.5, 5) 341s ***** error ... 341s invgrnd (2, ones (2), 3) 341s ***** error ... 341s invgrnd (2, ones (2), [3, 2]) 341s ***** error ... 341s invgrnd (2, ones (2), 3, 2) 341s 35 tests, 35 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/gumbelpdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gumbelpdf.m 341s ***** demo 341s ## Plot various PDFs from the Extreme value distribution 341s x = -5:0.001:20; 341s y1 = gumbelpdf (x, 0.5, 2); 341s y2 = gumbelpdf (x, 1.0, 2); 341s y3 = gumbelpdf (x, 1.5, 3); 341s y4 = gumbelpdf (x, 3.0, 4); 341s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 341s grid on 341s ylim ([0, 0.2]) 341s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 341s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 341s title ("Extreme value PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** shared x, y0, y1 341s x = [-5, 0, 1, 2, 3]; 341s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 341s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 341s ***** assert (gumbelpdf (x), y0, 1e-4) 341s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 341s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 341s ***** error gumbelpdf () 341s ***** error ... 341s gumbelpdf (ones (3), ones (2), ones (2)) 341s ***** error gumbelpdf (i, 2, 2) 341s ***** error gumbelpdf (2, i, 2) 341s ***** error gumbelpdf (2, 2, i) 341s 8 tests, 8 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/plcdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/plcdf.m 341s ***** demo 341s ## Plot various CDFs from the Piecewise linear distribution 341s data = 0:0.01:10; 341s x1 = [0, 1, 3, 4, 7, 10]; 341s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 341s x2 = [0, 2, 5, 6, 7, 8]; 341s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 341s p1 = plcdf (data, x1, Fx1); 341s p2 = plcdf (data, x2, Fx2); 341s plot (data, p1, "-b", data, p2, "g") 341s grid on 341s ylim ([0, 1]) 341s xlim ([0, 10]) 341s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 341s title ("Piecewise linear CDF") 341s xlabel ("values in data") 341s ylabel ("probability") 341s ***** test 341s data = 0:0.2:1; 341s p = plcdf (data, [0, 1], [0, 1]); 341s assert (p, data); 341s ***** test 341s data = 0:0.2:1; 341s p = plcdf (data, [0, 2], [0, 1]); 341s assert (p, 0.5 * data); 341s ***** test 341s data = 0:0.2:1; 341s p = plcdf (data, [0, 1], [0, 0.5]); 341s assert (p, 0.5 * data); 341s ***** test 341s data = 0:0.2:1; 341s p = plcdf (data, [0, 0.5], [0, 1]); 341s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 341s ***** test 341s data = 0:0.2:1; 341s p = plcdf (data, [0, 1], [0, 1], "upper"); 341s assert (p, 1 - data); 341s ***** error plcdf () 341s ***** error plcdf (1) 341s ***** error plcdf (1, 2) 341s ***** error plcdf (1, 2, 3, "uper") 341s ***** error plcdf (1, 2, 3, 4) 341s ***** error ... 341s plcdf (1, [0, 1, 2], [0, 1]) 341s ***** error ... 341s plcdf (1, [0], [1]) 341s ***** error ... 341s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 341s ***** error ... 341s plcdf (1, [0, 1, 2], [0, i, 1]) 341s ***** error ... 341s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 341s ***** error ... 341s plcdf (1, [0, i, 2], [0, 0.5, 1]) 341s ***** error ... 341s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 341s 17 tests, 17 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/loglrnd.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/loglrnd.m 341s ***** assert (size (loglrnd (1, 1)), [1 1]) 341s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 341s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 341s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 341s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 341s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 341s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 341s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 341s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 341s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 341s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 341s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 341s ***** assert (class (loglrnd (1, 1)), "double") 341s ***** assert (class (loglrnd (1, single (1))), "single") 341s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 341s ***** assert (class (loglrnd (single (1), 1)), "single") 341s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 341s ***** error loglrnd () 341s ***** error loglrnd (1) 341s ***** error ... 341s loglrnd (ones (3), ones (2)) 341s ***** error ... 341s loglrnd (ones (2), ones (3)) 341s ***** error loglrnd (i, 2, 3) 341s ***** error loglrnd (1, i, 3) 341s ***** error ... 341s loglrnd (1, 2, -1) 341s ***** error ... 341s loglrnd (1, 2, 1.2) 341s ***** error ... 341s loglrnd (1, 2, ones (2)) 341s ***** error ... 341s loglrnd (1, 2, [2 -1 2]) 341s ***** error ... 341s loglrnd (1, 2, [2 0 2.5]) 341s ***** error ... 341s loglrnd (1, 2, 2, -1, 5) 341s ***** error ... 341s loglrnd (1, 2, 2, 1.5, 5) 341s ***** error ... 341s loglrnd (2, ones (2), 3) 341s ***** error ... 341s loglrnd (2, ones (2), [3, 2]) 341s ***** error ... 341s loglrnd (2, ones (2), 3, 2) 341s 33 tests, 33 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/vmrnd.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/vmrnd.m 341s ***** assert (size (vmrnd (1, 1)), [1 1]) 341s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 341s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 341s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 341s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 341s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 341s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 341s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 341s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 341s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 341s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 341s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 341s ***** assert (class (vmrnd (1, 1)), "double") 341s ***** assert (class (vmrnd (1, single (1))), "single") 341s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 341s ***** assert (class (vmrnd (single (1), 1)), "single") 341s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 341s ***** error vmrnd () 341s ***** error vmrnd (1) 341s ***** error ... 341s vmrnd (ones (3), ones (2)) 341s ***** error ... 341s vmrnd (ones (2), ones (3)) 341s ***** error vmrnd (i, 2, 3) 341s ***** error vmrnd (1, i, 3) 341s ***** error ... 341s vmrnd (1, 2, -1) 341s ***** error ... 341s vmrnd (1, 2, 1.2) 341s ***** error ... 341s vmrnd (1, 2, ones (2)) 341s ***** error ... 341s vmrnd (1, 2, [2 -1 2]) 341s ***** error ... 341s vmrnd (1, 2, [2 0 2.5]) 341s ***** error ... 341s vmrnd (1, 2, 2, -1, 5) 341s ***** error ... 341s vmrnd (1, 2, 2, 1.5, 5) 341s ***** error ... 341s vmrnd (2, ones (2), 3) 341s ***** error ... 341s vmrnd (2, ones (2), [3, 2]) 341s ***** error ... 341s vmrnd (2, ones (2), 3, 2) 341s 33 tests, 33 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/wblcdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wblcdf.m 341s ***** demo 341s ## Plot various CDFs from the Weibull distribution 341s x = 0:0.001:2.5; 341s p1 = wblcdf (x, 1, 0.5); 341s p2 = wblcdf (x, 1, 1); 341s p3 = wblcdf (x, 1, 1.5); 341s p4 = wblcdf (x, 1, 5); 341s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 341s grid on 341s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 341s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 341s title ("Weibull CDF") 341s xlabel ("values in x") 341s ylabel ("probability") 341s ***** shared x, y 341s x = [-1 0 0.5 1 Inf]; 341s y = [0, 1-exp(-x(2:4)), 1]; 341s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 341s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 341s ***** assert (wblcdf (x, "upper"), 1 - y) 341s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 341s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 341s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 341s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 341s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 341s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 341s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 341s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 341s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 341s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 341s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 341s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 341s ***** error wblcdf () 341s ***** error wblcdf (1,2,3,4,5,6,7) 341s ***** error wblcdf (1, 2, 3, 4, "uper") 341s ***** error ... 341s wblcdf (ones (3), ones (2), ones (2)) 341s ***** error wblcdf (2, 3, 4, [1, 2]) 341s ***** error ... 341s [p, plo, pup] = wblcdf (1, 2, 3) 341s ***** error [p, plo, pup] = ... 341s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 341s ***** error [p, plo, pup] = ... 341s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 341s ***** error [p, plo, pup] = ... 341s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 341s ***** error wblcdf (i, 2, 2) 341s ***** error wblcdf (2, i, 2) 341s ***** error wblcdf (2, 2, i) 341s ***** error ... 341s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 341s 28 tests, 28 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/gampdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gampdf.m 341s ***** demo 341s ## Plot various PDFs from the Gamma distribution 341s x = 0:0.01:20; 341s y1 = gampdf (x, 1, 2); 341s y2 = gampdf (x, 2, 2); 341s y3 = gampdf (x, 3, 2); 341s y4 = gampdf (x, 5, 1); 341s y5 = gampdf (x, 9, 0.5); 341s y6 = gampdf (x, 7.5, 1); 341s y7 = gampdf (x, 0.5, 1); 341s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 341s x, y5, "-k", x, y6, "-b", x, y7, "-c") 341s grid on 341s ylim ([0,0.5]) 341s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 341s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 341s "α = 0.5, β = 1"}, "location", "northeast") 341s title ("Gamma PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** shared x, y 341s x = [-1 0 0.5 1 Inf]; 341s y = [0 exp(-x(2:end))]; 341s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 341s ***** assert (gampdf (x, 1, ones (1,5)), y) 341s ***** assert (gampdf (x, ones (1,5), 1), y) 341s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 341s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 341s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 341s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 341s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 341s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 341s ***** error gampdf () 341s ***** error gampdf (1) 341s ***** error gampdf (1,2) 341s ***** error ... 341s gampdf (ones (3), ones (2), ones (2)) 341s ***** error ... 341s gampdf (ones (2), ones (3), ones (2)) 341s ***** error ... 341s gampdf (ones (2), ones (2), ones (3)) 341s ***** error gampdf (i, 2, 2) 341s ***** error gampdf (2, i, 2) 341s ***** error gampdf (2, 2, i) 341s 18 tests, 18 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/mvtpdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvtpdf.m 341s ***** demo 341s ## Compute the pdf of a multivariate t distribution with correlation 341s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 341s 341s rho = [1, 0.4; 0.4, 1]; 341s df = 2; 341s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 341s X = [X1(:), X2(:)]; 341s y = mvtpdf (X, rho, df); 341s surf (X1, X2, reshape (y, 25, 25)); 341s title ("Bivariate Student's t probability density function"); 341s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 341s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 341s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 341s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 341s [0.04713313 0.03722421 0.02069011]', 1E-7) 341s 3 tests, 3 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/wblpdf.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wblpdf.m 341s ***** demo 341s ## Plot various PDFs from the Weibul distribution 341s x = 0:0.001:2.5; 341s y1 = wblpdf (x, 1, 0.5); 341s y2 = wblpdf (x, 1, 1); 341s y3 = wblpdf (x, 1, 1.5); 341s y4 = wblpdf (x, 1, 5); 341s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 341s grid on 341s ylim ([0, 2.5]) 341s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 341s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 341s title ("Weibul PDF") 341s xlabel ("values in x") 341s ylabel ("density") 341s ***** shared x,y 341s x = [-1 0 0.5 1 Inf]; 341s y = [0, exp(-x(2:4)), NaN]; 341s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 341s ***** assert (wblpdf (x, 1, ones (1,5)), y) 341s ***** assert (wblpdf (x, ones (1,5), 1), y) 341s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 341s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 341s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 341s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 341s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 341s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 341s ***** error wblpdf () 341s ***** error wblpdf (1,2,3,4) 341s ***** error wblpdf (ones (3), ones (2), ones (2)) 341s ***** error wblpdf (ones (2), ones (3), ones (2)) 341s ***** error wblpdf (ones (2), ones (2), ones (3)) 341s ***** error wblpdf (i, 2, 2) 341s ***** error wblpdf (2, i, 2) 341s ***** error wblpdf (2, 2, i) 341s 17 tests, 17 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/mvtcdfqmc.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvtcdfqmc.m 341s ***** error mvtcdfqmc (1, 2, 3); 341s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 341s 2 tests, 2 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/exprnd.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/exprnd.m 341s ***** assert (size (exprnd (2)), [1, 1]) 341s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 341s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 341s ***** assert (size (exprnd (1, 3)), [3, 3]) 341s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 341s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 341s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 341s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 341s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 341s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 341s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 341s ***** assert (class (exprnd (2)), "double") 341s ***** assert (class (exprnd (single (2))), "single") 341s ***** assert (class (exprnd (single ([2 2]))), "single") 341s ***** error exprnd () 341s ***** error exprnd (i) 341s ***** error ... 341s exprnd (1, -1) 341s ***** error ... 341s exprnd (1, 1.2) 341s ***** error ... 341s exprnd (1, ones (2)) 341s ***** error ... 341s exprnd (1, [2 -1 2]) 341s ***** error ... 341s exprnd (1, [2 0 2.5]) 341s ***** error ... 341s exprnd (ones (2), ones (2)) 341s ***** error ... 341s exprnd (1, 2, -1, 5) 341s ***** error ... 341s exprnd (1, 2, 1.5, 5) 341s ***** error exprnd (ones (2,2), 3) 341s ***** error exprnd (ones (2,2), [3, 2]) 341s ***** error exprnd (ones (2,2), 2, 3) 341s 27 tests, 27 passed, 0 known failure, 0 skipped 341s [inst/dist_fun/evrnd.m] 341s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/evrnd.m 341s ***** assert (size (evrnd (1, 1)), [1 1]) 341s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 341s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 341s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 341s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 341s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 341s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 341s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 341s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 341s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 341s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 341s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 341s ***** assert (class (evrnd (1, 1)), "double") 341s ***** assert (class (evrnd (1, single (1))), "single") 341s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 341s ***** assert (class (evrnd (single (1), 1)), "single") 341s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 341s ***** error evrnd () 341s ***** error evrnd (1) 341s ***** error ... 341s evrnd (ones (3), ones (2)) 341s ***** error ... 341s evrnd (ones (2), ones (3)) 341s ***** error evrnd (i, 2, 3) 341s ***** error evrnd (1, i, 3) 341s ***** error ... 341s evrnd (1, 2, -1) 341s ***** error ... 341s evrnd (1, 2, 1.2) 341s ***** error ... 341s evrnd (1, 2, ones (2)) 341s ***** error ... 341s evrnd (1, 2, [2 -1 2]) 342s ***** error ... 342s evrnd (1, 2, [2 0 2.5]) 342s ***** error ... 342s evrnd (1, 2, 2, -1, 5) 342s ***** error ... 342s evrnd (1, 2, 2, 1.5, 5) 342s ***** error ... 342s evrnd (2, ones (2), 3) 342s ***** error ... 342s evrnd (2, ones (2), [3, 2]) 342s ***** error ... 342s evrnd (2, ones (2), 3, 2) 342s 33 tests, 33 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/burrrnd.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/burrrnd.m 342s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 342s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 342s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 342s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 342s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 342s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 342s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 342s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 342s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 342s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 342s ***** assert (class (burrrnd (1,1,1)), "double") 342s ***** assert (class (burrrnd (single (1),1,1)), "single") 342s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 342s ***** assert (class (burrrnd (1,single (1),1)), "single") 342s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 342s ***** assert (class (burrrnd (1,1,single (1))), "single") 342s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 342s ***** error burrrnd () 342s ***** error burrrnd (1) 342s ***** error burrrnd (1, 2) 342s ***** error ... 342s burrrnd (ones (3), ones (2), ones (2)) 342s ***** error ... 342s burrrnd (ones (2), ones (3), ones (2)) 342s ***** error ... 342s burrrnd (ones (2), ones (2), ones (3)) 342s ***** error burrrnd (i, 2, 3) 342s ***** error burrrnd (1, i, 3) 342s ***** error burrrnd (1, 2, i) 342s ***** error ... 342s burrrnd (1, 2, 3, -1) 342s ***** error ... 342s burrrnd (1, 2, 3, 1.2) 342s ***** error ... 342s burrrnd (1, 2, 3, ones (2)) 342s ***** error ... 342s burrrnd (1, 2, 3, [2 -1 2]) 342s ***** error ... 342s burrrnd (1, 2, 3, [2 0 2.5]) 342s ***** error ... 342s burrrnd (1, 2, 3, 2, -1, 5) 342s ***** error ... 342s burrrnd (1, 2, 3, 2, 1.5, 5) 342s ***** error ... 342s burrrnd (2, ones (2), 2, 3) 342s ***** error ... 342s burrrnd (2, ones (2), 2, [3, 2]) 342s ***** error ... 342s burrrnd (2, ones (2), 2, 3, 2) 342s 36 tests, 36 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/unifcdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unifcdf.m 342s ***** demo 342s ## Plot various CDFs from the continuous uniform distribution 342s x = 0:0.1:10; 342s p1 = unifcdf (x, 2, 5); 342s p2 = unifcdf (x, 3, 9); 342s plot (x, p1, "-b", x, p2, "-g") 342s grid on 342s xlim ([0, 10]) 342s ylim ([0, 1]) 342s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 342s title ("Continuous uniform CDF") 342s xlabel ("values in x") 342s ylabel ("probability") 342s ***** shared x, y 342s x = [-1 0 0.5 1 2] + 1; 342s y = [0 0 0.5 1 1]; 342s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 342s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 342s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 342s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 342s ***** assert (unifcdf (x, ones (1,5), 2), y) 342s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 342s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 342s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 342s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 342s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 342s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 342s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 342s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 342s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 342s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 342s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 342s ***** error unifcdf () 342s ***** error unifcdf (1) 342s ***** error unifcdf (1, 2) 342s ***** error unifcdf (1, 2, 3, 4) 342s ***** error unifcdf (1, 2, 3, "tail") 342s ***** error ... 342s unifcdf (ones (3), ones (2), ones (2)) 342s ***** error ... 342s unifcdf (ones (2), ones (3), ones (2)) 342s ***** error ... 342s unifcdf (ones (2), ones (2), ones (3)) 342s ***** error unifcdf (i, 2, 2) 342s ***** error unifcdf (2, i, 2) 342s ***** error unifcdf (2, 2, i) 342s 27 tests, 27 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/ncfrnd.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ncfrnd.m 342s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 342s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 342s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 342s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 342s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 342s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 342s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 342s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 342s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 342s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 342s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 342s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 342s ***** assert (class (ncfrnd (1, 1, 1)), "double") 342s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 342s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 342s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 342s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 342s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 342s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 342s ***** error ncfrnd () 342s ***** error ncfrnd (1) 342s ***** error ncfrnd (1, 2) 342s ***** error ... 342s ncfrnd (ones (3), ones (2), ones (2)) 342s ***** error ... 342s ncfrnd (ones (2), ones (3), ones (2)) 342s ***** error ... 342s ncfrnd (ones (2), ones (2), ones (3)) 342s ***** error ncfrnd (i, 2, 3) 342s ***** error ncfrnd (1, i, 3) 342s ***** error ncfrnd (1, 2, i) 342s ***** error ... 342s ncfrnd (1, 2, 3, -1) 342s ***** error ... 342s ncfrnd (1, 2, 3, 1.2) 342s ***** error ... 342s ncfrnd (1, 2, 3, ones (2)) 342s ***** error ... 342s ncfrnd (1, 2, 3, [2 -1 2]) 342s ***** error ... 342s ncfrnd (1, 2, 3, [2 0 2.5]) 342s ***** error ... 342s ncfrnd (1, 2, 3, 2, -1, 5) 342s ***** error ... 342s ncfrnd (1, 2, 3, 2, 1.5, 5) 342s ***** error ... 342s ncfrnd (2, ones (2), 2, 3) 342s ***** error ... 342s ncfrnd (2, ones (2), 2, [3, 2]) 342s ***** error ... 342s ncfrnd (2, ones (2), 2, 3, 2) 342s 38 tests, 38 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/nakacdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nakacdf.m 342s ***** demo 342s ## Plot various CDFs from the Nakagami distribution 342s x = 0:0.01:3; 342s p1 = nakacdf (x, 0.5, 1); 342s p2 = nakacdf (x, 1, 1); 342s p3 = nakacdf (x, 1, 2); 342s p4 = nakacdf (x, 1, 3); 342s p5 = nakacdf (x, 2, 1); 342s p6 = nakacdf (x, 2, 2); 342s p7 = nakacdf (x, 5, 1); 342s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 342s x, p5, "-k", x, p6, "-b", x, p7, "-c") 342s grid on 342s xlim ([0, 3]) 342s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 342s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 342s "μ = 5, ω = 1"}, "location", "southeast") 342s title ("Nakagami CDF") 342s xlabel ("values in x") 342s ylabel ("probability") 342s ***** shared x, y 342s x = [-1, 0, 1, 2, Inf]; 342s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 342s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 342s ***** assert (nakacdf (x, 1, 1), y, eps) 342s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 342s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 342s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 342s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 342s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 342s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 342s ***** error nakacdf () 342s ***** error nakacdf (1) 342s ***** error nakacdf (1, 2) 342s ***** error nakacdf (1, 2, 3, "tail") 342s ***** error nakacdf (1, 2, 3, 4) 342s ***** error ... 342s nakacdf (ones (3), ones (2), ones (2)) 342s ***** error ... 342s nakacdf (ones (2), ones (3), ones (2)) 342s ***** error ... 342s nakacdf (ones (2), ones (2), ones (3)) 342s ***** error nakacdf (i, 2, 2) 342s ***** error nakacdf (2, i, 2) 342s ***** error nakacdf (2, 2, i) 342s 19 tests, 19 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/hninv.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/hninv.m 342s ***** demo 342s ## Plot various iCDFs from the half-normal distribution 342s p = 0.001:0.001:0.999; 342s x1 = hninv (p, 0, 1); 342s x2 = hninv (p, 0, 2); 342s x3 = hninv (p, 0, 3); 342s x4 = hninv (p, 0, 5); 342s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 342s grid on 342s ylim ([0, 10]) 342s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 342s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 342s title ("Half-normal iCDF") 342s xlabel ("probability") 342s ylabel ("x") 342s ***** shared p, x 342s p = [0, 0.3829, 0.6827, 1]; 342s x = [0, 1/2, 1, Inf]; 342s ***** assert (hninv (p, 0, 1), x, 1e-4); 342s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 342s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 342s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 342s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 342s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 342s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 342s ***** error hninv (1) 342s ***** error hninv (1, 2) 342s ***** error ... 342s hninv (1, ones (2), ones (3)) 342s ***** error ... 342s hninv (ones (2), 1, ones (3)) 342s ***** error ... 342s hninv (ones (2), ones (3), 1) 342s ***** error hninv (i, 2, 3) 342s ***** error hninv (1, i, 3) 342s ***** error hninv (1, 2, i) 342s 15 tests, 15 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/bvtcdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bvtcdf.m 342s ***** test 342s x = [1, 2]; 342s rho = [1, 0.5; 0.5, 1]; 342s df = 4; 342s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 342s ***** test 342s x = [3, 2;2, 4;1, 5]; 342s rho = [1, 0.5; 0.5, 1]; 342s df = 4; 342s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 342s 2 tests, 2 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/nctrnd.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nctrnd.m 342s ***** assert (size (nctrnd (1, 1)), [1 1]) 342s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 342s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 342s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 342s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 342s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 342s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 342s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 342s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 342s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 342s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 342s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 342s ***** assert (class (nctrnd (1, 1)), "double") 342s ***** assert (class (nctrnd (1, single (1))), "single") 342s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 342s ***** assert (class (nctrnd (single (1), 1)), "single") 342s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 342s ***** error nctrnd () 342s ***** error nctrnd (1) 342s ***** error ... 342s nctrnd (ones (3), ones (2)) 342s ***** error ... 342s nctrnd (ones (2), ones (3)) 342s ***** error nctrnd (i, 2) 342s ***** error nctrnd (1, i) 342s ***** error ... 342s nctrnd (1, 2, -1) 342s ***** error ... 342s nctrnd (1, 2, 1.2) 342s ***** error ... 342s nctrnd (1, 2, ones (2)) 342s ***** error ... 342s nctrnd (1, 2, [2 -1 2]) 342s ***** error ... 342s nctrnd (1, 2, [2 0 2.5]) 342s ***** error ... 342s nctrnd (1, 2, 2, -1, 5) 342s ***** error ... 342s nctrnd (1, 2, 2, 1.5, 5) 342s ***** error ... 342s nctrnd (2, ones (2), 3) 342s ***** error ... 342s nctrnd (2, ones (2), [3, 2]) 342s ***** error ... 342s nctrnd (2, ones (2), 3, 2) 342s 33 tests, 33 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/betacdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/betacdf.m 342s ***** demo 342s ## Plot various CDFs from the Beta distribution 342s x = 0:0.005:1; 342s p1 = betacdf (x, 0.5, 0.5); 342s p2 = betacdf (x, 5, 1); 342s p3 = betacdf (x, 1, 3); 342s p4 = betacdf (x, 2, 2); 342s p5 = betacdf (x, 2, 5); 342s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 342s grid on 342s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 342s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 342s title ("Beta CDF") 342s xlabel ("values in x") 342s ylabel ("probability") 342s ***** shared x, y, x1, x2 342s x = [-1 0 0.5 1 2]; 342s y = [0 0 0.75 1 1]; 342s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 342s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 342s ***** assert (betacdf (x, ones (1, 5), 2), y) 342s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 342s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 342s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 342s x1 = [0.1:0.2:0.9]; 342s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 342s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 342s 1e-14); 342s x2 = [1, 2, 3]; 342s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 342s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 342s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 342s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 342s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 342s ***** error betacdf () 342s ***** error betacdf (1) 342s ***** error betacdf (1, 2) 342s ***** error betacdf (1, 2, 3, 4, 5) 342s ***** error betacdf (1, 2, 3, "tail") 342s ***** error betacdf (1, 2, 3, 4) 342s ***** error ... 342s betacdf (ones (3), ones (2), ones (2)) 342s ***** error ... 342s betacdf (ones (2), ones (3), ones (2)) 342s ***** error ... 342s betacdf (ones (2), ones (2), ones (3)) 342s ***** error betacdf (i, 2, 2) 342s ***** error betacdf (2, i, 2) 342s ***** error betacdf (2, 2, i) 342s 25 tests, 25 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/unidrnd.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unidrnd.m 342s ***** assert (size (unidrnd (2)), [1, 1]) 342s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 342s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 342s ***** assert (size (unidrnd (1, 3)), [3, 3]) 342s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 342s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 342s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 342s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 342s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 342s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 342s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 342s ***** assert (unidrnd (0, 1, 1), NaN) 342s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 342s ***** assert (class (unidrnd (2)), "double") 342s ***** assert (class (unidrnd (single (2))), "single") 342s ***** assert (class (unidrnd (single ([2 2]))), "single") 342s ***** error unidrnd () 342s ***** error unidrnd (i) 342s ***** error ... 342s unidrnd (1, -1) 342s ***** error ... 342s unidrnd (1, 1.2) 342s ***** error ... 342s unidrnd (1, ones (2)) 342s ***** error ... 342s unidrnd (1, [2 -1 2]) 342s ***** error ... 342s unidrnd (1, [2 0 2.5]) 342s ***** error ... 342s unidrnd (ones (2), ones (2)) 342s ***** error ... 342s unidrnd (1, 2, -1, 5) 342s ***** error ... 342s unidrnd (1, 2, 1.5, 5) 342s ***** error unidrnd (ones (2,2), 3) 342s ***** error unidrnd (ones (2,2), [3, 2]) 342s ***** error unidrnd (ones (2,2), 2, 3) 342s 29 tests, 29 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/mvtrnd.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/mvtrnd.m 342s ***** test 342s rho = [1, 0.5; 0.5, 1]; 342s df = 3; 342s n = 10; 342s r = mvtrnd (rho, df, n); 342s assert (size (r), [10, 2]); 342s ***** test 342s rho = [1, 0.5; 0.5, 1]; 342s df = [2; 3]; 342s n = 2; 342s r = mvtrnd (rho, df, 2); 342s assert (size (r), [2, 2]); 342s 2 tests, 2 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/expcdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/expcdf.m 342s ***** demo 342s ## Plot various CDFs from the exponential distribution 342s x = 0:0.01:5; 342s p1 = expcdf (x, 2/3); 342s p2 = expcdf (x, 1.0); 342s p3 = expcdf (x, 2.0); 342s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 342s grid on 342s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 342s title ("Exponential CDF") 342s xlabel ("values in x") 342s ylabel ("probability") 342s ***** shared x, p 342s x = [-1 0 0.5 1 Inf]; 342s p = [0, 1 - exp(-x(2:end)/2)]; 342s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 342s ***** assert (expcdf (x, 2), p, 1e-16) 342s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 342s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 342s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 342s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 342s ***** test 342s [p, plo, pup] = expcdf (1, 2, 3); 342s assert (p, 0.39346934028737, 1e-14); 342s assert (plo, 0.08751307220484, 1e-14); 342s assert (pup, 0.93476821257933, 1e-14); 342s ***** test 342s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 342s assert (p, 0.39346934028737, 1e-14); 342s assert (plo, 0.14466318041675, 1e-14); 342s assert (pup, 0.79808291849140, 1e-14); 342s ***** test 342s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 342s assert (p, 0.60653065971263, 1e-14); 342s assert (plo, 0.20191708150860, 1e-14); 342s assert (pup, 0.85533681958325, 1e-14); 342s ***** error expcdf () 342s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 342s ***** error expcdf (1, 2, 3, 4, "uper") 342s ***** error ... 342s expcdf (ones (3), ones (2)) 342s ***** error ... 342s expcdf (2, 3, [1, 2]) 342s ***** error ... 342s [p, plo, pup] = expcdf (1, 2) 342s ***** error [p, plo, pup] = ... 342s expcdf (1, 2, 3, 0) 342s ***** error [p, plo, pup] = ... 342s expcdf (1, 2, 3, 1.22) 342s ***** error [p, plo, pup] = ... 342s expcdf (1, 2, 3, "alpha", "upper") 342s ***** error expcdf (i, 2) 342s ***** error expcdf (2, i) 342s ***** error ... 342s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 342s 21 tests, 21 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/finv.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/finv.m 342s ***** demo 342s ## Plot various iCDFs from the F distribution 342s p = 0.001:0.001:0.999; 342s x1 = finv (p, 1, 1); 342s x2 = finv (p, 2, 1); 342s x3 = finv (p, 5, 2); 342s x4 = finv (p, 10, 1); 342s x5 = finv (p, 100, 100); 342s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 342s grid on 342s ylim ([0, 4]) 342s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 342s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 342s "df1 = 100, df2 = 100"}, "location", "northwest") 342s title ("F iCDF") 342s xlabel ("probability") 342s ylabel ("values in x") 342s ***** shared p 342s p = [-1 0 0.5 1 2]; 342s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 342s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 342s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 342s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 342s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 342s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 342s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 342s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 342s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 342s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 342s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 342s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 342s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 342s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 342s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 342s ***** error finv () 342s ***** error finv (1) 342s ***** error finv (1,2) 342s ***** error ... 342s finv (ones (3), ones (2), ones (2)) 342s ***** error ... 342s finv (ones (2), ones (3), ones (2)) 342s ***** error ... 342s finv (ones (2), ones (2), ones (3)) 342s ***** error finv (i, 2, 2) 342s ***** error finv (2, i, 2) 342s ***** error finv (2, 2, i) 342s 24 tests, 24 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/nbininv.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nbininv.m 342s ***** demo 342s ## Plot various iCDFs from the negative binomial distribution 342s p = 0.001:0.001:0.999; 342s x1 = nbininv (p, 2, 0.15); 342s x2 = nbininv (p, 5, 0.2); 342s x3 = nbininv (p, 4, 0.4); 342s x4 = nbininv (p, 10, 0.3); 342s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 342s grid on 342s ylim ([0, 40]) 342s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 342s "r = 10, ps = 0.3"}, "location", "northwest") 342s title ("Negative binomial iCDF") 342s xlabel ("probability") 342s ylabel ("values in x (number of failures)") 342s ***** shared p 342s p = [-1 0 3/4 1 2]; 342s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 342s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 342s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 342s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 342s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 342s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 342s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 342s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 342s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 342s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 342s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 342s ***** shared y, tol 342s y = magic (3) + 1; 342s tol = 1; 342s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 342s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 342s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 342s ***** error nbininv () 342s ***** error nbininv (1) 342s ***** error nbininv (1, 2) 342s ***** error ... 342s nbininv (ones (3), ones (2), ones (2)) 342s ***** error ... 342s nbininv (ones (2), ones (3), ones (2)) 342s ***** error ... 342s nbininv (ones (2), ones (2), ones (3)) 342s ***** error nbininv (i, 2, 2) 342s ***** error nbininv (2, i, 2) 342s ***** error nbininv (2, 2, i) 342s 23 tests, 23 passed, 0 known failure, 0 skipped 342s [inst/dist_fun/iwishpdf.m] 342s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/iwishpdf.m 342s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 342s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 342s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 342s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 342s ***** error iwishpdf () 343s ***** error iwishpdf (1, 2) 343s ***** error iwishpdf (1, 2, 0) 343s 6 tests, 6 passed, 0 known failure, 0 skipped 343s [inst/dist_fun/bisacdf.m] 343s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/bisacdf.m 343s ***** demo 343s ## Plot various CDFs from the Birnbaum-Saunders distribution 343s x = 0.01:0.01:4; 343s p1 = bisacdf (x, 1, 0.5); 343s p2 = bisacdf (x, 1, 1); 343s p3 = bisacdf (x, 1, 2); 343s p4 = bisacdf (x, 1, 5); 343s p5 = bisacdf (x, 1, 10); 343s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 343s grid on 343s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 343s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 343s title ("Birnbaum-Saunders CDF") 343s xlabel ("values in x") 343s ylabel ("probability") 343s ***** demo 343s ## Plot various CDFs from the Birnbaum-Saunders distribution 343s x = 0.01:0.01:6; 343s p1 = bisacdf (x, 1, 0.3); 343s p2 = bisacdf (x, 2, 0.3); 343s p3 = bisacdf (x, 1, 0.5); 343s p4 = bisacdf (x, 3, 0.5); 343s p5 = bisacdf (x, 5, 0.5); 343s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 343s grid on 343s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 343s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 343s title ("Birnbaum-Saunders CDF") 343s xlabel ("values in x") 343s ylabel ("probability") 343s ***** shared x, y 343s x = [-1, 0, 1, 2, Inf]; 343s y = [0, 0, 1/2, 0.76024993890652337, 1]; 343s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 343s ***** assert (bisacdf (x, 1, 1), y, eps) 343s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 343s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 343s ***** assert (bisacdf (x, 1, 1), y, eps) 343s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 343s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 343s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 343s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 343s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 343s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 343s ***** error bisacdf () 343s ***** error bisacdf (1) 343s ***** error bisacdf (1, 2) 343s ***** error ... 343s bisacdf (1, 2, 3, 4, 5) 343s ***** error bisacdf (1, 2, 3, "tail") 343s ***** error bisacdf (1, 2, 3, 4) 343s ***** error ... 343s bisacdf (ones (3), ones (2), ones(2)) 343s ***** error ... 343s bisacdf (ones (2), ones (3), ones(2)) 343s ***** error ... 343s bisacdf (ones (2), ones (2), ones(3)) 343s ***** error bisacdf (i, 4, 3) 343s ***** error bisacdf (1, i, 3) 343s ***** error bisacdf (1, 4, i) 343s 23 tests, 23 passed, 0 known failure, 0 skipped 343s [inst/dist_fun/nctinv.m] 343s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nctinv.m 343s ***** demo 343s ## Plot various iCDFs from the noncentral T distribution 343s p = 0.001:0.001:0.999; 343s x1 = nctinv (p, 1, 0); 343s x2 = nctinv (p, 4, 0); 343s x3 = nctinv (p, 1, 2); 343s x4 = nctinv (p, 4, 2); 343s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 343s grid on 343s ylim ([-5, 5]) 343s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 343s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 343s title ("Noncentral T iCDF") 343s xlabel ("probability") 343s ylabel ("values in x") 343s ***** demo 343s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 343s ## with the same number of degrees of freedom (10). 343s 343s p = 0.001:0.001:0.999; 343s x1 = nctinv (p, 10, 1); 343s x2 = tinv (p, 10); 343s plot (p, x1, "-", p, x2, "-"); 343s grid on 343s ylim ([-5, 5]) 343s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 343s title ("Noncentral T vs T quantile functions") 343s xlabel ("probability") 343s ylabel ("values in x") 343s ***** test 343s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 343s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 343s ***** test 343s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 343s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 344s ***** test 344s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 344s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 344s ***** test 344s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 344s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 345s ***** test 345s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 345s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 346s ***** test 346s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 346s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 347s ***** test 347s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 348s ***** error nctinv () 348s ***** error nctinv (1) 348s ***** error nctinv (1, 2) 348s ***** error ... 348s nctinv (ones (3), ones (2), ones (2)) 348s ***** error ... 348s nctinv (ones (2), ones (3), ones (2)) 348s ***** error ... 348s nctinv (ones (2), ones (2), ones (3)) 348s ***** error nctinv (i, 2, 2) 348s ***** error nctinv (2, i, 2) 348s ***** error nctinv (2, 2, i) 348s 16 tests, 16 passed, 0 known failure, 0 skipped 348s [inst/dist_fun/wishpdf.m] 348s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/wishpdf.m 348s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 348s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 348s ***** 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); 348s ***** error wishpdf () 348s ***** error wishpdf (1, 2) 348s ***** error wishpdf (1, 2, 0) 348s ***** error wishpdf (1, 2) 349s 7 tests, 7 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/jsupdf.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/jsupdf.m 349s ***** error jsupdf () 349s ***** error jsupdf (1, 2, 3, 4) 349s ***** error ... 349s jsupdf (1, ones (2), ones (3)) 349s 3 tests, 3 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/binopdf.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/binopdf.m 349s ***** demo 349s ## Plot various PDFs from the binomial distribution 349s x = 0:40; 349s y1 = binopdf (x, 20, 0.5); 349s y2 = binopdf (x, 20, 0.7); 349s y3 = binopdf (x, 40, 0.5); 349s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 349s grid on 349s ylim ([0, 0.25]) 349s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 349s "n = 40, ps = 0.5"}, "location", "northeast") 349s title ("Binomial PDF") 349s xlabel ("values in x (number of successes)") 349s ylabel ("density") 349s ***** shared x, y 349s x = [-1 0 1 2 3]; 349s y = [0 1/4 1/2 1/4 0]; 349s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 349s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 349s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 349s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 349s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 349s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 349s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 349s ***** assert (binopdf (1, 1, 1), 1) 349s ***** assert (binopdf (0, 3, 0), 1) 349s ***** assert (binopdf (2, 2, 1), 1) 349s ***** assert (binopdf (1, 2, 1), 0) 349s ***** assert (binopdf (0, 1.1, 0), NaN) 349s ***** assert (binopdf (1, 2, -1), NaN) 349s ***** assert (binopdf (1, 2, 1.5), NaN) 349s ***** assert (binopdf ([], 1, 1), []) 349s ***** assert (binopdf (1, [], 1), []) 349s ***** assert (binopdf (1, 1, []), []) 349s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 349s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 349s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 349s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 349s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 349s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 349s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 349s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 349s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 349s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 349s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 349s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 349s ***** error binopdf () 349s ***** error binopdf (1) 349s ***** error binopdf (1, 2) 349s ***** error binopdf (1, 2, 3, 4) 349s ***** error ... 349s binopdf (ones (3), ones (2), ones (2)) 349s ***** error ... 349s binopdf (ones (2), ones (3), ones (2)) 349s ***** error ... 349s binopdf (ones (2), ones (2), ones (3)) 349s ***** error binopdf (i, 2, 2) 349s ***** error binopdf (2, i, 2) 349s ***** error binopdf (2, 2, i) 349s 39 tests, 39 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/tpdf.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tpdf.m 349s ***** demo 349s ## Plot various PDFs from the Student's T distribution 349s x = -5:0.01:5; 349s y1 = tpdf (x, 1); 349s y2 = tpdf (x, 2); 349s y3 = tpdf (x, 5); 349s y4 = tpdf (x, Inf); 349s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 349s grid on 349s xlim ([-5, 5]) 349s ylim ([0, 0.41]) 349s legend ({"df = 1", "df = 2", ... 349s "df = 5", 'df = \infty'}, "location", "northeast") 349s title ("Student's T PDF") 349s xlabel ("values in x") 349s ylabel ("density") 349s ***** test 349s x = rand (10,1); 349s y = 1./(pi * (1 + x.^2)); 349s assert (tpdf (x, 1), y, 5*eps); 349s ***** shared x, y 349s x = [-Inf 0 0.5 1 Inf]; 349s y = 1./(pi * (1 + x.^2)); 349s ***** assert (tpdf (x, ones (1,5)), y, eps) 349s ***** assert (tpdf (x, 1), y, eps) 349s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 349s ***** assert (tpdf (x, Inf), normpdf (x)) 349s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 349s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 349s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 349s ***** error tpdf () 349s ***** error tpdf (1) 349s ***** error ... 349s tpdf (ones (3), ones (2)) 349s ***** error ... 349s tpdf (ones (2), ones (3)) 349s ***** error tpdf (i, 2) 349s ***** error tpdf (2, i) 349s 14 tests, 14 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/unidpdf.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unidpdf.m 349s ***** demo 349s ## Plot various PDFs from the discrete uniform distribution 349s x = 0:10; 349s y1 = unidpdf (x, 5); 349s y2 = unidpdf (x, 9); 349s plot (x, y1, "*b", x, y2, "*g") 349s grid on 349s xlim ([0, 10]) 349s ylim ([0, 0.25]) 349s legend ({"N = 5", "N = 9"}, "location", "northeast") 349s title ("Descrete uniform PDF") 349s xlabel ("values in x") 349s ylabel ("density") 349s ***** shared x, y 349s x = [-1 0 1 2 10 11]; 349s y = [0 0 0.1 0.1 0.1 0]; 349s ***** assert (unidpdf (x, 10*ones (1,6)), y) 349s ***** assert (unidpdf (x, 10), y) 349s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 349s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 349s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 349s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 349s ***** error unidpdf () 349s ***** error unidpdf (1) 349s ***** error ... 349s unidpdf (ones (3), ones (2)) 349s ***** error ... 349s unidpdf (ones (2), ones (3)) 349s ***** error unidpdf (i, 2) 349s ***** error unidpdf (2, i) 349s 12 tests, 12 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/gamcdf.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gamcdf.m 349s ***** demo 349s ## Plot various CDFs from the Gamma distribution 349s x = 0:0.01:20; 349s p1 = gamcdf (x, 1, 2); 349s p2 = gamcdf (x, 2, 2); 349s p3 = gamcdf (x, 3, 2); 349s p4 = gamcdf (x, 5, 1); 349s p5 = gamcdf (x, 9, 0.5); 349s p6 = gamcdf (x, 7.5, 1); 349s p7 = gamcdf (x, 0.5, 1); 349s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 349s x, p5, "-k", x, p6, "-b", x, p7, "-c") 349s grid on 349s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 349s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 349s "α = 0.5, β = 1"}, "location", "southeast") 349s title ("Gamma CDF") 349s xlabel ("values in x") 349s ylabel ("probability") 349s ***** shared x, y, u 349s x = [-1, 0, 0.5, 1, 2, Inf]; 349s y = [0, gammainc(x(2:end), 1)]; 349s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 349s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 349s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 349s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 349s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 349s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 349s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 349s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 349s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 349s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 349s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 349s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 349s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 349s ***** error gamcdf () 349s ***** error gamcdf (1) 349s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 349s ***** error gamcdf (1, 2, 3, "uper") 349s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 349s ***** error gamcdf (2, 3, 4, [1, 2]) 349s ***** error ... 349s [p, plo, pup] = gamcdf (1, 2, 3) 349s ***** error ... 349s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 349s ***** error [p, plo, pup] = ... 349s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 349s ***** error [p, plo, pup] = ... 349s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 349s ***** error [p, plo, pup] = ... 349s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 349s ***** error ... 349s gamcdf (ones (3), ones (2), ones (2)) 349s ***** error ... 349s gamcdf (ones (2), ones (3), ones (2)) 349s ***** error ... 349s gamcdf (ones (2), ones (2), ones (3)) 349s ***** error gamcdf (i, 2, 2) 349s ***** error gamcdf (2, i, 2) 349s ***** error gamcdf (2, 2, i) 349s ***** error ... 349s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 349s 30 tests, 30 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/ricernd.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/ricernd.m 349s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 349s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 349s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 349s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 349s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 349s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 349s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 349s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 349s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 349s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 349s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 349s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 349s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 349s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 349s ***** assert (class (ricernd (1, 1)), "double") 349s ***** assert (class (ricernd (1, single (0))), "single") 349s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 349s ***** assert (class (ricernd (1, single (1), 2)), "single") 349s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 349s ***** assert (class (ricernd (single (1), 1, 2)), "single") 349s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 349s ***** error ricernd () 349s ***** error ricernd (1) 349s ***** error ... 349s ricernd (ones (3), ones (2)) 349s ***** error ... 349s ricernd (ones (2), ones (3)) 349s ***** error ricernd (i, 2) 349s ***** error ricernd (1, i) 349s ***** error ... 349s ricernd (1, 1/2, -1) 349s ***** error ... 349s ricernd (1, 1/2, 1.2) 349s ***** error ... 349s ricernd (1, 1/2, ones (2)) 349s ***** error ... 349s ricernd (1, 1/2, [2 -1 2]) 349s ***** error ... 349s ricernd (1, 1/2, [2 0 2.5]) 349s ***** error ... 349s ricernd (1, 1/2, 2, -1, 5) 349s ***** error ... 349s ricernd (1, 1/2, 2, 1.5, 5) 349s ***** error ... 349s ricernd (2, 1/2 * ones (2), 3) 349s ***** error ... 349s ricernd (2, 1/2 * ones (2), [3, 2]) 349s ***** error ... 349s ricernd (2, 1/2 * ones (2), 3, 2) 349s ***** error ... 349s ricernd (2 * ones (2), 1/2, 3) 349s ***** error ... 349s ricernd (2 * ones (2), 1/2, [3, 2]) 349s ***** error ... 349s ricernd (2 * ones (2), 1/2, 3, 2) 349s 40 tests, 40 passed, 0 known failure, 0 skipped 349s [inst/dist_fun/vminv.m] 349s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/vminv.m 349s ***** demo 349s ## Plot various iCDFs from the von Mises distribution 349s 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]; 349s x1 = vminv (p1, 0, 0.5); 349s x2 = vminv (p1, 0, 1); 349s x3 = vminv (p1, 0, 2); 349s x4 = vminv (p1, 0, 4); 349s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 349s grid on 349s ylim ([-pi, pi]) 349s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 349s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 349s title ("Von Mises iCDF") 349s xlabel ("probability") 349s ylabel ("values in x") 349s ***** shared x, p0, p1 349s x = [-pi:pi/2:pi]; 349s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 349s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 349s ***** assert (vminv (p0, 0, 1), x, 5e-5) 349s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 350s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 350s ***** error vminv () 350s ***** error vminv (1) 350s ***** error vminv (1, 2) 350s ***** error ... 350s vminv (ones (3), ones (2), ones (2)) 350s ***** error ... 350s vminv (ones (2), ones (3), ones (2)) 350s ***** error ... 350s vminv (ones (2), ones (2), ones (3)) 350s ***** error vminv (i, 2, 2) 350s ***** error vminv (2, i, 2) 350s ***** error vminv (2, 2, i) 350s 12 tests, 12 passed, 0 known failure, 0 skipped 350s [inst/dist_fun/geornd.m] 350s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/geornd.m 350s ***** assert (size (geornd (0.5)), [1, 1]) 350s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 350s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 350s ***** assert (size (geornd (0.5, 3)), [3, 3]) 350s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 350s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 350s ***** assert (class (geornd (0.5)), "double") 350s ***** assert (class (geornd (single (0.5))), "single") 350s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 350s ***** assert (class (geornd (single (0))), "single") 350s ***** assert (class (geornd (single (1))), "single") 350s ***** error geornd () 350s ***** error geornd (i) 350s ***** error ... 350s geornd (1, -1) 350s ***** error ... 350s geornd (1, 1.2) 350s ***** error ... 350s geornd (1, ones (2)) 350s ***** error ... 350s geornd (1, [2 -1 2]) 350s ***** error ... 350s geornd (1, [2 0 2.5]) 350s ***** error ... 350s geornd (ones (2), ones (2)) 350s ***** error ... 350s geornd (1, 2, -1, 5) 350s ***** error ... 350s geornd (1, 2, 1.5, 5) 350s ***** error geornd (ones (2,2), 3) 350s ***** error geornd (ones (2,2), [3, 2]) 350s ***** error geornd (ones (2,2), 2, 3) 350s 24 tests, 24 passed, 0 known failure, 0 skipped 350s [inst/dist_fun/fcdf.m] 350s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/fcdf.m 350s ***** demo 350s ## Plot various CDFs from the F distribution 350s x = 0.01:0.01:4; 350s p1 = fcdf (x, 1, 2); 350s p2 = fcdf (x, 2, 1); 350s p3 = fcdf (x, 5, 2); 350s p4 = fcdf (x, 10, 1); 350s p5 = fcdf (x, 100, 100); 350s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 350s grid on 350s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 350s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 350s "df1 = 100, df2 = 100"}, "location", "southeast") 350s title ("F CDF") 350s xlabel ("values in x") 350s ylabel ("probability") 350s ***** shared x, y 350s x = [-1, 0, 0.5, 1, 2, Inf]; 350s y = [0, 0, 1/3, 1/2, 2/3, 1]; 350s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 350s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 350s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 350s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 350s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 350s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 350s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 350s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 350s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 350s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 350s ***** error fcdf () 350s ***** error fcdf (1) 350s ***** error fcdf (1, 2) 350s ***** error fcdf (1, 2, 3, 4) 350s ***** error fcdf (1, 2, 3, "tail") 350s ***** error ... 350s fcdf (ones (3), ones (2), ones (2)) 350s ***** error ... 350s fcdf (ones (2), ones (3), ones (2)) 350s ***** error ... 350s fcdf (ones (2), ones (2), ones (3)) 350s ***** error fcdf (i, 2, 2) 350s ***** error fcdf (2, i, 2) 350s ***** error fcdf (2, 2, i) 350s 21 tests, 21 passed, 0 known failure, 0 skipped 350s [inst/dist_fun/unifrnd.m] 350s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/unifrnd.m 350s ***** assert (size (unifrnd (1, 1)), [1 1]) 350s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 350s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 350s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 350s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 350s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 350s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 350s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 350s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 350s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 350s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 350s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 351s ***** assert (class (unifrnd (1, 1)), "double") 351s ***** assert (class (unifrnd (1, single (1))), "single") 351s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 351s ***** assert (class (unifrnd (single (1), 1)), "single") 351s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 351s ***** error unifrnd () 351s ***** error unifrnd (1) 351s ***** error ... 351s unifrnd (ones (3), ones (2)) 351s ***** error ... 351s unifrnd (ones (2), ones (3)) 351s ***** error unifrnd (i, 2, 3) 351s ***** error unifrnd (1, i, 3) 351s ***** error ... 351s unifrnd (1, 2, -1) 351s ***** error ... 351s unifrnd (1, 2, 1.2) 351s ***** error ... 351s unifrnd (1, 2, ones (2)) 351s ***** error ... 351s unifrnd (1, 2, [2 -1 2]) 351s ***** error ... 351s unifrnd (1, 2, [2 0 2.5]) 351s ***** error ... 351s unifrnd (1, 2, 2, -1, 5) 351s ***** error ... 351s unifrnd (1, 2, 2, 1.5, 5) 351s ***** error ... 351s unifrnd (2, ones (2), 3) 351s ***** error ... 351s unifrnd (2, ones (2), [3, 2]) 351s ***** error ... 351s unifrnd (2, ones (2), 3, 2) 351s 33 tests, 33 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/binoinv.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/binoinv.m 351s ***** demo 351s ## Plot various iCDFs from the binomial distribution 351s p = 0.001:0.001:0.999; 351s x1 = binoinv (p, 20, 0.5); 351s x2 = binoinv (p, 20, 0.7); 351s x3 = binoinv (p, 40, 0.5); 351s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 351s grid on 351s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 351s "n = 40, ps = 0.5"}, "location", "southeast") 351s title ("Binomial iCDF") 351s xlabel ("probability") 351s ylabel ("values in x (number of successes)") 351s ***** shared p 351s p = [-1 0 0.5 1 2]; 351s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 351s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 351s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 351s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 351s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 351s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 351s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 351s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 351s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 351s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 351s ***** shared x, tol 351s x = magic (3) + 1; 351s tol = 1; 351s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 351s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 351s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 351s ***** error binoinv () 351s ***** error binoinv (1) 351s ***** error binoinv (1,2) 351s ***** error binoinv (1,2,3,4) 351s ***** error ... 351s binoinv (ones (3), ones (2), ones (2)) 351s ***** error ... 351s binoinv (ones (2), ones (3), ones (2)) 351s ***** error ... 351s binoinv (ones (2), ones (2), ones (3)) 351s ***** error binoinv (i, 2, 2) 351s ***** error binoinv (2, i, 2) 351s ***** error binoinv (2, 2, i) 351s 23 tests, 23 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/tcdf.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tcdf.m 351s ***** demo 351s ## Plot various CDFs from the Student's T distribution 351s x = -5:0.01:5; 351s p1 = tcdf (x, 1); 351s p2 = tcdf (x, 2); 351s p3 = tcdf (x, 5); 351s p4 = tcdf (x, Inf); 351s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 351s grid on 351s xlim ([-5, 5]) 351s ylim ([0, 1]) 351s legend ({"df = 1", "df = 2", ... 351s "df = 5", 'df = \infty'}, "location", "southeast") 351s title ("Student's T CDF") 351s xlabel ("values in x") 351s ylabel ("probability") 351s ***** shared x,y 351s x = [-Inf 0 1 Inf]; 351s y = [0 1/2 3/4 1]; 351s ***** assert (tcdf (x, ones (1,4)), y, eps) 351s ***** assert (tcdf (x, 1), y, eps) 351s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 351s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 351s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 351s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 351s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 351s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 351s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 351s ***** error tcdf () 351s ***** error tcdf (1) 351s ***** error tcdf (1, 2, "uper") 351s ***** error tcdf (1, 2, 3) 351s ***** error ... 351s tcdf (ones (3), ones (2)) 351s ***** error ... 351s tcdf (ones (3), ones (2)) 351s ***** error ... 351s tcdf (ones (3), ones (2), "upper") 351s ***** error tcdf (i, 2) 351s ***** error tcdf (2, i) 351s ***** shared tol_rel 351s tol_rel = 10 * eps; 351s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 351s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 351s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 351s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 351s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 351s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 351s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 351s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 351s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 351s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 351s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 351s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 351s 30 tests, 30 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/logicdf.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/logicdf.m 351s ***** demo 351s ## Plot various CDFs from the logistic distribution 351s x = -5:0.01:20; 351s p1 = logicdf (x, 5, 2); 351s p2 = logicdf (x, 9, 3); 351s p3 = logicdf (x, 9, 4); 351s p4 = logicdf (x, 6, 2); 351s p5 = logicdf (x, 2, 1); 351s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 351s grid on 351s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 351s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 351s title ("Logistic CDF") 351s xlabel ("values in x") 351s ylabel ("probability") 351s ***** shared x, y 351s x = [-Inf -log(3) 0 log(3) Inf]; 351s y = [0, 1/4, 1/2, 3/4, 1]; 351s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 351s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 351s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 351s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 351s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 351s ***** error logicdf () 351s ***** error logicdf (1) 351s ***** error ... 351s logicdf (1, 2) 351s ***** error logicdf (1, 2, 3, "tail") 351s ***** error logicdf (1, 2, 3, 4) 351s ***** error ... 351s logicdf (1, ones (2), ones (3)) 351s ***** error ... 351s logicdf (ones (2), 1, ones (3)) 351s ***** error ... 351s logicdf (ones (2), ones (3), 1) 351s ***** error logicdf (i, 2, 3) 351s ***** error logicdf (1, i, 3) 351s ***** error logicdf (1, 2, i) 351s 16 tests, 16 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/chi2rnd.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/chi2rnd.m 351s ***** assert (size (chi2rnd (2)), [1, 1]) 351s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 351s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 351s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 351s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 351s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 351s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 351s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 351s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 351s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 351s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 351s ***** assert (class (chi2rnd (2)), "double") 351s ***** assert (class (chi2rnd (single (2))), "single") 351s ***** assert (class (chi2rnd (single ([2 2]))), "single") 351s ***** error chi2rnd () 351s ***** error chi2rnd (i) 351s ***** error ... 351s chi2rnd (1, -1) 351s ***** error ... 351s chi2rnd (1, 1.2) 351s ***** error ... 351s chi2rnd (1, ones (2)) 351s ***** error ... 351s chi2rnd (1, [2 -1 2]) 351s ***** error ... 351s chi2rnd (1, [2 0 2.5]) 351s ***** error ... 351s chi2rnd (ones (2), ones (2)) 351s ***** error ... 351s chi2rnd (1, 2, -1, 5) 351s ***** error ... 351s chi2rnd (1, 2, 1.5, 5) 351s ***** error chi2rnd (ones (2,2), 3) 351s ***** error chi2rnd (ones (2,2), [3, 2]) 351s ***** error chi2rnd (ones (2,2), 2, 3) 351s 27 tests, 27 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/gpinv.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/gpinv.m 351s ***** demo 351s ## Plot various iCDFs from the generalized Pareto distribution 351s p = 0.001:0.001:0.999; 351s x1 = gpinv (p, 1, 1, 0); 351s x2 = gpinv (p, 5, 1, 0); 351s x3 = gpinv (p, 20, 1, 0); 351s x4 = gpinv (p, 1, 2, 0); 351s x5 = gpinv (p, 5, 2, 0); 351s x6 = gpinv (p, 20, 2, 0); 351s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 351s p, x4, "-c", p, x5, "-m", p, x6, "-k") 351s grid on 351s ylim ([0, 5]) 351s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 351s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 351s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 351s "location", "southeast") 351s title ("Generalized Pareto iCDF") 351s xlabel ("probability") 351s ylabel ("values in x") 351s ***** shared p, y1, y2, y3 351s p = [-1, 0, 1/2, 1, 2]; 351s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 351s y2 = [NaN, 0, 1, Inf, NaN]; 351s y3 = [NaN, 0, 1/2, 1, NaN]; 351s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 351s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 351s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 351s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 351s ***** assert (gpinv (p, 0, 1, 0), y1) 351s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 351s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 351s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 351s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 351s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 351s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 351s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 351s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 351s ***** assert (gpinv (p, 1, 1, 0), y2) 351s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 351s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 351s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 351s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 351s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 351s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 351s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 351s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 351s ***** assert (gpinv (p, -1, 1, 0), y3) 351s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 351s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 351s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 351s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 351s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 351s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 351s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 351s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 351s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 351s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 351s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 351s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 351s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 351s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 351s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 351s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 351s ***** error gpinv () 351s ***** error gpinv (1) 351s ***** error gpinv (1, 2) 351s ***** error gpinv (1, 2, 3) 351s ***** error ... 351s gpinv (ones (3), ones (2), ones(2), ones(2)) 351s ***** error ... 351s gpinv (ones (2), ones (3), ones(2), ones(2)) 351s ***** error ... 351s gpinv (ones (2), ones (2), ones(3), ones(2)) 351s ***** error ... 351s gpinv (ones (2), ones (2), ones(2), ones(3)) 351s ***** error gpinv (i, 2, 3, 4) 351s ***** error gpinv (1, i, 3, 4) 351s ***** error gpinv (1, 2, i, 4) 351s ***** error gpinv (1, 2, 3, i) 351s 51 tests, 51 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/nctpdf.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/nctpdf.m 351s ***** demo 351s ## Plot various PDFs from the noncentral T distribution 351s x = -5:0.01:10; 351s y1 = nctpdf (x, 1, 0); 351s y2 = nctpdf (x, 4, 0); 351s y3 = nctpdf (x, 1, 2); 351s y4 = nctpdf (x, 4, 2); 351s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 351s grid on 351s xlim ([-5, 10]) 351s ylim ([0, 0.4]) 351s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 351s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 351s title ("Noncentral T PDF") 351s xlabel ("values in x") 351s ylabel ("density") 351s ***** demo 351s ## Compare the noncentral T PDF with MU = 1 to the T PDF 351s ## with the same number of degrees of freedom (10). 351s 351s x = -5:0.1:5; 351s y1 = nctpdf (x, 10, 1); 351s y2 = tpdf (x, 10); 351s plot (x, y1, "-", x, y2, "-"); 351s grid on 351s xlim ([-5, 5]) 351s ylim ([0, 0.4]) 351s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 351s title ("Noncentral T vs T PDFs") 351s xlabel ("values in x") 351s ylabel ("density") 351s ***** shared x1, df, mu 351s x1 = [-Inf, 2, NaN, 4, Inf]; 351s df = [2, 0, -1, 1, 4]; 351s mu = [1, NaN, 3, -1, 2]; 351s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 351s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 351s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 351s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 351s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 351s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 351s 0.0146500727180389, 0.3082302682110299], 1e-14); 351s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 351s 0.00401787561306999, 0.0972086534042828], 1e-14); 351s ***** error nctpdf () 351s ***** error nctpdf (1) 351s ***** error nctpdf (1, 2) 351s ***** error ... 351s nctpdf (ones (3), ones (2), ones (2)) 351s ***** error ... 351s nctpdf (ones (2), ones (3), ones (2)) 351s ***** error ... 351s nctpdf (ones (2), ones (2), ones (3)) 351s ***** error nctpdf (i, 2, 2) 351s ***** error nctpdf (2, i, 2) 351s ***** error nctpdf (2, 2, i) 351s 16 tests, 16 passed, 0 known failure, 0 skipped 351s [inst/dist_fun/tricdf.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_fun/tricdf.m 351s ***** demo 351s ## Plot various CDFs from the triangular distribution 351s x = 0.001:0.001:10; 351s p1 = tricdf (x, 3, 4, 6); 351s p2 = tricdf (x, 1, 2, 5); 351s p3 = tricdf (x, 2, 3, 9); 351s p4 = tricdf (x, 2, 5, 9); 351s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 351s grid on 351s xlim ([0, 10]) 351s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 351s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 351s "location", "southeast") 351s title ("Triangular CDF") 351s xlabel ("values in x") 351s ylabel ("probability") 351s ***** shared x, y 351s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 351s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 351s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 351s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 351s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 351s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 351s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 351s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 351s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 351s [y(1:2), NaN, y(4:7)], eps) 351s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 351s [y(1:2), NaN, y(4:7)], eps) 351s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 351s [y(1:2), NaN, y(4:7)], eps) 351s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 351s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 351s single ([y, NaN]), eps("single")) 351s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 351s single ([y, NaN]), eps("single")) 351s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 351s single ([y, NaN]), eps("single")) 351s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 351s single ([y, NaN]), eps("single")) 351s ***** error tricdf () 351s ***** error tricdf (1) 351s ***** error tricdf (1, 2) 351s ***** error tricdf (1, 2, 3) 351s ***** error ... 351s tricdf (1, 2, 3, 4, 5, 6) 351s ***** error tricdf (1, 2, 3, 4, "tail") 351s ***** error tricdf (1, 2, 3, 4, 5) 351s ***** error ... 351s tricdf (ones (3), ones (2), ones(2), ones(2)) 351s ***** error ... 351s tricdf (ones (2), ones (3), ones(2), ones(2)) 351s ***** error ... 351s tricdf (ones (2), ones (2), ones(3), ones(2)) 351s ***** error ... 351s tricdf (ones (2), ones (2), ones(2), ones(3)) 351s ***** error tricdf (i, 2, 3, 4) 351s ***** error tricdf (1, i, 3, 4) 351s ***** error tricdf (1, 2, i, 4) 351s ***** error tricdf (1, 2, 3, i) 351s 29 tests, 29 passed, 0 known failure, 0 skipped 351s [inst/dist_obj/UniformDistribution.m] 351s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/UniformDistribution.m 351s ***** shared pd, t 351s pd = UniformDistribution (0, 5); 351s t = truncate (pd, 2, 4); 351s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 351s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 351s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 351s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 351s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 351s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 351s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 351s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 351s ***** assert (iqr (pd), 2.5, 1e-14); 351s ***** assert (iqr (t), 1, 1e-14); 351s ***** assert (mean (pd), 2.5, 1e-14); 351s ***** assert (mean (t), 3, 1e-14); 351s ***** assert (median (pd), 2.5, 1e-14); 351s ***** assert (median (t), 3, 1e-14); 351s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 351s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 351s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 351s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 351s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 351s ***** assert (any (random (t, 1000, 1) < 2), false); 351s ***** assert (any (random (t, 1000, 1) > 4), false); 351s ***** assert (std (pd), 1.4434, 1e-4); 351s ***** assert (std (t), 0.5774, 1e-4); 351s ***** assert (var (pd), 2.0833, 1e-4); 351s ***** assert (var (t), 0.3333, 1e-4); 352s ***** error ... 352s UniformDistribution (i, 1) 352s ***** error ... 352s UniformDistribution (Inf, 1) 352s ***** error ... 352s UniformDistribution ([1, 2], 1) 352s ***** error ... 352s UniformDistribution ("a", 1) 352s ***** error ... 352s UniformDistribution (NaN, 1) 352s ***** error ... 352s UniformDistribution (1, i) 352s ***** error ... 352s UniformDistribution (1, Inf) 352s ***** error ... 352s UniformDistribution (1, [1, 2]) 352s ***** error ... 352s UniformDistribution (1, "a") 352s ***** error ... 352s UniformDistribution (1, NaN) 352s ***** error ... 352s UniformDistribution (2, 1) 352s ***** error ... 352s cdf (UniformDistribution, 2, "uper") 352s ***** error ... 352s cdf (UniformDistribution, 2, 3) 352s ***** error ... 352s plot (UniformDistribution, "Parent") 352s ***** error ... 352s plot (UniformDistribution, "PlotType", 12) 352s ***** error ... 352s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 352s ***** error ... 352s plot (UniformDistribution, "PlotType", "pdfcdf") 352s ***** error ... 352s plot (UniformDistribution, "Discrete", "pdfcdf") 352s ***** error ... 352s plot (UniformDistribution, "Discrete", [1, 0]) 352s ***** error ... 352s plot (UniformDistribution, "Discrete", {true}) 352s ***** error ... 352s plot (UniformDistribution, "Parent", 12) 352s ***** error ... 352s plot (UniformDistribution, "Parent", "hax") 352s ***** error ... 352s plot (UniformDistribution, "invalidNAME", "pdf") 352s ***** error ... 352s plot (UniformDistribution, "PlotType", "probability") 352s ***** error ... 352s truncate (UniformDistribution) 352s ***** error ... 352s truncate (UniformDistribution, 2) 352s ***** error ... 352s truncate (UniformDistribution, 4, 2) 352s ***** shared pd 352s pd = UniformDistribution (0, 1); 352s pd(2) = UniformDistribution (0, 2); 352s ***** error cdf (pd, 1) 352s ***** error icdf (pd, 0.5) 352s ***** error iqr (pd) 352s ***** error mean (pd) 352s ***** error median (pd) 352s ***** error pdf (pd, 1) 352s ***** error plot (pd) 352s ***** error random (pd) 352s ***** error std (pd) 352s ***** error ... 352s truncate (pd, 2, 4) 352s ***** error var (pd) 352s 63 tests, 63 passed, 0 known failure, 0 skipped 352s [inst/dist_obj/InverseGaussianDistribution.m] 352s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/InverseGaussianDistribution.m 352s ***** shared pd, t 352s pd = InverseGaussianDistribution (1, 1); 352s t = truncate (pd, 2, 4); 352s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 352s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 352s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 352s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 352s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 352s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 352s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 352s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 352s ***** assert (iqr (pd), 0.8643, 1e-4); 352s ***** assert (iqr (t), 0.8222, 1e-4); 352s ***** assert (mean (pd), 1); 352s ***** assert (mean (t), 2.6953, 1e-4); 352s ***** assert (median (pd), 0.6758, 1e-4); 352s ***** assert (median (t), 2.5716, 1e-4); 352s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 352s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 352s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 352s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 352s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 352s ***** assert (any (random (t, 1000, 1) < 2), false); 352s ***** assert (any (random (t, 1000, 1) > 4), false); 352s ***** assert (std (pd), 1); 352s ***** assert (std (t), 0.5332, 1e-4); 352s ***** assert (var (pd), 1); 352s ***** assert (var (t), 0.2843, 1e-4); 352s ***** error ... 352s InverseGaussianDistribution(0, 1) 352s ***** error ... 352s InverseGaussianDistribution(Inf, 1) 352s ***** error ... 352s InverseGaussianDistribution(i, 1) 352s ***** error ... 352s InverseGaussianDistribution("a", 1) 352s ***** error ... 352s InverseGaussianDistribution([1, 2], 1) 352s ***** error ... 352s InverseGaussianDistribution(NaN, 1) 352s ***** error ... 352s InverseGaussianDistribution(1, 0) 352s ***** error ... 352s InverseGaussianDistribution(1, -1) 352s ***** error ... 352s InverseGaussianDistribution(1, Inf) 352s ***** error ... 352s InverseGaussianDistribution(1, i) 352s ***** error ... 352s InverseGaussianDistribution(1, "a") 352s ***** error ... 352s InverseGaussianDistribution(1, [1, 2]) 352s ***** error ... 352s InverseGaussianDistribution(1, NaN) 352s ***** error ... 352s cdf (InverseGaussianDistribution, 2, "uper") 352s ***** error ... 352s cdf (InverseGaussianDistribution, 2, 3) 352s ***** shared x 352s x = invgrnd (1, 1, [1, 100]); 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 352s "alpha", {0.05}) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), ... 352s "parameter", {"mu", "lambda", "param"}) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 352s "parameter", {"mu", "lambda", "param"}) 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 352s "parameter", "param") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 352s ***** error ... 352s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 352s "parameter", "mu", "NAME", "value") 352s ***** error ... 352s plot (InverseGaussianDistribution, "Parent") 352s ***** error ... 352s plot (InverseGaussianDistribution, "PlotType", 12) 352s ***** error ... 352s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 352s ***** error ... 352s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 352s ***** error ... 352s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 352s ***** error ... 352s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 352s ***** error ... 352s plot (InverseGaussianDistribution, "Discrete", {true}) 352s ***** error ... 352s plot (InverseGaussianDistribution, "Parent", 12) 352s ***** error ... 352s plot (InverseGaussianDistribution, "Parent", "hax") 352s ***** error ... 352s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 352s ***** error ... 352s plot (InverseGaussianDistribution, "PlotType", "probability") 352s ***** error ... 352s proflik (InverseGaussianDistribution, 2) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 3) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), {1}) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 352s ***** error ... 352s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 352s ***** error ... 352s truncate (InverseGaussianDistribution) 352s ***** error ... 352s truncate (InverseGaussianDistribution, 2) 352s ***** error ... 352s truncate (InverseGaussianDistribution, 4, 2) 352s ***** shared pd 352s pd = InverseGaussianDistribution(1, 1); 352s pd(2) = InverseGaussianDistribution(1, 3); 352s ***** error cdf (pd, 1) 352s ***** error icdf (pd, 0.5) 352s ***** error iqr (pd) 352s ***** error mean (pd) 352s ***** error median (pd) 352s ***** error negloglik (pd) 352s ***** error paramci (pd) 352s ***** error pdf (pd, 1) 352s ***** error plot (pd) 352s ***** error proflik (pd, 2) 352s ***** error random (pd) 352s ***** error std (pd) 352s ***** error ... 352s truncate (pd, 2, 4) 352s ***** error var (pd) 352s 96 tests, 96 passed, 0 known failure, 0 skipped 352s [inst/dist_obj/LoglogisticDistribution.m] 352s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/LoglogisticDistribution.m 352s ***** shared pd, t 352s pd = LoglogisticDistribution; 352s t = truncate (pd, 2, 4); 352s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 352s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 352s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 352s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 352s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 352s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 352s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 352s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 352s ***** assert (iqr (pd), 2.6667, 1e-4); 352s ***** assert (iqr (t), 0.9524, 1e-4); 352s ***** assert (mean (pd), Inf); 352s ***** assert (mean (t), 2.8312, 1e-4); 352s ***** assert (median (pd), 1, 1e-4); 352s ***** assert (median (t), 2.75, 1e-4); 352s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 352s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 352s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 352s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 352s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 352s ***** assert (any (random (t, 1000, 1) < 2), false); 352s ***** assert (any (random (t, 1000, 1) > 4), false); 352s ***** assert (std (pd), Inf); 352s ***** assert (std (t), 0.5674, 1e-4); 352s ***** assert (var (pd), Inf); 352s ***** assert (var (t), 0.3220, 1e-4); 352s ***** error ... 352s LoglogisticDistribution(Inf, 1) 352s ***** error ... 352s LoglogisticDistribution(i, 1) 352s ***** error ... 352s LoglogisticDistribution("a", 1) 352s ***** error ... 352s LoglogisticDistribution([1, 2], 1) 352s ***** error ... 352s LoglogisticDistribution(NaN, 1) 352s ***** error ... 352s LoglogisticDistribution(1, 0) 352s ***** error ... 352s LoglogisticDistribution(1, -1) 352s ***** error ... 352s LoglogisticDistribution(1, Inf) 352s ***** error ... 352s LoglogisticDistribution(1, i) 352s ***** error ... 352s LoglogisticDistribution(1, "a") 352s ***** error ... 352s LoglogisticDistribution(1, [1, 2]) 352s ***** error ... 352s LoglogisticDistribution(1, NaN) 352s ***** error ... 352s cdf (LoglogisticDistribution, 2, "uper") 352s ***** error ... 352s cdf (LoglogisticDistribution, 2, 3) 352s ***** shared x 352s x = loglrnd (1, 1, [1, 100]); 352s ***** error ... 352s paramci (LoglogisticDistribution.fit (x), "alpha") 352s ***** error ... 352s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 352s ***** error ... 352s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 352s ***** error ... 352s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 352s ***** error ... 352s paramci (LoglogisticDistribution.fit (x), "alpha", "") 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 353s "parameter", {"mu", "sigma", "param"}) 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 353s ***** error ... 353s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 353s "parameter", "mu", "NAME", "value") 353s ***** error ... 353s plot (LoglogisticDistribution, "Parent") 353s ***** error ... 353s plot (LoglogisticDistribution, "PlotType", 12) 353s ***** error ... 353s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 353s ***** error ... 353s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 353s ***** error ... 353s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 353s ***** error ... 353s plot (LoglogisticDistribution, "Discrete", [1, 0]) 353s ***** error ... 353s plot (LoglogisticDistribution, "Discrete", {true}) 353s ***** error ... 353s plot (LoglogisticDistribution, "Parent", 12) 353s ***** error ... 353s plot (LoglogisticDistribution, "Parent", "hax") 353s ***** error ... 353s plot (LoglogisticDistribution, "invalidNAME", "pdf") 353s ***** error ... 353s plot (LoglogisticDistribution, "PlotType", "probability") 353s ***** error ... 353s proflik (LoglogisticDistribution, 2) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 3) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), [1, 2]) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), {1}) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display") 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 353s ***** error ... 353s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 353s ***** error ... 353s truncate (LoglogisticDistribution) 353s ***** error ... 353s truncate (LoglogisticDistribution, 2) 353s ***** error ... 353s truncate (LoglogisticDistribution, 4, 2) 353s ***** shared pd 353s pd = LoglogisticDistribution(1, 1); 353s pd(2) = LoglogisticDistribution(1, 3); 353s ***** error cdf (pd, 1) 353s ***** error icdf (pd, 0.5) 353s ***** error iqr (pd) 353s ***** error mean (pd) 353s ***** error median (pd) 353s ***** error negloglik (pd) 353s ***** error paramci (pd) 353s ***** error pdf (pd, 1) 353s ***** error plot (pd) 353s ***** error proflik (pd, 2) 353s ***** error random (pd) 353s ***** error std (pd) 353s ***** error ... 353s truncate (pd, 2, 4) 353s ***** error var (pd) 353s 95 tests, 95 passed, 0 known failure, 0 skipped 353s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 353s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 353s ***** shared pd, t 353s pd = GeneralizedExtremeValueDistribution; 353s t = truncate (pd, 2, 4); 353s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 353s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 353s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 354s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 354s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 354s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 354s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 354s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 354s ***** assert (iqr (pd), 1.5725, 1e-4); 354s ***** assert (iqr (t), 0.8164, 1e-4); 354s ***** assert (mean (pd), 0.5772, 1e-4); 354s ***** assert (mean (t), 2.7043, 1e-4); 354s ***** assert (median (pd), 0.3665, 1e-4); 354s ***** assert (median (t), 2.5887, 1e-4); 354s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 354s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 354s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 354s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 354s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 354s ***** assert (any (random (t, 1000, 1) < 2), false); 354s ***** assert (any (random (t, 1000, 1) > 4), false); 354s ***** assert (std (pd), 1.2825, 1e-4); 354s ***** assert (std (t), 0.5289, 1e-4); 354s ***** assert (var (pd), 1.6449, 1e-4); 354s ***** assert (var (t), 0.2798, 1e-4); 354s ***** error ... 354s GeneralizedExtremeValueDistribution(Inf, 1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(i, 1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution("a", 1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(NaN, 1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 0, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, -1, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, Inf, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, i, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, "a", 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, NaN, 1) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 1, Inf) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 1, i) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 1, "a") 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 354s ***** error ... 354s GeneralizedExtremeValueDistribution(1, 1, NaN) 354s ***** error ... 354s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 354s ***** error ... 354s cdf (GeneralizedExtremeValueDistribution, 2, 3) 354s ***** shared x 354s x = gevrnd (1, 1, 1, [1, 100]); 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 354s "parameter", "sigma", "alpha", {0.05}) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 354s "parameter", {"k", "sigma", "mu", "param"}) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 354s "parameter", {"k", "sigma", "mu", "param"}) 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 354s ***** error ... 354s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 354s "parameter", "param") 355s ***** error ... 355s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 355s ***** error ... 355s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 355s "NAME", "value") 355s ***** error ... 355s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 355s "parameter", "sigma", "NAME", "value") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Parent") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 355s ***** error ... 355s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution, 2) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 355s ***** error ... 355s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 356s ***** error ... 356s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 356s "Display", ["on"; "on"]) 356s ***** error ... 356s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 356s ***** error ... 356s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 356s ***** error ... 356s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 356s ***** error ... 356s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 356s "Display", "on") 356s ***** error ... 356s truncate (GeneralizedExtremeValueDistribution) 356s ***** error ... 356s truncate (GeneralizedExtremeValueDistribution, 2) 356s ***** error ... 356s truncate (GeneralizedExtremeValueDistribution, 4, 2) 356s ***** shared pd 356s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 356s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 356s ***** error cdf (pd, 1) 356s ***** error icdf (pd, 0.5) 356s ***** error iqr (pd) 356s ***** error mean (pd) 356s ***** error median (pd) 356s ***** error negloglik (pd) 356s ***** error paramci (pd) 356s ***** error pdf (pd, 1) 356s ***** error plot (pd) 356s ***** error proflik (pd, 2) 356s ***** error random (pd) 356s ***** error std (pd) 356s ***** error ... 356s truncate (pd, 2, 4) 356s ***** error var (pd) 356s 100 tests, 100 passed, 0 known failure, 0 skipped 356s [inst/dist_obj/TriangularDistribution.m] 356s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/TriangularDistribution.m 356s ***** shared pd, t 356s pd = TriangularDistribution (0, 3, 5); 356s t = truncate (pd, 2, 4); 356s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 356s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 356s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 356s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 356s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 356s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 356s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 356s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 356s ***** assert (iqr (pd), 1.4824, 1e-4); 356s ***** assert (iqr (t), 0.8678, 1e-4); 356s ***** assert (mean (pd), 2.6667, 1e-4); 356s ***** assert (mean (t), 2.9649, 1e-4); 356s ***** assert (median (pd), 2.7386, 1e-4); 356s ***** assert (median (t), 2.9580, 1e-4); 356s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 356s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 356s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 356s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 356s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 356s ***** assert (any (random (t, 1000, 1) < 2), false); 356s ***** assert (any (random (t, 1000, 1) > 4), false); 356s ***** assert (std (pd), 1.0274, 1e-4); 356s ***** assert (std (t), 0.5369, 1e-4); 356s ***** assert (var (pd), 1.0556, 1e-4); 356s ***** assert (var (t), 0.2882, 1e-4); 356s ***** error ... 356s TriangularDistribution (i, 1, 2) 356s ***** error ... 356s TriangularDistribution (Inf, 1, 2) 356s ***** error ... 356s TriangularDistribution ([1, 2], 1, 2) 356s ***** error ... 356s TriangularDistribution ("a", 1, 2) 356s ***** error ... 356s TriangularDistribution (NaN, 1, 2) 356s ***** error ... 356s TriangularDistribution (1, i, 2) 356s ***** error ... 356s TriangularDistribution (1, Inf, 2) 356s ***** error ... 356s TriangularDistribution (1, [1, 2], 2) 356s ***** error ... 356s TriangularDistribution (1, "a", 2) 356s ***** error ... 356s TriangularDistribution (1, NaN, 2) 356s ***** error ... 356s TriangularDistribution (1, 2, i) 356s ***** error ... 356s TriangularDistribution (1, 2, Inf) 356s ***** error ... 356s TriangularDistribution (1, 2, [1, 2]) 356s ***** error ... 356s TriangularDistribution (1, 2, "a") 356s ***** error ... 356s TriangularDistribution (1, 2, NaN) 356s ***** error ... 356s TriangularDistribution (1, 1, 1) 356s ***** error ... 356s TriangularDistribution (1, 0.5, 2) 356s ***** error ... 356s cdf (TriangularDistribution, 2, "uper") 356s ***** error ... 356s cdf (TriangularDistribution, 2, 3) 356s ***** error ... 356s plot (TriangularDistribution, "Parent") 356s ***** error ... 356s plot (TriangularDistribution, "PlotType", 12) 356s ***** error ... 356s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 356s ***** error ... 356s plot (TriangularDistribution, "PlotType", "pdfcdf") 356s ***** error ... 356s plot (TriangularDistribution, "Discrete", "pdfcdf") 356s ***** error ... 356s plot (TriangularDistribution, "Discrete", [1, 0]) 356s ***** error ... 356s plot (TriangularDistribution, "Discrete", {true}) 356s ***** error ... 356s plot (TriangularDistribution, "Parent", 12) 356s ***** error ... 356s plot (TriangularDistribution, "Parent", "hax") 356s ***** error ... 356s plot (TriangularDistribution, "invalidNAME", "pdf") 356s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 356s plot (TriangularDistribution, "PlotType", "probability") 356s ***** error ... 356s truncate (TriangularDistribution) 356s ***** error ... 356s truncate (TriangularDistribution, 2) 356s ***** error ... 356s truncate (TriangularDistribution, 4, 2) 356s ***** shared pd 356s pd = TriangularDistribution (0, 1, 2); 356s pd(2) = TriangularDistribution (0, 1, 2); 356s ***** error cdf (pd, 1) 356s ***** error icdf (pd, 0.5) 356s ***** error iqr (pd) 356s ***** error mean (pd) 356s ***** error median (pd) 356s ***** error pdf (pd, 1) 356s ***** error plot (pd) 356s ***** error random (pd) 356s ***** error std (pd) 356s ***** error ... 356s truncate (pd, 2, 4) 356s ***** error var (pd) 356s 69 tests, 69 passed, 0 known failure, 0 skipped 356s [inst/dist_obj/MultinomialDistribution.m] 356s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/MultinomialDistribution.m 356s ***** shared pd, t 356s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 356s t = truncate (pd, 2, 4); 356s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 356s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 356s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 356s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 356s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 356s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 356s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 356s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 356s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 356s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 356s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 356s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 356s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 356s ***** assert (iqr (pd), 2); 356s ***** assert (iqr (t), 2); 356s ***** assert (mean (pd), 3.3, 1e-14); 356s ***** assert (mean (t), 3, eps); 356s ***** assert (median (pd), 3); 356s ***** assert (median (t), 3); 356s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 356s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 356s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 356s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 356s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 356s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 356s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 356s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 356s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 356s ***** assert (std (pd), 1.4177, 1e-4); 356s ***** assert (std (t), 0.7559, 1e-4); 356s ***** assert (var (pd), 2.0100, 1e-4); 356s ***** assert (var (t), 0.5714, 1e-4); 356s ***** error ... 356s MultinomialDistribution(0) 356s ***** error ... 356s MultinomialDistribution(-1) 356s ***** error ... 356s MultinomialDistribution(Inf) 356s ***** error ... 356s MultinomialDistribution(i) 356s ***** error ... 356s MultinomialDistribution("a") 356s ***** error ... 356s MultinomialDistribution([1, 2]) 356s ***** error ... 356s MultinomialDistribution(NaN) 356s ***** error ... 356s cdf (MultinomialDistribution, 2, "uper") 356s ***** error ... 356s cdf (MultinomialDistribution, 2, 3) 356s ***** error ... 356s cdf (MultinomialDistribution, i) 356s ***** error ... 356s plot (MultinomialDistribution, "Parent") 356s ***** error ... 356s plot (MultinomialDistribution, "PlotType", 12) 356s ***** error ... 356s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 356s ***** error ... 356s plot (MultinomialDistribution, "PlotType", "pdfcdf") 356s ***** error ... 356s plot (MultinomialDistribution, "Discrete", "pdfcdf") 356s ***** error ... 356s plot (MultinomialDistribution, "Discrete", [1, 0]) 356s ***** error ... 356s plot (MultinomialDistribution, "Discrete", {true}) 356s ***** error ... 356s plot (MultinomialDistribution, "Parent", 12) 356s ***** error ... 356s plot (MultinomialDistribution, "Parent", "hax") 356s ***** error ... 356s plot (MultinomialDistribution, "invalidNAME", "pdf") 356s ***** error ... 356s plot (MultinomialDistribution, "PlotType", "probability") 356s ***** error ... 356s truncate (MultinomialDistribution) 356s ***** error ... 356s truncate (MultinomialDistribution, 2) 356s ***** error ... 356s truncate (MultinomialDistribution, 4, 2) 356s ***** shared pd 356s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 356s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 356s ***** error cdf (pd, 1) 356s ***** error icdf (pd, 0.5) 356s ***** error iqr (pd) 356s ***** error mean (pd) 356s ***** error median (pd) 356s ***** error pdf (pd, 1) 356s ***** error plot (pd) 356s ***** error random (pd) 356s ***** error std (pd) 356s ***** error ... 356s truncate (pd, 2, 4) 356s ***** error var (pd) 356s 64 tests, 64 passed, 0 known failure, 0 skipped 356s [inst/dist_obj/NegativeBinomialDistribution.m] 356s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/NegativeBinomialDistribution.m 356s ***** shared pd, t, t_inf 356s pd = NegativeBinomialDistribution (5, 0.5); 356s t = truncate (pd, 2, 4); 356s t_inf = truncate (pd, 2, Inf); 356s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 356s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 356s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 356s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 356s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 356s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 356s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 356s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 356s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 356s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 356s ***** assert (iqr (pd), 4); 356s ***** assert (iqr (t), 2); 356s ***** assert (mean (pd), 5); 356s ***** assert (mean (t), 3.0500, 1e-4); 356s ***** assert (mean (t_inf), 5.5263, 1e-4); 356s ***** assert (median (pd), 4); 356s ***** assert (median (t), 3); 356s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 356s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 356s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 357s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 357s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 357s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 357s ***** assert (any (random (t, 1000, 1) < 2), false); 357s ***** assert (any (random (t, 1000, 1) > 4), false); 357s ***** assert (std (pd), 3.1623, 1e-4); 357s ***** assert (std (t), 0.8047, 1e-4); 357s ***** assert (std (t_inf), 2.9445, 1e-4); 357s ***** assert (var (pd), 10); 357s ***** assert (var (t), 0.6475, 1e-4); 357s ***** assert (var (t_inf), 8.6704, 1e-4); 357s ***** error ... 357s NegativeBinomialDistribution(Inf, 1) 357s ***** error ... 357s NegativeBinomialDistribution(i, 1) 357s ***** error ... 357s NegativeBinomialDistribution("a", 1) 357s ***** error ... 357s NegativeBinomialDistribution([1, 2], 1) 357s ***** error ... 357s NegativeBinomialDistribution(NaN, 1) 357s ***** error ... 357s NegativeBinomialDistribution(1, 0) 357s ***** error ... 357s NegativeBinomialDistribution(1, -1) 357s ***** error ... 357s NegativeBinomialDistribution(1, Inf) 357s ***** error ... 357s NegativeBinomialDistribution(1, i) 357s ***** error ... 357s NegativeBinomialDistribution(1, "a") 357s ***** error ... 357s NegativeBinomialDistribution(1, [1, 2]) 357s ***** error ... 357s NegativeBinomialDistribution(1, NaN) 357s ***** error ... 357s NegativeBinomialDistribution(1, 1.2) 357s ***** error ... 357s cdf (NegativeBinomialDistribution, 2, "uper") 357s ***** error ... 357s cdf (NegativeBinomialDistribution, 2, 3) 357s ***** shared x 357s x = nbinrnd (1, 0.5, [1, 100]); 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 357s "alpha", {0.05}) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), ... 357s "parameter", {"R", "P", "param"}) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 357s "parameter", {"R", "P", "param"}) 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 357s "parameter", "param") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 357s "NAME", "value") 357s ***** error ... 357s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 357s "parameter", "R", "NAME", "value") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Parent") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "PlotType", 12) 357s ***** error ... 357s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 357s ***** error ... 357s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Discrete", {true}) 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Parent", 12) 357s ***** error ... 357s plot (NegativeBinomialDistribution, "Parent", "hax") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 357s ***** error ... 357s plot (NegativeBinomialDistribution, "PlotType", "probability") 357s ***** error ... 357s proflik (NegativeBinomialDistribution, 2) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 3) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), {1}) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 357s ***** error ... 357s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 357s ***** error ... 357s truncate (NegativeBinomialDistribution) 357s ***** error ... 357s truncate (NegativeBinomialDistribution, 2) 357s ***** error ... 357s truncate (NegativeBinomialDistribution, 4, 2) 357s ***** shared pd 357s pd = NegativeBinomialDistribution(1, 0.5); 357s pd(2) = NegativeBinomialDistribution(1, 0.6); 357s ***** error cdf (pd, 1) 357s ***** error icdf (pd, 0.5) 357s ***** error iqr (pd) 357s ***** error mean (pd) 357s ***** error median (pd) 357s ***** error negloglik (pd) 357s ***** error paramci (pd) 357s ***** error pdf (pd, 1) 357s ***** error plot (pd) 357s ***** error proflik (pd, 2) 357s ***** error random (pd) 357s ***** error std (pd) 357s ***** error ... 357s truncate (pd, 2, 4) 357s ***** error var (pd) 357s 102 tests, 102 passed, 0 known failure, 0 skipped 357s [inst/dist_obj/GeneralizedParetoDistribution.m] 357s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/GeneralizedParetoDistribution.m 357s ***** shared pd, t 357s pd = GeneralizedParetoDistribution (1, 1, 1); 357s t = truncate (pd, 2, 4); 357s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 357s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 357s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 357s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 357s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 357s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 357s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 357s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 357s ***** assert (iqr (pd), 2.6667, 1e-4); 357s ***** assert (iqr (t), 0.9143, 1e-4); 357s ***** assert (mean (pd), Inf); 357s ***** assert (mean (t), 2.7726, 1e-4); 357s ***** assert (median (pd), 2); 357s ***** assert (median (t), 2.6667, 1e-4); 357s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 357s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 357s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 357s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 357s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 357s ***** assert (any (random (t, 1000, 1) < 2), false); 357s ***** assert (any (random (t, 1000, 1) > 4), false); 357s ***** assert (std (pd), Inf); 357s ***** assert (std (t), 0.5592, 1e-4); 357s ***** assert (var (pd), Inf); 357s ***** assert (var (t), 0.3128, 1e-4); 357s ***** error ... 357s GeneralizedParetoDistribution(Inf, 1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(i, 1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution("a", 1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution([1, 2], 1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(NaN, 1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, 0, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, -1, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, Inf, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, i, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, "a", 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, [1, 2], 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, NaN, 1) 357s ***** error ... 357s GeneralizedParetoDistribution(1, 1, Inf) 357s ***** error ... 357s GeneralizedParetoDistribution(1, 1, i) 357s ***** error ... 357s GeneralizedParetoDistribution(1, 1, "a") 357s ***** error ... 357s GeneralizedParetoDistribution(1, 1, [1, 2]) 357s ***** error ... 357s GeneralizedParetoDistribution(1, 1, NaN) 357s ***** error ... 357s cdf (GeneralizedParetoDistribution, 2, "uper") 357s ***** error ... 357s cdf (GeneralizedParetoDistribution, 2, 3) 357s ***** shared x 357s x = gprnd (1, 1, 1, [1, 100]); 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 357s "parameter", "sigma", "alpha", {0.05}) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 357s "parameter", {"k", "sigma", "param"}) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 357s "parameter", {"k", "sigma", "param"}) 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 357s "parameter", "param") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 357s "NAME", "value") 357s ***** error ... 357s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 357s "parameter", "sigma", "NAME", "value") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Parent") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "PlotType", 12) 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Discrete", {true}) 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Parent", 12) 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "Parent", "hax") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 357s ***** error ... 357s plot (GeneralizedParetoDistribution, "PlotType", "probability") 357s ***** error ... 357s proflik (GeneralizedParetoDistribution, 2) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 357s ***** error ... 357s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 358s "Display", ["on"; "on"]) 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 358s ***** error ... 358s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 358s "Display", "on") 358s ***** error ... 358s truncate (GeneralizedParetoDistribution) 358s ***** error ... 358s truncate (GeneralizedParetoDistribution, 2) 358s ***** error ... 358s truncate (GeneralizedParetoDistribution, 4, 2) 358s ***** shared pd 358s pd = GeneralizedParetoDistribution(1, 1, 1); 358s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 358s ***** error cdf (pd, 1) 358s ***** error icdf (pd, 0.5) 358s ***** error iqr (pd) 358s ***** error mean (pd) 358s ***** error median (pd) 358s ***** error negloglik (pd) 358s ***** error paramci (pd) 358s ***** error pdf (pd, 1) 358s ***** error plot (pd) 358s ***** error proflik (pd, 2) 358s ***** error random (pd) 358s ***** error std (pd) 358s ***** error ... 358s truncate (pd, 2, 4) 358s ***** error var (pd) 358s 100 tests, 100 passed, 0 known failure, 0 skipped 358s [inst/dist_obj/HalfNormalDistribution.m] 358s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/HalfNormalDistribution.m 358s ***** shared pd, t 358s pd = HalfNormalDistribution (0, 1); 358s t = truncate (pd, 2, 4); 358s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 358s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 358s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 358s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 358s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 358s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 358s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 358s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 358s ***** assert (iqr (pd), 0.8317, 1e-4); 358s ***** assert (iqr (t), 0.4111, 1e-4); 358s ***** assert (mean (pd), 0.7979, 1e-4); 358s ***** assert (mean (t), 2.3706, 1e-4); 358s ***** assert (median (pd), 0.6745, 1e-4); 358s ***** assert (median (t), 2.2771, 1e-4); 358s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 358s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 358s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 358s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 358s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 358s ***** assert (any (random (t, 1000, 1) < 2), false); 358s ***** assert (any (random (t, 1000, 1) > 4), false); 358s ***** assert (std (pd), 0.6028, 1e-4); 358s ***** assert (std (t), 0.3310, 1e-4); 358s ***** assert (var (pd), 0.3634, 1e-4); 358s ***** assert (var (t), 0.1096, 1e-4); 358s ***** error ... 358s HalfNormalDistribution(Inf, 1) 358s ***** error ... 358s HalfNormalDistribution(i, 1) 358s ***** error ... 358s HalfNormalDistribution("a", 1) 358s ***** error ... 358s HalfNormalDistribution([1, 2], 1) 358s ***** error ... 358s HalfNormalDistribution(NaN, 1) 358s ***** error ... 358s HalfNormalDistribution(1, 0) 358s ***** error ... 358s HalfNormalDistribution(1, -1) 358s ***** error ... 358s HalfNormalDistribution(1, Inf) 358s ***** error ... 358s HalfNormalDistribution(1, i) 358s ***** error ... 358s HalfNormalDistribution(1, "a") 358s ***** error ... 358s HalfNormalDistribution(1, [1, 2]) 358s ***** error ... 358s HalfNormalDistribution(1, NaN) 358s ***** error ... 358s cdf (HalfNormalDistribution, 2, "uper") 358s ***** error ... 358s cdf (HalfNormalDistribution, 2, 3) 358s ***** shared x 358s x = hnrnd (1, 1, [1, 100]); 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 358s "alpha", {0.05}) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), ... 358s "parameter", {"mu", "sigma", "param"}) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 358s "parameter", {"mu", "sigma", "param"}) 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 358s "parameter", "param") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 358s "NAME", "value") 358s ***** error ... 358s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 358s "parameter", "sigma", "NAME", "value") 358s ***** error ... 358s plot (HalfNormalDistribution, "Parent") 358s ***** error ... 358s plot (HalfNormalDistribution, "PlotType", 12) 358s ***** error ... 358s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 358s ***** error ... 358s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 358s ***** error ... 358s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 358s ***** error ... 358s plot (HalfNormalDistribution, "Discrete", [1, 0]) 358s ***** error ... 358s plot (HalfNormalDistribution, "Discrete", {true}) 358s ***** error ... 358s plot (HalfNormalDistribution, "Parent", 12) 358s ***** error ... 358s plot (HalfNormalDistribution, "Parent", "hax") 358s ***** error ... 358s plot (HalfNormalDistribution, "invalidNAME", "pdf") 358s ***** error ... 358s plot (HalfNormalDistribution, "PlotType", "probability") 358s ***** error ... 358s proflik (HalfNormalDistribution, 2) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), 3) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), {1}) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), 1) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 358s ***** error ... 358s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 359s ***** error ... 359s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 359s "Display", "on") 359s ***** error ... 359s truncate (HalfNormalDistribution) 359s ***** error ... 359s truncate (HalfNormalDistribution, 2) 359s ***** error ... 359s truncate (HalfNormalDistribution, 4, 2) 359s ***** shared pd 359s pd = HalfNormalDistribution(1, 1); 359s pd(2) = HalfNormalDistribution(1, 3); 359s ***** error cdf (pd, 1) 359s ***** error icdf (pd, 0.5) 359s ***** error iqr (pd) 359s ***** error mean (pd) 359s ***** error median (pd) 359s ***** error negloglik (pd) 359s ***** error paramci (pd) 359s ***** error pdf (pd, 1) 359s ***** error plot (pd) 359s ***** error proflik (pd, 2) 359s ***** error random (pd) 359s ***** error std (pd) 359s ***** error ... 359s truncate (pd, 2, 4) 359s ***** error var (pd) 359s 96 tests, 96 passed, 0 known failure, 0 skipped 359s [inst/dist_obj/PoissonDistribution.m] 359s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/PoissonDistribution.m 359s ***** shared pd, t, t_inf 359s pd = PoissonDistribution; 359s t = truncate (pd, 2, 4); 359s t_inf = truncate (pd, 2, Inf); 359s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 359s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 359s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 359s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 359s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 359s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 359s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 359s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 359s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 359s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 359s ***** assert (iqr (pd), 2); 359s ***** assert (iqr (t), 1); 359s ***** assert (mean (pd), 1); 359s ***** assert (mean (t), 2.3529, 1e-4); 359s ***** assert (mean (t_inf), 2.3922, 1e-4); 359s ***** assert (median (pd), 1); 359s ***** assert (median (t), 2); 359s ***** assert (median (t_inf), 2); 359s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 359s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 359s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 359s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 359s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 359s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 359s ***** assert (any (random (t, 1000, 1) < 2), false); 359s ***** assert (any (random (t, 1000, 1) > 4), false); 359s ***** assert (std (pd), 1); 359s ***** assert (std (t), 0.5882, 1e-4); 359s ***** assert (std (t_inf), 0.6738, 1e-4); 359s ***** assert (var (pd), 1); 359s ***** assert (var (t), 0.3460, 1e-4); 359s ***** assert (var (t_inf), 0.4540, 1e-4); 359s ***** error ... 359s PoissonDistribution(0) 359s ***** error ... 359s PoissonDistribution(-1) 359s ***** error ... 359s PoissonDistribution(Inf) 359s ***** error ... 359s PoissonDistribution(i) 359s ***** error ... 359s PoissonDistribution("a") 359s ***** error ... 359s PoissonDistribution([1, 2]) 359s ***** error ... 359s PoissonDistribution(NaN) 359s ***** error ... 359s cdf (PoissonDistribution, 2, "uper") 359s ***** error ... 359s cdf (PoissonDistribution, 2, 3) 359s ***** shared x 359s x = poissrnd (1, [1, 100]); 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 0) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 1) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", "") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 359s "parameter", {"lambda", "param"}) 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "parameter", "param") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "NAME", "value") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 359s ***** error ... 359s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 359s "parameter", "lambda", "NAME", "value") 359s ***** error ... 359s plot (PoissonDistribution, "Parent") 359s ***** error ... 359s plot (PoissonDistribution, "PlotType", 12) 359s ***** error ... 359s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 359s ***** error ... 359s plot (PoissonDistribution, "PlotType", "pdfcdf") 359s ***** error ... 359s plot (PoissonDistribution, "Discrete", "pdfcdf") 359s ***** error ... 359s plot (PoissonDistribution, "Discrete", [1, 0]) 359s ***** error ... 359s plot (PoissonDistribution, "Discrete", {true}) 359s ***** error ... 359s plot (PoissonDistribution, "Parent", 12) 359s ***** error ... 359s plot (PoissonDistribution, "Parent", "hax") 359s ***** error ... 359s plot (PoissonDistribution, "invalidNAME", "pdf") 359s ***** error ... 359s plot (PoissonDistribution, "PlotType", "probability") 359s ***** error ... 359s proflik (PoissonDistribution, 2) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 3) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), [1, 2]) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), {1}) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, ones (2)) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display") 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 359s ***** error ... 359s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 359s ***** error ... 359s truncate (PoissonDistribution) 359s ***** error ... 359s truncate (PoissonDistribution, 2) 359s ***** error ... 359s truncate (PoissonDistribution, 4, 2) 359s ***** shared pd 359s pd = PoissonDistribution(1); 359s pd(2) = PoissonDistribution(3); 359s ***** error cdf (pd, 1) 359s ***** error icdf (pd, 0.5) 359s ***** error iqr (pd) 359s ***** error mean (pd) 359s ***** error median (pd) 359s ***** error negloglik (pd) 359s ***** error paramci (pd) 359s ***** error pdf (pd, 1) 359s ***** error plot (pd) 359s ***** error proflik (pd, 2) 359s ***** error random (pd) 359s ***** error std (pd) 359s ***** error ... 359s truncate (pd, 2, 4) 359s ***** error var (pd) 359s 97 tests, 97 passed, 0 known failure, 0 skipped 359s [inst/dist_obj/PiecewiseLinearDistribution.m] 359s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/PiecewiseLinearDistribution.m 359s ***** shared pd, t 359s load patients 359s [f, x] = ecdf (Weight); 359s f = f(1:5:end); 359s x = x(1:5:end); 359s pd = PiecewiseLinearDistribution (x, f); 359s t = truncate (pd, 130, 180); 359s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 359s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 359s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 359s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 359s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 359s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 359s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 359s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 359s ***** assert (iqr (pd), 50.0833, 1e-4); 359s ***** assert (iqr (t), 36.8077, 1e-4); 359s ***** assert (mean (pd), 153.61, 1e-10); 359s ***** assert (mean (t), 152.311, 1e-3); 363s ***** assert (median (pd), 142, 1e-10); 363s ***** assert (median (t), 141.9462, 1e-4); 363s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 363s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 363s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 363s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 363s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 363s ***** assert (any (random (t, 1000, 1) < 130), false); 363s ***** assert (any (random (t, 1000, 1) > 180), false); 363s ***** assert (std (pd), 26.5196, 1e-4); 363s ***** assert (std (t), 18.2941, 1e-4); 372s ***** assert (var (pd), 703.2879, 1e-4); 372s ***** assert (var (t), 334.6757, 1e-4); 380s ***** error ... 380s PiecewiseLinearDistribution ([0, i], [0, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 1], [0, i]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0], [1]) 380s ***** error ... 380s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 380s ***** error ... 380s cdf (PiecewiseLinearDistribution, 2, "uper") 380s ***** error ... 380s cdf (PiecewiseLinearDistribution, 2, 3) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Parent") 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "PlotType", 12) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Discrete", {true}) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Parent", 12) 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "Parent", "hax") 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 380s ***** error ... 380s plot (PiecewiseLinearDistribution, "PlotType", "probability") 380s ***** error ... 380s truncate (PiecewiseLinearDistribution) 380s ***** error ... 380s truncate (PiecewiseLinearDistribution, 2) 380s ***** error ... 380s truncate (PiecewiseLinearDistribution, 4, 2) 380s ***** shared pd 380s pd = PiecewiseLinearDistribution (); 380s pd(2) = PiecewiseLinearDistribution (); 380s ***** error cdf (pd, 1) 380s ***** error icdf (pd, 0.5) 380s ***** error iqr (pd) 380s ***** error mean (pd) 380s ***** error median (pd) 380s ***** error pdf (pd, 1) 380s ***** error plot (pd) 380s ***** error random (pd) 380s ***** error std (pd) 380s ***** error ... 380s truncate (pd, 2, 4) 380s ***** error var (pd) 380s 63 tests, 63 passed, 0 known failure, 0 skipped 380s [inst/dist_obj/LogisticDistribution.m] 380s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/LogisticDistribution.m 380s ***** shared pd, t 380s pd = LogisticDistribution (0, 1); 380s t = truncate (pd, 2, 4); 380s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 380s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 380s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 380s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 380s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 380s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 380s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 380s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 380s ***** assert (iqr (pd), 2.1972, 1e-4); 380s ***** assert (iqr (t), 0.8286, 1e-4); 380s ***** assert (mean (pd), 0, 1e-4); 380s ***** assert (mean (t), 2.7193, 1e-4); 380s ***** assert (median (pd), 0); 380s ***** assert (median (t), 2.6085, 1e-4); 380s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 380s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 380s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 380s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 380s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 380s ***** assert (any (random (t, 1000, 1) < 2), false); 380s ***** assert (any (random (t, 1000, 1) > 4), false); 380s ***** assert (std (pd), 1.8138, 1e-4); 380s ***** assert (std (t), 0.5320, 1e-4); 380s ***** assert (var (pd), 3.2899, 1e-4); 380s ***** assert (var (t), 0.2830, 1e-4); 380s ***** error ... 380s LogisticDistribution(Inf, 1) 380s ***** error ... 380s LogisticDistribution(i, 1) 380s ***** error ... 380s LogisticDistribution("a", 1) 380s ***** error ... 380s LogisticDistribution([1, 2], 1) 380s ***** error ... 380s LogisticDistribution(NaN, 1) 380s ***** error ... 380s LogisticDistribution(1, 0) 380s ***** error ... 380s LogisticDistribution(1, -1) 380s ***** error ... 380s LogisticDistribution(1, Inf) 380s ***** error ... 380s LogisticDistribution(1, i) 380s ***** error ... 380s LogisticDistribution(1, "a") 381s ***** error ... 381s LogisticDistribution(1, [1, 2]) 381s ***** error ... 381s LogisticDistribution(1, NaN) 381s ***** error ... 381s cdf (LogisticDistribution, 2, "uper") 381s ***** error ... 381s cdf (LogisticDistribution, 2, 3) 381s ***** shared x 381s x = logirnd (1, 1, [1, 100]); 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 0) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 1) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", "") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 381s "parameter", {"mu", "sigma", "param"}) 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "parameter", "param") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "NAME", "value") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 381s ***** error ... 381s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 381s "NAME", "value") 381s ***** error ... 381s plot (LogisticDistribution, "Parent") 381s ***** error ... 381s plot (LogisticDistribution, "PlotType", 12) 381s ***** error ... 381s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 381s ***** error ... 381s plot (LogisticDistribution, "PlotType", "pdfcdf") 381s ***** error ... 381s plot (LogisticDistribution, "Discrete", "pdfcdf") 381s ***** error ... 381s plot (LogisticDistribution, "Discrete", [1, 0]) 381s ***** error ... 381s plot (LogisticDistribution, "Discrete", {true}) 381s ***** error ... 381s plot (LogisticDistribution, "Parent", 12) 381s ***** error ... 381s plot (LogisticDistribution, "Parent", "hax") 381s ***** error ... 381s plot (LogisticDistribution, "invalidNAME", "pdf") 381s ***** error ... 381s plot (LogisticDistribution, "PlotType", "probability") 381s ***** error ... 381s proflik (LogisticDistribution, 2) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 3) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), [1, 2]) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), {1}) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, ones (2)) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display") 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 381s ***** error ... 381s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 382s ***** error ... 382s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 382s ***** error ... 382s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 382s ***** error ... 382s truncate (LogisticDistribution) 382s ***** error ... 382s truncate (LogisticDistribution, 2) 382s ***** error ... 382s truncate (LogisticDistribution, 4, 2) 382s ***** shared pd 382s pd = LogisticDistribution(1, 1); 382s pd(2) = LogisticDistribution(1, 3); 382s ***** error cdf (pd, 1) 382s ***** error icdf (pd, 0.5) 382s ***** error iqr (pd) 382s ***** error mean (pd) 382s ***** error median (pd) 382s ***** error negloglik (pd) 382s ***** error paramci (pd) 382s ***** error pdf (pd, 1) 382s ***** error plot (pd) 382s ***** error proflik (pd, 2) 382s ***** error random (pd) 382s ***** error std (pd) 382s ***** error ... 382s truncate (pd, 2, 4) 382s ***** error var (pd) 382s 95 tests, 95 passed, 0 known failure, 0 skipped 382s [inst/dist_obj/BirnbaumSaundersDistribution.m] 382s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/BirnbaumSaundersDistribution.m 382s ***** demo 382s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 382s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 382s ## distribution to this data and plot a PDF of the fitted distribution 382s ## superimposed on a histogram of the data 382s 382s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 382s randg ("seed", 21); 382s data = random (pd, 5000, 1); 382s pd = fitdist (data, "BirnbaumSaunders") 382s plot (pd) 382s msg = "Fitted Birnbaum-Saunders distribution with a = %0.2f and b = %0.2f"; 382s title (sprintf (msg, pd.beta, pd.gamma)) 382s ***** demo 382s ## Plot the PDF of a Birnbaum-Saunders distribution, with parameters beta = 1 382s ## and gamma = 0.5, truncated at [0, 2] intervals. Generate 10000 random 382s ## samples from this truncated distribution and superimpose a histogram with 382s ## 100 bins scaled accordingly 382s 382s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 382s t = truncate (pd, 0, 2) 382s randg ("seed", 21); 382s data = random (t, 10000, 1); 382s plot (t) 382s title ("Birnbaum-Saunders distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 382s hold on 382s hist (data, 100, 50) 382s hold off 382s ***** demo 382s ## Generate a data set of 100 random samples from a Birnbaum-Saunders 382s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 382s ## distribution to this data and plot its CDF superimposed over an empirical 382s ## CDF of the data 382s 382s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 382s randg ("seed", 21); 382s data = random (pd, 100, 1); 382s pd = fitdist (data, "BirnbaumSaunders") 382s plot (pd, "plottype", "cdf") 382s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 382s pd.beta, pd.gamma)) 382s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 382s ***** shared pd, t 382s pd = BirnbaumSaundersDistribution; 382s t = truncate (pd, 2, 4); 382s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 382s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 382s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 382s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 382s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 382s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 382s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 382s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 382s ***** assert (iqr (pd), 1.4236, 1e-4); 382s ***** assert (iqr (t), 0.8968, 1e-4); 382s ***** assert (mean (pd), 1.5, eps); 382s ***** assert (mean (t), 2.7723, 1e-4); 382s ***** assert (median (pd), 1, 1e-4); 382s ***** assert (median (t), 2.6711, 1e-4); 382s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 382s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 382s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 382s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 382s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 382s ***** assert (any (random (t, 1000, 1) < 2), false); 382s ***** assert (any (random (t, 1000, 1) > 4), false); 382s ***** assert (std (pd), 1.5, eps); 382s ***** assert (std (t), 0.5528, 1e-4); 382s ***** assert (var (pd), 2.25, eps); 382s ***** assert (var (t), 0.3056, 1e-4); 382s ***** error ... 382s BirnbaumSaundersDistribution(0, 1) 382s ***** error ... 382s BirnbaumSaundersDistribution(Inf, 1) 382s ***** error ... 382s BirnbaumSaundersDistribution(i, 1) 382s ***** error ... 382s BirnbaumSaundersDistribution("beta", 1) 382s ***** error ... 382s BirnbaumSaundersDistribution([1, 2], 1) 382s ***** error ... 382s BirnbaumSaundersDistribution(NaN, 1) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, 0) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, -1) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, Inf) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, i) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, "beta") 382s ***** error ... 382s BirnbaumSaundersDistribution(1, [1, 2]) 382s ***** error ... 382s BirnbaumSaundersDistribution(1, NaN) 382s ***** error ... 382s cdf (BirnbaumSaundersDistribution, 2, "uper") 382s ***** error ... 382s cdf (BirnbaumSaundersDistribution, 2, 3) 382s ***** shared x 382s rand ("seed", 5); 382s x = bisarnd (1, 1, [100, 1]); 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 382s "beta", "alpha", {0.05}) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), ... 382s "parameter", {"beta", "gamma", "param"}) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 382s "parameter", {"beta", "gamma", "param"}) 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 382s "parameter", "param") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 382s "NAME", "value") 382s ***** error ... 382s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 382s "parameter", "beta", "NAME", "value") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Parent") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "PlotType", 12) 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Parent", 12) 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "Parent", "hax") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 382s ***** error ... 382s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution, 2) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 3) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 383s ***** error ... 383s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 383s ***** error ... 383s truncate (BirnbaumSaundersDistribution) 383s ***** error ... 383s truncate (BirnbaumSaundersDistribution, 2) 383s ***** error ... 383s truncate (BirnbaumSaundersDistribution, 4, 2) 383s ***** shared pd 383s pd = BirnbaumSaundersDistribution(1, 1); 383s pd(2) = BirnbaumSaundersDistribution(1, 3); 383s ***** error cdf (pd, 1) 383s ***** error icdf (pd, 0.5) 383s ***** error iqr (pd) 383s ***** error mean (pd) 383s ***** error median (pd) 383s ***** error negloglik (pd) 383s ***** error paramci (pd) 383s ***** error pdf (pd, 1) 383s ***** error plot (pd) 383s ***** error proflik (pd, 2) 383s ***** error random (pd) 383s ***** error std (pd) 383s ***** error ... 383s truncate (pd, 2, 4) 383s ***** error var (pd) 383s 96 tests, 96 passed, 0 known failure, 0 skipped 383s [inst/dist_obj/NormalDistribution.m] 383s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/NormalDistribution.m 383s ***** shared pd, t 383s pd = NormalDistribution; 383s t = truncate (pd, -2, 2); 383s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 383s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 383s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 383s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 383s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 383s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 383s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 383s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 383s ***** assert (iqr (pd), 1.3490, 1e-4); 383s ***** assert (iqr (t), 1.2782, 1e-4); 383s ***** assert (mean (pd), 0); 383s ***** assert (mean (t), 0, 3e-16); 383s ***** assert (median (pd), 0); 383s ***** assert (median (t), 0, 3e-16); 383s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 383s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 383s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 383s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 383s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 383s ***** assert (any (random (t, 1000, 1) < -2), false); 383s ***** assert (any (random (t, 1000, 1) > 2), false); 383s ***** assert (std (pd), 1); 383s ***** assert (std (t), 0.8796, 1e-4); 383s ***** assert (var (pd), 1); 383s ***** assert (var (t), 0.7737, 1e-4); 383s ***** error ... 383s NormalDistribution(Inf, 1) 383s ***** error ... 383s NormalDistribution(i, 1) 383s ***** error ... 383s NormalDistribution("a", 1) 383s ***** error ... 383s NormalDistribution([1, 2], 1) 383s ***** error ... 383s NormalDistribution(NaN, 1) 383s ***** error ... 383s NormalDistribution(1, 0) 383s ***** error ... 383s NormalDistribution(1, -1) 383s ***** error ... 383s NormalDistribution(1, Inf) 383s ***** error ... 383s NormalDistribution(1, i) 383s ***** error ... 383s NormalDistribution(1, "a") 383s ***** error ... 383s NormalDistribution(1, [1, 2]) 383s ***** error ... 383s NormalDistribution(1, NaN) 383s ***** error ... 383s cdf (NormalDistribution, 2, "uper") 383s ***** error ... 383s cdf (NormalDistribution, 2, 3) 383s ***** shared x 383s x = normrnd (1, 1, [1, 100]); 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha") 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha", 0) 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha", 1) 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha", "") 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 383s ***** error ... 383s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 384s "parameter", {"mu", "sigma", "param"}) 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "parameter", "param") 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "NAME", "value") 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 384s ***** error ... 384s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 384s "NAME", "value") 384s ***** error ... 384s plot (NormalDistribution, "Parent") 384s ***** error ... 384s plot (NormalDistribution, "PlotType", 12) 384s ***** error ... 384s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 384s ***** error ... 384s plot (NormalDistribution, "PlotType", "pdfcdf") 384s ***** error ... 384s plot (NormalDistribution, "Discrete", "pdfcdf") 384s ***** error ... 384s plot (NormalDistribution, "Discrete", [1, 0]) 384s ***** error ... 384s plot (NormalDistribution, "Discrete", {true}) 384s ***** error ... 384s plot (NormalDistribution, "Parent", 12) 384s ***** error ... 384s plot (NormalDistribution, "Parent", "hax") 384s ***** error ... 384s plot (NormalDistribution, "invalidNAME", "pdf") 384s ***** error ... 384s plot (NormalDistribution, "PlotType", "probability") 384s ***** error ... 384s proflik (NormalDistribution, 2) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), 3) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), [1, 2]) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), {1}) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), 1, ones (2)) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), 1, "Display") 384s ***** error ... 384s proflik (NormalDistribution.fit (x), 1, "Display", 1) 384s ***** error ... 384s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 385s ***** error ... 385s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 385s ***** error ... 385s truncate (NormalDistribution) 385s ***** error ... 385s truncate (NormalDistribution, 2) 385s ***** error ... 385s truncate (NormalDistribution, 4, 2) 385s ***** shared pd 385s pd = NormalDistribution(1, 1); 385s pd(2) = NormalDistribution(1, 3); 385s ***** error cdf (pd, 1) 385s ***** error icdf (pd, 0.5) 385s ***** error iqr (pd) 385s ***** error mean (pd) 385s ***** error median (pd) 385s ***** error negloglik (pd) 385s ***** error paramci (pd) 385s ***** error pdf (pd, 1) 385s ***** error plot (pd) 385s ***** error proflik (pd, 2) 385s ***** error random (pd) 385s ***** error std (pd) 385s ***** error ... 385s truncate (pd, 2, 4) 385s ***** error var (pd) 385s 95 tests, 95 passed, 0 known failure, 0 skipped 385s [inst/dist_obj/BinomialDistribution.m] 385s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/BinomialDistribution.m 385s ***** shared pd, t, t_inf 385s pd = BinomialDistribution (5, 0.5); 385s t = truncate (pd, 2, 4); 385s t_inf = truncate (pd, 2, Inf); 385s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 385s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 385s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 385s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 385s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 385s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 385s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 385s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 385s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 385s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 385s ***** assert (iqr (pd), 1); 385s ***** assert (iqr (t), 1); 385s ***** assert (mean (pd), 2.5, 1e-10); 385s ***** assert (mean (t), 2.8, 1e-10); 385s ***** assert (mean (t_inf), 2.8846, 1e-4); 385s ***** assert (median (pd), 2.5); 385s ***** assert (median (t), 3); 385s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 385s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 385s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 385s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 385s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 385s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 385s ***** assert (any (random (t, 1000, 1) < 2), false); 385s ***** assert (any (random (t, 1000, 1) > 4), false); 385s ***** assert (std (pd), 1.1180, 1e-4); 385s ***** assert (std (t), 0.7483, 1e-4); 385s ***** assert (std (t_inf), 0.8470, 1e-4); 385s ***** assert (var (pd), 1.2500, 1e-4); 385s ***** assert (var (t), 0.5600, 1e-4); 385s ***** assert (var (t_inf), 0.7175, 1e-4); 385s ***** error ... 385s BinomialDistribution(Inf, 0.5) 385s ***** error ... 385s BinomialDistribution(i, 0.5) 385s ***** error ... 385s BinomialDistribution("a", 0.5) 385s ***** error ... 385s BinomialDistribution([1, 2], 0.5) 385s ***** error ... 385s BinomialDistribution(NaN, 0.5) 385s ***** error ... 385s BinomialDistribution(1, 1.01) 385s ***** error ... 385s BinomialDistribution(1, -0.01) 385s ***** error ... 385s BinomialDistribution(1, Inf) 385s ***** error ... 385s BinomialDistribution(1, i) 385s ***** error ... 385s BinomialDistribution(1, "a") 385s ***** error ... 385s BinomialDistribution(1, [1, 2]) 385s ***** error ... 385s BinomialDistribution(1, NaN) 385s ***** error ... 385s cdf (BinomialDistribution, 2, "uper") 385s ***** error ... 385s cdf (BinomialDistribution, 2, 3) 385s ***** shared x 385s rand ("seed", 2); 385s x = binornd (5, 0.5, [1, 100]); 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 385s "alpha", {0.05}) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), ... 385s "parameter", {"N", "p", "param"}) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 385s "parameter", {"N", "p", "param"}) 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 385s "parameter", "param") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 385s "NAME", "value") 385s ***** error ... 385s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 385s "parameter", "p", "NAME", "value") 385s ***** error ... 385s plot (BinomialDistribution, "Parent") 385s ***** error ... 385s plot (BinomialDistribution, "PlotType", 12) 386s ***** error ... 386s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 386s ***** error ... 386s plot (BinomialDistribution, "PlotType", "pdfcdf") 386s ***** error ... 386s plot (BinomialDistribution, "Discrete", "pdfcdf") 386s ***** error ... 386s plot (BinomialDistribution, "Discrete", [1, 0]) 386s ***** error ... 386s plot (BinomialDistribution, "Discrete", {true}) 386s ***** error ... 386s plot (BinomialDistribution, "Parent", 12) 386s ***** error ... 386s plot (BinomialDistribution, "Parent", "hax") 386s ***** error ... 386s plot (BinomialDistribution, "invalidNAME", "pdf") 386s ***** error ... 386s plot (BinomialDistribution, "PlotType", "probability") 386s ***** error ... 386s proflik (BinomialDistribution, 2) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 3) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), {1}) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 386s ***** error ... 386s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 386s ***** error ... 386s truncate (BinomialDistribution) 386s ***** error ... 386s truncate (BinomialDistribution, 2) 386s ***** error ... 386s truncate (BinomialDistribution, 4, 2) 386s ***** shared pd 386s pd = BinomialDistribution(1, 0.5); 386s pd(2) = BinomialDistribution(1, 0.6); 386s ***** error cdf (pd, 1) 386s ***** error icdf (pd, 0.5) 386s ***** error iqr (pd) 386s ***** error mean (pd) 386s ***** error median (pd) 386s ***** error negloglik (pd) 386s ***** error paramci (pd) 386s ***** error pdf (pd, 1) 386s ***** error plot (pd) 386s ***** error proflik (pd, 2) 386s ***** error random (pd) 386s ***** error std (pd) 386s ***** error ... 386s truncate (pd, 2, 4) 386s ***** error var (pd) 386s 102 tests, 102 passed, 0 known failure, 0 skipped 386s [inst/dist_obj/tLocationScaleDistribution.m] 386s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/tLocationScaleDistribution.m 386s ***** shared pd, t 386s pd = tLocationScaleDistribution; 386s t = truncate (pd, 2, 4); 386s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 386s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 386s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 386s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 386s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 386s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 386s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 386s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 386s ***** assert (iqr (pd), 1.4534, 1e-4); 386s ***** assert (iqr (t), 0.7139, 1e-4); 386s ***** assert (mean (pd), 0, eps); 386s ***** assert (mean (t), 2.6099, 1e-4); 386s ***** assert (median (pd), 0, eps); 386s ***** assert (median (t), 2.4758, 1e-4); 386s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 386s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 386s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 386s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 386s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 386s ***** assert (any (random (t, 1000, 1) < 2), false); 386s ***** assert (any (random (t, 1000, 1) > 4), false); 386s ***** assert (std (pd), 1.2910, 1e-4); 386s ***** assert (std (t), 0.4989, 1e-4); 386s ***** assert (var (pd), 1.6667, 1e-4); 386s ***** assert (var (t), 0.2489, 1e-4); 386s ***** error ... 386s tLocationScaleDistribution(i, 1, 1) 386s ***** error ... 386s tLocationScaleDistribution(Inf, 1, 1) 386s ***** error ... 386s tLocationScaleDistribution([1, 2], 1, 1) 386s ***** error ... 386s tLocationScaleDistribution("a", 1, 1) 386s ***** error ... 386s tLocationScaleDistribution(NaN, 1, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, 0, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, -1, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, Inf, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, i, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, "a", 1) 386s ***** error ... 386s tLocationScaleDistribution(0, [1, 2], 1) 386s ***** error ... 386s tLocationScaleDistribution(0, NaN, 1) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, 0) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, -1) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, Inf) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, i) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, "a") 386s ***** error ... 386s tLocationScaleDistribution(0, 1, [1, 2]) 386s ***** error ... 386s tLocationScaleDistribution(0, 1, NaN) 386s ***** error ... 386s cdf (tLocationScaleDistribution, 2, "uper") 386s ***** error ... 386s cdf (tLocationScaleDistribution, 2, 3) 386s ***** shared x 386s x = tlsrnd (0, 1, 1, [1, 100]); 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha") 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 386s ***** error ... 386s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 387s "alpha", {0.05}) 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), ... 387s "parameter", {"mu", "sigma", "nu", "param"}) 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 387s "parameter", {"mu", "sigma", "nu", "param"}) 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 387s "parameter", "param") 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 387s ***** error ... 387s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 387s "parameter", "mu", "NAME", "value") 387s ***** error ... 387s plot (tLocationScaleDistribution, "Parent") 387s ***** error ... 387s plot (tLocationScaleDistribution, "PlotType", 12) 387s ***** error ... 387s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 387s ***** error ... 387s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 387s ***** error ... 387s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 387s ***** error ... 387s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 387s ***** error ... 387s plot (tLocationScaleDistribution, "Discrete", {true}) 387s ***** error ... 387s plot (tLocationScaleDistribution, "Parent", 12) 387s ***** error ... 387s plot (tLocationScaleDistribution, "Parent", "hax") 387s ***** error ... 387s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 387s ***** error ... 387s plot (tLocationScaleDistribution, "PlotType", "probability") 387s ***** error ... 387s proflik (tLocationScaleDistribution, 2) 387s ***** error ... 387s proflik (tLocationScaleDistribution.fit (x), 4) 387s ***** error ... 387s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 387s ***** error ... 387s proflik (tLocationScaleDistribution.fit (x), {1}) 387s ***** error ... 387s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 388s ***** error ... 388s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 388s ***** error ... 388s truncate (tLocationScaleDistribution) 388s ***** error ... 388s truncate (tLocationScaleDistribution, 2) 388s ***** error ... 388s truncate (tLocationScaleDistribution, 4, 2) 388s ***** shared pd 388s pd = tLocationScaleDistribution (0, 1, 1); 388s pd(2) = tLocationScaleDistribution (0, 1, 3); 388s ***** error cdf (pd, 1) 388s ***** error icdf (pd, 0.5) 388s ***** error iqr (pd) 388s ***** error mean (pd) 388s ***** error median (pd) 388s ***** error negloglik (pd) 388s ***** error paramci (pd) 388s ***** error pdf (pd, 1) 388s ***** error plot (pd) 388s ***** error proflik (pd, 2) 388s ***** error random (pd) 388s ***** error std (pd) 388s ***** error ... 388s truncate (pd, 2, 4) 388s ***** error var (pd) 388s 102 tests, 102 passed, 0 known failure, 0 skipped 388s [inst/dist_obj/ExtremeValueDistribution.m] 388s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/ExtremeValueDistribution.m 388s ***** shared pd, t 388s pd = ExtremeValueDistribution (0, 1); 388s t = truncate (pd, 2, 4); 388s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 388s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 388s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 388s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 388s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 388s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 388s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 388s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 388s ***** assert (iqr (pd), 1.5725, 1e-4); 388s ***** assert (iqr (t), 0.1338, 1e-4); 388s ***** assert (mean (pd), -0.5772, 1e-4); 388s ***** assert (mean (t), 2.1206, 1e-4); 388s ***** assert (median (pd), -0.3665, 1e-4); 388s ***** assert (median (t), 2.0897, 1e-4); 388s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 388s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 388s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 388s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 388s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 388s ***** assert (any (random (t, 1000, 1) < 2), false); 389s ***** assert (any (random (t, 1000, 1) > 4), false); 389s ***** assert (std (pd), 1.2825, 1e-4); 389s ***** assert (std (t), 0.1091, 1e-4); 389s ***** assert (var (pd), 1.6449, 1e-4); 389s ***** assert (var (t), 0.0119, 1e-4); 389s ***** error ... 389s ExtremeValueDistribution(Inf, 1) 389s ***** error ... 389s ExtremeValueDistribution(i, 1) 389s ***** error ... 389s ExtremeValueDistribution("a", 1) 389s ***** error ... 389s ExtremeValueDistribution([1, 2], 1) 389s ***** error ... 389s ExtremeValueDistribution(NaN, 1) 389s ***** error ... 389s ExtremeValueDistribution(1, 0) 389s ***** error ... 389s ExtremeValueDistribution(1, -1) 389s ***** error ... 389s ExtremeValueDistribution(1, Inf) 389s ***** error ... 389s ExtremeValueDistribution(1, i) 389s ***** error ... 389s ExtremeValueDistribution(1, "a") 389s ***** error ... 389s ExtremeValueDistribution(1, [1, 2]) 389s ***** error ... 389s ExtremeValueDistribution(1, NaN) 389s ***** error ... 389s cdf (ExtremeValueDistribution, 2, "uper") 389s ***** error ... 389s cdf (ExtremeValueDistribution, 2, 3) 389s ***** shared x 389s rand ("seed", 1); 389s x = evrnd (1, 1, [1000, 1]); 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), ... 389s "parameter", "mu", "alpha", {0.05}) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), ... 389s "parameter", {"mu", "sigma", "param"}) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 389s "parameter", {"mu", "sigma", "param"}) 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 389s "parameter", "param") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 389s ***** error ... 389s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 389s "parameter", "mu", "NAME", "value") 389s ***** error ... 389s plot (ExtremeValueDistribution, "Parent") 389s ***** error ... 389s plot (ExtremeValueDistribution, "PlotType", 12) 389s ***** error ... 389s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 389s ***** error ... 389s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 389s ***** error ... 389s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 389s ***** error ... 389s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 389s ***** error ... 389s plot (ExtremeValueDistribution, "Discrete", {true}) 389s ***** error ... 389s plot (ExtremeValueDistribution, "Parent", 12) 389s ***** error ... 389s plot (ExtremeValueDistribution, "Parent", "hax") 389s ***** error ... 389s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 389s ***** error ... 389s plot (ExtremeValueDistribution, "PlotType", "probability") 389s ***** error ... 389s proflik (ExtremeValueDistribution, 2) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 3) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), {1}) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 389s ***** error ... 389s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 389s ***** error ... 389s truncate (ExtremeValueDistribution) 389s ***** error ... 389s truncate (ExtremeValueDistribution, 2) 389s ***** error ... 389s truncate (ExtremeValueDistribution, 4, 2) 389s ***** shared pd 389s pd = ExtremeValueDistribution(1, 1); 389s pd(2) = ExtremeValueDistribution(1, 3); 389s ***** error cdf (pd, 1) 389s ***** error icdf (pd, 0.5) 389s ***** error iqr (pd) 389s ***** error mean (pd) 389s ***** error median (pd) 389s ***** error negloglik (pd) 389s ***** error paramci (pd) 389s ***** error pdf (pd, 1) 389s ***** error plot (pd) 389s ***** error proflik (pd, 2) 389s ***** error random (pd) 389s ***** error std (pd) 389s ***** error ... 389s truncate (pd, 2, 4) 389s ***** error var (pd) 389s 95 tests, 95 passed, 0 known failure, 0 skipped 389s [inst/dist_obj/NakagamiDistribution.m] 389s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/NakagamiDistribution.m 389s ***** shared pd, t 389s pd = NakagamiDistribution; 389s t = truncate (pd, 2, 4); 389s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 389s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 389s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 389s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 389s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 389s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 389s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 389s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 389s ***** assert (iqr (pd), 0.6411, 1e-4); 389s ***** assert (iqr (t), 0.2502, 1e-4); 389s ***** assert (mean (pd), 0.8862, 1e-4); 389s ***** assert (mean (t), 2.2263, 1e-4); 389s ***** assert (median (pd), 0.8326, 1e-4); 389s ***** assert (median (t), 2.1664, 1e-4); 389s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 389s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 389s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 389s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 389s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 389s ***** assert (any (random (t, 1000, 1) < 2), false); 389s ***** assert (any (random (t, 1000, 1) > 4), false); 389s ***** assert (std (pd), 0.4633, 1e-4); 389s ***** assert (std (t), 0.2083, 1e-4); 389s ***** assert (var (pd), 0.2146, 1e-4); 389s ***** assert (var (t), 0.0434, 1e-4); 389s ***** error ... 389s NakagamiDistribution(Inf, 1) 389s ***** error ... 389s NakagamiDistribution(i, 1) 389s ***** error ... 389s NakagamiDistribution("a", 1) 389s ***** error ... 389s NakagamiDistribution([1, 2], 1) 389s ***** error ... 389s NakagamiDistribution(NaN, 1) 389s ***** error ... 389s NakagamiDistribution(1, 0) 389s ***** error ... 389s NakagamiDistribution(1, -1) 389s ***** error ... 389s NakagamiDistribution(1, Inf) 389s ***** error ... 389s NakagamiDistribution(1, i) 389s ***** error ... 389s NakagamiDistribution(1, "a") 389s ***** error ... 389s NakagamiDistribution(1, [1, 2]) 389s ***** error ... 389s NakagamiDistribution(1, NaN) 389s ***** error ... 389s cdf (NakagamiDistribution, 2, "uper") 389s ***** error ... 389s cdf (NakagamiDistribution, 2, 3) 389s ***** shared x 389s x = nakarnd (1, 0.5, [1, 100]); 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha") 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", 0) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", 1) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", "") 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 389s "parameter", {"mu", "omega", "param"}) 389s ***** error ... 389s paramci (NakagamiDistribution.fit (x), "parameter", "param") 390s ***** error ... 390s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 390s ***** error ... 390s paramci (NakagamiDistribution.fit (x), "NAME", "value") 390s ***** error ... 390s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 390s ***** error ... 390s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 390s "NAME", "value") 390s ***** error ... 390s plot (NakagamiDistribution, "Parent") 390s ***** error ... 390s plot (NakagamiDistribution, "PlotType", 12) 390s ***** error ... 390s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 390s ***** error ... 390s plot (NakagamiDistribution, "PlotType", "pdfcdf") 390s ***** error ... 390s plot (NakagamiDistribution, "Discrete", "pdfcdf") 390s ***** error ... 390s plot (NakagamiDistribution, "Discrete", [1, 0]) 390s ***** error ... 390s plot (NakagamiDistribution, "Discrete", {true}) 390s ***** error ... 390s plot (NakagamiDistribution, "Parent", 12) 390s ***** error ... 390s plot (NakagamiDistribution, "Parent", "hax") 390s ***** error ... 390s plot (NakagamiDistribution, "invalidNAME", "pdf") 390s ***** error ... 390s plot (NakagamiDistribution, "PlotType", "probability") 390s ***** error ... 390s proflik (NakagamiDistribution, 2) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 3) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), [1, 2]) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), {1}) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display") 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 390s ***** error ... 390s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 390s ***** error ... 390s truncate (NakagamiDistribution) 390s ***** error ... 390s truncate (NakagamiDistribution, 2) 390s ***** error ... 390s truncate (NakagamiDistribution, 4, 2) 390s ***** shared pd 390s pd = NakagamiDistribution(1, 0.5); 390s pd(2) = NakagamiDistribution(1, 0.6); 390s ***** error cdf (pd, 1) 390s ***** error icdf (pd, 0.5) 390s ***** error iqr (pd) 390s ***** error mean (pd) 390s ***** error median (pd) 390s ***** error negloglik (pd) 390s ***** error paramci (pd) 390s ***** error pdf (pd, 1) 390s ***** error plot (pd) 390s ***** error proflik (pd, 2) 390s ***** error random (pd) 390s ***** error std (pd) 390s ***** error ... 390s truncate (pd, 2, 4) 390s ***** error var (pd) 390s 95 tests, 95 passed, 0 known failure, 0 skipped 390s [inst/dist_obj/RayleighDistribution.m] 390s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/RayleighDistribution.m 390s ***** shared pd, t 390s pd = RayleighDistribution; 390s t = truncate (pd, 2, 4); 390s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 390s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 390s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 390s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 390s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 390s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 390s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 390s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 390s ***** assert (iqr (pd), 0.9066, 1e-4); 390s ***** assert (iqr (t), 0.4609, 1e-4); 390s ***** assert (mean (pd), 1.2533, 1e-4); 390s ***** assert (mean (t), 2.4169, 1e-4); 390s ***** assert (median (pd), 1.1774, 1e-4); 390s ***** assert (median (t), 2.3198, 1e-4); 390s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 390s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 390s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 390s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 390s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 390s ***** assert (any (random (t, 1000, 1) < 2), false); 390s ***** assert (any (random (t, 1000, 1) > 4), false); 390s ***** assert (std (pd), 0.6551, 1e-4); 390s ***** assert (std (t), 0.3591, 1e-4); 390s ***** assert (var (pd), 0.4292, 1e-4); 390s ***** assert (var (t), 0.1290, 1e-4); 390s ***** error ... 390s RayleighDistribution(0) 390s ***** error ... 390s RayleighDistribution(-1) 390s ***** error ... 390s RayleighDistribution(Inf) 390s ***** error ... 390s RayleighDistribution(i) 390s ***** error ... 390s RayleighDistribution("a") 390s ***** error ... 390s RayleighDistribution([1, 2]) 390s ***** error ... 390s RayleighDistribution(NaN) 390s ***** error ... 390s cdf (RayleighDistribution, 2, "uper") 390s ***** error ... 390s cdf (RayleighDistribution, 2, 3) 390s ***** shared x 390s x = raylrnd (1, [1, 100]); 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 0) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 1) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", "") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 390s "parameter", {"sigma", "param"}) 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "parameter", "param") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "NAME", "value") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 390s ***** error ... 390s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 390s "parameter", "sigma", "NAME", "value") 390s ***** error ... 390s plot (RayleighDistribution, "Parent") 390s ***** error ... 390s plot (RayleighDistribution, "PlotType", 12) 390s ***** error ... 390s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 390s ***** error ... 390s plot (RayleighDistribution, "PlotType", "pdfcdf") 390s ***** error ... 390s plot (RayleighDistribution, "Discrete", "pdfcdf") 390s ***** error ... 390s plot (RayleighDistribution, "Discrete", [1, 0]) 390s ***** error ... 390s plot (RayleighDistribution, "Discrete", {true}) 390s ***** error ... 390s plot (RayleighDistribution, "Parent", 12) 390s ***** error ... 390s plot (RayleighDistribution, "Parent", "hax") 390s ***** error ... 390s plot (RayleighDistribution, "invalidNAME", "pdf") 390s ***** error ... 390s plot (RayleighDistribution, "PlotType", "probability") 390s ***** error ... 390s proflik (RayleighDistribution, 2) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 3) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), [1, 2]) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), {1}) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, ones (2)) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, "Display") 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 390s ***** error ... 390s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 391s ***** error ... 391s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 391s ***** error ... 391s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 391s ***** error ... 391s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 391s ***** error ... 391s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 391s ***** error ... 391s truncate (RayleighDistribution) 391s ***** error ... 391s truncate (RayleighDistribution, 2) 391s ***** error ... 391s truncate (RayleighDistribution, 4, 2) 391s ***** shared pd 391s pd = RayleighDistribution(1); 391s pd(2) = RayleighDistribution(3); 391s ***** error cdf (pd, 1) 391s ***** error icdf (pd, 0.5) 391s ***** error iqr (pd) 391s ***** error mean (pd) 391s ***** error median (pd) 391s ***** error negloglik (pd) 391s ***** error paramci (pd) 391s ***** error pdf (pd, 1) 391s ***** error plot (pd) 391s ***** error proflik (pd, 2) 391s ***** error random (pd) 391s ***** error std (pd) 391s ***** error ... 391s truncate (pd, 2, 4) 391s ***** error var (pd) 391s 90 tests, 90 passed, 0 known failure, 0 skipped 391s [inst/dist_obj/ExponentialDistribution.m] 391s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/ExponentialDistribution.m 391s ***** shared pd, t 391s pd = ExponentialDistribution (1); 391s t = truncate (pd, 2, 4); 391s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 391s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 391s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 391s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 391s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 391s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 391s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 391s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 391s ***** assert (iqr (pd), 1.0986, 1e-4); 391s ***** assert (iqr (t), 0.8020, 1e-4); 391s ***** assert (mean (pd), 1); 391s ***** assert (mean (t), 2.6870, 1e-4); 391s ***** assert (median (pd), 0.6931, 1e-4); 391s ***** assert (median (t), 2.5662, 1e-4); 391s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 391s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 391s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 391s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 391s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 391s ***** assert (any (random (t, 1000, 1) < 2), false); 391s ***** assert (any (random (t, 1000, 1) > 4), false); 391s ***** assert (std (pd), 1); 391s ***** assert (std (t), 0.5253, 1e-4); 391s ***** assert (var (pd), 1); 391s ***** assert (var (t), 0.2759, 1e-4); 391s ***** error ... 391s ExponentialDistribution(0) 391s ***** error ... 391s ExponentialDistribution(-1) 391s ***** error ... 391s ExponentialDistribution(Inf) 391s ***** error ... 391s ExponentialDistribution(i) 391s ***** error ... 391s ExponentialDistribution("a") 391s ***** error ... 391s ExponentialDistribution([1, 2]) 391s ***** error ... 391s ExponentialDistribution(NaN) 391s ***** error ... 391s cdf (ExponentialDistribution, 2, "uper") 391s ***** error ... 391s cdf (ExponentialDistribution, 2, 3) 391s ***** shared x 391s x = exprnd (1, [100, 1]); 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 0) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 1) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", "") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 391s "alpha", {0.05}) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 391s "parameter", {"mu", "param"}) 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "parameter", "param") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "NAME", "value") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 391s ***** error ... 391s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 391s "parameter", "mu", "NAME", "value") 391s ***** error ... 391s plot (ExponentialDistribution, "Parent") 391s ***** error ... 391s plot (ExponentialDistribution, "PlotType", 12) 391s ***** error ... 391s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 391s ***** error ... 391s plot (ExponentialDistribution, "PlotType", "pdfcdf") 391s ***** error ... 391s plot (ExponentialDistribution, "Discrete", "pdfcdf") 391s ***** error ... 391s plot (ExponentialDistribution, "Discrete", [1, 0]) 391s ***** error ... 391s plot (ExponentialDistribution, "Discrete", {true}) 391s ***** error ... 391s plot (ExponentialDistribution, "Parent", 12) 391s ***** error ... 391s plot (ExponentialDistribution, "Parent", "hax") 391s ***** error ... 391s plot (ExponentialDistribution, "invalidNAME", "pdf") 391s ***** error ... 391s plot (ExponentialDistribution, "PlotType", "probability") 391s ***** error ... 391s proflik (ExponentialDistribution, 2) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 3) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), [1, 2]) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), {1}) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display") 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 391s ***** error ... 391s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 391s ***** error ... 391s truncate (ExponentialDistribution) 391s ***** error ... 391s truncate (ExponentialDistribution, 2) 391s ***** error ... 391s truncate (ExponentialDistribution, 4, 2) 391s ***** shared pd 391s pd = ExponentialDistribution(1); 391s pd(2) = ExponentialDistribution(3); 391s ***** error cdf (pd, 1) 391s ***** error icdf (pd, 0.5) 391s ***** error iqr (pd) 391s ***** error mean (pd) 391s ***** error median (pd) 391s ***** error negloglik (pd) 391s ***** error paramci (pd) 391s ***** error pdf (pd, 1) 391s ***** error plot (pd) 391s ***** error proflik (pd, 2) 391s ***** error random (pd) 391s ***** error std (pd) 391s ***** error ... 391s truncate (pd, 2, 4) 391s ***** error var (pd) 391s 90 tests, 90 passed, 0 known failure, 0 skipped 391s [inst/dist_obj/LognormalDistribution.m] 391s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/LognormalDistribution.m 391s ***** shared pd, t 391s pd = LognormalDistribution; 391s t = truncate (pd, 2, 4); 391s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 391s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 391s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 391s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 391s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 391s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 391s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 391s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 391s ***** assert (iqr (pd), 1.4536, 1e-4); 391s ***** assert (iqr (t), 0.8989, 1e-4); 391s ***** assert (mean (pd), 1.6487, 1e-4); 391s ***** assert (mean (t), 2.7692, 1e-4); 391s ***** assert (median (pd), 1, 1e-4); 391s ***** assert (median (t), 2.6653, 1e-4); 391s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 391s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 391s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 391s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 391s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 391s ***** assert (any (random (t, 1000, 1) < 2), false); 391s ***** assert (any (random (t, 1000, 1) > 4), false); 391s ***** assert (std (pd), 2.1612, 1e-4); 391s ***** assert (std (t), 0.5540, 1e-4); 391s ***** assert (var (pd), 4.6708, 1e-4); 391s ***** assert (var (t), 0.3069, 1e-4); 392s ***** error ... 392s LognormalDistribution(Inf, 1) 392s ***** error ... 392s LognormalDistribution(i, 1) 392s ***** error ... 392s LognormalDistribution("a", 1) 392s ***** error ... 392s LognormalDistribution([1, 2], 1) 392s ***** error ... 392s LognormalDistribution(NaN, 1) 392s ***** error ... 392s LognormalDistribution(1, 0) 392s ***** error ... 392s LognormalDistribution(1, -1) 392s ***** error ... 392s LognormalDistribution(1, Inf) 392s ***** error ... 392s LognormalDistribution(1, i) 392s ***** error ... 392s LognormalDistribution(1, "a") 392s ***** error ... 392s LognormalDistribution(1, [1, 2]) 392s ***** error ... 392s LognormalDistribution(1, NaN) 392s ***** error ... 392s cdf (LognormalDistribution, 2, "uper") 392s ***** error ... 392s cdf (LognormalDistribution, 2, 3) 392s ***** shared x 392s randn ("seed", 1); 392s x = lognrnd (1, 1, [1, 100]); 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 0) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 1) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", "") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 392s "parameter", {"mu", "sigma", "param"}) 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "parameter", "param") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "NAME", "value") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 392s ***** error ... 392s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 392s "NAME", "value") 393s ***** error ... 393s plot (LognormalDistribution, "Parent") 393s ***** error ... 393s plot (LognormalDistribution, "PlotType", 12) 393s ***** error ... 393s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 393s ***** error ... 393s plot (LognormalDistribution, "PlotType", "pdfcdf") 393s ***** error ... 393s plot (LognormalDistribution, "Discrete", "pdfcdf") 393s ***** error ... 393s plot (LognormalDistribution, "Discrete", [1, 0]) 393s ***** error ... 393s plot (LognormalDistribution, "Discrete", {true}) 393s ***** error ... 393s plot (LognormalDistribution, "Parent", 12) 393s ***** error ... 393s plot (LognormalDistribution, "Parent", "hax") 393s ***** error ... 393s plot (LognormalDistribution, "invalidNAME", "pdf") 393s ***** error ... 393s plot (LognormalDistribution, "PlotType", "probability") 393s ***** error ... 393s proflik (LognormalDistribution, 2) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 3) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), [1, 2]) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), {1}) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, ones (2)) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display") 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 393s ***** error ... 393s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 394s ***** error ... 394s truncate (LognormalDistribution) 394s ***** error ... 394s truncate (LognormalDistribution, 2) 394s ***** error ... 394s truncate (LognormalDistribution, 4, 2) 394s ***** shared pd 394s pd = LognormalDistribution(1, 1); 394s pd(2) = LognormalDistribution(1, 3); 394s ***** error cdf (pd, 1) 394s ***** error icdf (pd, 0.5) 394s ***** error iqr (pd) 394s ***** error mean (pd) 394s ***** error median (pd) 394s ***** error negloglik (pd) 394s ***** error paramci (pd) 394s ***** error pdf (pd, 1) 394s ***** error plot (pd) 394s ***** error proflik (pd, 2) 394s ***** error random (pd) 394s ***** error std (pd) 394s ***** error ... 394s truncate (pd, 2, 4) 394s ***** error var (pd) 394s 95 tests, 95 passed, 0 known failure, 0 skipped 394s [inst/dist_obj/BetaDistribution.m] 394s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/BetaDistribution.m 394s ***** demo 394s ## Generate a data set of 5000 random samples from a Beta distribution with 394s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 394s ## a PDF of the fitted distribution superimposed on a histogram of the data 394s 394s pd = makedist ("Beta", "a", 2, "b", 4) 394s randg ("seed", 21); 394s data = random (pd, 5000, 1); 394s pd = fitdist (data, "Beta") 394s plot (pd) 394s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 394s pd.a, pd.b)) 394s ***** demo 394s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 394s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 394s ## this truncated distribution and superimpose a histogram with 100 bins 394s ## scaled accordingly 394s 394s pd = makedist ("Beta", "a", 2, "b", 4) 394s t = truncate (pd, 0.1, 0.8) 394s randg ("seed", 21); 394s data = random (t, 10000, 1); 394s plot (t) 394s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 394s hold on 394s hist (data, 100, 140) 394s hold off 394s ***** demo 394s ## Generate a data set of 100 random samples from a Beta distribution with 394s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 394s ## its CDF superimposed over an empirical CDF of the data 394s 394s pd = makedist ("Beta", "a", 2, "b", 4) 394s randg ("seed", 21); 394s data = random (pd, 100, 1); 394s pd = fitdist (data, "Beta") 394s plot (pd, "plottype", "cdf") 394s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 394s pd.a, pd.b)) 394s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 394s ***** demo 394s ## Generate a data set of 200 random samples from a Beta distribution with 394s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 394s ## distribution fit to the data. 394s 394s pd = makedist ("Beta", "a", 2, "b", 4) 394s randg ("seed", 21); 394s data = random (pd, 200, 1); 394s pd = fitdist (data, "Beta") 394s plot (pd, "plottype", "probability") 394s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 394s pd.a, pd.b)) 394s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 394s ***** shared pd, t 394s pd = BetaDistribution; 394s t = truncate (pd, 0.2, 0.8); 394s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 394s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 394s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 394s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 394s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 394s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 394s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 394s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 394s ***** assert (iqr (pd), 0.5, 1e-4); 394s ***** assert (iqr (t), 0.3, 1e-4); 394s ***** assert (mean (pd), 0.5); 394s ***** assert (mean (t), 0.5, 1e-6); 394s ***** assert (median (pd), 0.5); 394s ***** assert (median (t), 0.5, 1e-6); 394s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 394s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 394s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 394s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 394s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 394s ***** assert (any (random (t, 1000, 1) < 0.2), false); 394s ***** assert (any (random (t, 1000, 1) > 0.8), false); 394s ***** assert (std (pd), 0.2887, 1e-4); 394s ***** assert (std (t), 0.1732, 1e-4); 394s ***** assert (var (pd), 0.0833, 1e-4); 394s ***** assert (var (t), 0.0300, 1e-4); 394s ***** error ... 394s BetaDistribution(0, 1) 394s ***** error ... 394s BetaDistribution(Inf, 1) 394s ***** error ... 394s BetaDistribution(i, 1) 394s ***** error ... 394s BetaDistribution("a", 1) 394s ***** error ... 394s BetaDistribution([1, 2], 1) 394s ***** error ... 394s BetaDistribution(NaN, 1) 394s ***** error ... 394s BetaDistribution(1, 0) 394s ***** error ... 394s BetaDistribution(1, -1) 394s ***** error ... 394s BetaDistribution(1, Inf) 394s ***** error ... 394s BetaDistribution(1, i) 394s ***** error ... 394s BetaDistribution(1, "a") 394s ***** error ... 394s BetaDistribution(1, [1, 2]) 394s ***** error ... 394s BetaDistribution(1, NaN) 394s ***** error ... 394s cdf (BetaDistribution, 2, "uper") 394s ***** error ... 394s cdf (BetaDistribution, 2, 3) 394s ***** shared x 394s randg ("seed", 1); 394s x = betarnd (1, 1, [100, 1]); 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 0) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 1) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", "") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 394s "parameter", {"a", "b", "param"}) 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "parameter", "param") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "NAME", "value") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 394s ***** error ... 394s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 394s "NAME", "value") 394s ***** error ... 394s plot (BetaDistribution, "Parent") 394s ***** error ... 394s plot (BetaDistribution, "PlotType", 12) 394s ***** error ... 394s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 394s ***** error ... 394s plot (BetaDistribution, "PlotType", "pdfcdf") 394s ***** error ... 394s plot (BetaDistribution, "Discrete", "pdfcdf") 394s ***** error ... 394s plot (BetaDistribution, "Discrete", [1, 0]) 394s ***** error ... 394s plot (BetaDistribution, "Discrete", {true}) 394s ***** error ... 394s plot (BetaDistribution, "Parent", 12) 394s ***** error ... 394s plot (BetaDistribution, "Parent", "hax") 394s ***** error ... 394s plot (BetaDistribution, "invalidNAME", "pdf") 394s ***** error ... 394s plot (BetaDistribution, "PlotType", "probability") 394s ***** error ... 394s proflik (BetaDistribution, 2) 394s ***** error ... 394s proflik (BetaDistribution.fit (x), 3) 394s ***** error ... 394s proflik (BetaDistribution.fit (x), [1, 2]) 394s ***** error ... 394s proflik (BetaDistribution.fit (x), {1}) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, ones (2)) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display") 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display", 1) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 395s ***** error ... 395s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 395s ***** error ... 395s truncate (BetaDistribution) 395s ***** error ... 395s truncate (BetaDistribution, 2) 395s ***** error ... 395s truncate (BetaDistribution, 4, 2) 395s ***** shared pd 395s pd = BetaDistribution(1, 1); 395s pd(2) = BetaDistribution(1, 3); 395s ***** error cdf (pd, 1) 395s ***** error icdf (pd, 0.5) 395s ***** error iqr (pd) 395s ***** error mean (pd) 395s ***** error median (pd) 395s ***** error negloglik (pd) 395s ***** error paramci (pd) 395s ***** error pdf (pd, 1) 395s ***** error plot (pd) 395s ***** error proflik (pd, 2) 395s ***** error random (pd) 395s ***** error std (pd) 395s ***** error ... 395s truncate (pd, 2, 4) 395s ***** error var (pd) 395s 96 tests, 96 passed, 0 known failure, 0 skipped 395s [inst/dist_obj/GammaDistribution.m] 395s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/GammaDistribution.m 395s ***** shared pd, t 395s pd = GammaDistribution (1, 1); 395s t = truncate (pd, 2, 4); 395s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 395s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 395s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 395s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 395s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 395s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 395s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 395s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 395s ***** assert (iqr (pd), 1.0986, 1e-4); 395s ***** assert (iqr (t), 0.8020, 1e-4); 395s ***** assert (mean (pd), 1); 395s ***** assert (mean (t), 2.6870, 1e-4); 395s ***** assert (median (pd), 0.6931, 1e-4); 395s ***** assert (median (t), 2.5662, 1e-4); 395s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 395s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 395s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 395s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 395s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 395s ***** assert (any (random (t, 1000, 1) < 2), false); 395s ***** assert (any (random (t, 1000, 1) > 4), false); 395s ***** assert (std (pd), 1); 395s ***** assert (std (t), 0.5253, 1e-4); 395s ***** assert (var (pd), 1); 395s ***** assert (var (t), 0.2759, 1e-4); 395s ***** error ... 395s GammaDistribution(0, 1) 395s ***** error ... 395s GammaDistribution(Inf, 1) 395s ***** error ... 395s GammaDistribution(i, 1) 395s ***** error ... 395s GammaDistribution("a", 1) 395s ***** error ... 395s GammaDistribution([1, 2], 1) 395s ***** error ... 395s GammaDistribution(NaN, 1) 395s ***** error ... 395s GammaDistribution(1, 0) 395s ***** error ... 395s GammaDistribution(1, -1) 395s ***** error ... 395s GammaDistribution(1, Inf) 395s ***** error ... 395s GammaDistribution(1, i) 395s ***** error ... 395s GammaDistribution(1, "a") 395s ***** error ... 395s GammaDistribution(1, [1, 2]) 395s ***** error ... 395s GammaDistribution(1, NaN) 395s ***** error ... 395s cdf (GammaDistribution, 2, "uper") 395s ***** error ... 395s cdf (GammaDistribution, 2, 3) 395s ***** shared x 395s x = gamrnd (1, 1, [100, 1]); 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 0) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 1) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", "") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 395s "parameter", {"a", "b", "param"}) 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "parameter", "param") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "NAME", "value") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 395s ***** error ... 395s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 395s "NAME", "value") 395s ***** error ... 395s plot (GammaDistribution, "Parent") 395s ***** error ... 395s plot (GammaDistribution, "PlotType", 12) 395s ***** error ... 395s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 395s ***** error ... 395s plot (GammaDistribution, "PlotType", "pdfcdf") 395s ***** error ... 395s plot (GammaDistribution, "Discrete", "pdfcdf") 395s ***** error ... 395s plot (GammaDistribution, "Discrete", [1, 0]) 395s ***** error ... 395s plot (GammaDistribution, "Discrete", {true}) 395s ***** error ... 395s plot (GammaDistribution, "Parent", 12) 395s ***** error ... 395s plot (GammaDistribution, "Parent", "hax") 395s ***** error ... 395s plot (GammaDistribution, "invalidNAME", "pdf") 395s ***** error ... 395s plot (GammaDistribution, "PlotType", "probability") 395s ***** error ... 395s proflik (GammaDistribution, 2) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 3) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), [1, 2]) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), {1}) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, ones (2)) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display") 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display", 1) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 395s ***** error ... 395s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 395s ***** error ... 395s truncate (GammaDistribution) 395s ***** error ... 395s truncate (GammaDistribution, 2) 395s ***** error ... 395s truncate (GammaDistribution, 4, 2) 395s ***** shared pd 395s pd = GammaDistribution(1, 1); 395s pd(2) = GammaDistribution(1, 3); 395s ***** error cdf (pd, 1) 395s ***** error icdf (pd, 0.5) 395s ***** error iqr (pd) 395s ***** error mean (pd) 395s ***** error median (pd) 395s ***** error negloglik (pd) 395s ***** error paramci (pd) 395s ***** error pdf (pd, 1) 395s ***** error plot (pd) 395s ***** error proflik (pd, 2) 395s ***** error random (pd) 395s ***** error std (pd) 395s ***** error ... 395s truncate (pd, 2, 4) 395s ***** error var (pd) 395s 96 tests, 96 passed, 0 known failure, 0 skipped 395s [inst/dist_obj/BurrDistribution.m] 395s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/BurrDistribution.m 395s ***** demo 395s ## Generate a data set of 5000 random samples from a Burr type XII 395s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 395s ## XII distribution to this data and plot a PDF of the fitted distribution 395s ## superimposed on a histogram of the data 395s 395s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 395s rand ("seed", 21); 395s data = random (pd, 5000, 1); 395s pd = fitdist (data, "Burr") 395s plot (pd) 395s msg = strcat (["Fitted Burr type XII distribution with"], ... 395s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 395s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 395s ***** demo 395s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 395s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 395s ## samples from this truncated distribution and superimpose a histogram with 395s ## 100 bins scaled accordingly 395s 395s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 395s t = truncate (pd, 0.5, 2.5) 395s rand ("seed", 21); 395s data = random (t, 10000, 1); 395s plot (t) 395s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 395s hold on 395s hist (data, 100, 50) 395s hold off 395s ***** demo 395s ## Generate a data set of 100 random samples from a Burr type XII 395s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 395s ## XII distribution to this data and plot its CDF superimposed over an 395s ## empirical CDF of the data 395s 395s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 395s rand ("seed", 21); 395s data = random (pd, 100, 1); 395s pd = fitdist (data, "Burr") 395s plot (pd, "plottype", "cdf") 395s msg = strcat (["Fitted Burr type XII distribution with"], ... 395s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 395s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 395s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 395s ***** shared pd, t 395s pd = BurrDistribution; 395s t = truncate (pd, 2, 4); 395s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 395s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 395s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 395s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 395s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 395s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 395s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 395s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 395s ***** assert (iqr (pd), 2.6667, 1e-4); 395s ***** assert (iqr (t), 0.9524, 1e-4); 395s ***** assert (mean (pd), Inf); 396s ***** assert (mean (t), 2.8312, 1e-4); 396s ***** assert (median (pd), 1, 1e-4); 396s ***** assert (median (t), 2.75, 1e-4); 396s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 396s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 396s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 396s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 396s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 396s ***** assert (any (random (t, 1000, 1) < 2), false); 396s ***** assert (any (random (t, 1000, 1) > 4), false); 396s ***** assert (std (pd), Inf); 396s ***** assert (std (t), 0.5674, 1e-4); 396s ***** assert (var (pd), Inf); 396s ***** assert (var (t), 0.3220, 1e-4); 396s ***** error ... 396s BurrDistribution(0, 1, 1) 396s ***** error ... 396s BurrDistribution(-1, 1, 1) 396s ***** error ... 396s BurrDistribution(Inf, 1, 1) 396s ***** error ... 396s BurrDistribution(i, 1, 1) 396s ***** error ... 396s BurrDistribution("a", 1, 1) 396s ***** error ... 396s BurrDistribution([1, 2], 1, 1) 396s ***** error ... 396s BurrDistribution(NaN, 1, 1) 396s ***** error ... 396s BurrDistribution(1, 0, 1) 396s ***** error ... 396s BurrDistribution(1, -1, 1) 396s ***** error ... 396s BurrDistribution(1, Inf, 1) 396s ***** error ... 396s BurrDistribution(1, i, 1) 396s ***** error ... 396s BurrDistribution(1, "a", 1) 396s ***** error ... 396s BurrDistribution(1, [1, 2], 1) 396s ***** error ... 396s BurrDistribution(1, NaN, 1) 396s ***** error ... 396s BurrDistribution(1, 1, 0) 396s ***** error ... 396s BurrDistribution(1, 1, -1) 396s ***** error ... 396s BurrDistribution(1, 1, Inf) 396s ***** error ... 396s BurrDistribution(1, 1, i) 396s ***** error ... 396s BurrDistribution(1, 1, "a") 396s ***** error ... 396s BurrDistribution(1, 1, [1, 2]) 396s ***** error ... 396s BurrDistribution(1, 1, NaN) 396s ***** error ... 396s cdf (BurrDistribution, 2, "uper") 396s ***** error ... 396s cdf (BurrDistribution, 2, 3) 396s ***** shared x 396s rand ("seed", 4); 396s x = burrrnd (1, 1, 1, [1, 100]); 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha") 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", 0) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", 1) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", "") 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 396s "parameter", {"alpha", "c", "k", "param"}) 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "parameter", "param") 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 396s ***** error ... 396s paramci (BurrDistribution.fit (x), "NAME", "value") 397s ***** error ... 397s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 397s ***** error ... 397s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 397s "NAME", "value") 397s ***** error ... 397s plot (BurrDistribution, "Parent") 397s ***** error ... 397s plot (BurrDistribution, "PlotType", 12) 397s ***** error ... 397s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 397s ***** error ... 397s plot (BurrDistribution, "PlotType", "pdfcdf") 397s ***** error ... 397s plot (BurrDistribution, "Discrete", "pdfcdf") 397s ***** error ... 397s plot (BurrDistribution, "Discrete", [1, 0]) 397s ***** error ... 397s plot (BurrDistribution, "Discrete", {true}) 397s ***** error ... 397s plot (BurrDistribution, "Parent", 12) 397s ***** error ... 397s plot (BurrDistribution, "Parent", "hax") 397s ***** error ... 397s plot (BurrDistribution, "invalidNAME", "pdf") 397s ***** error ... 397s plot (BurrDistribution, "PlotType", "probability") 397s ***** error ... 397s proflik (BurrDistribution, 2) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 4) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), [1, 2]) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), {1}) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, ones (2)) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display") 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display", 1) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 397s ***** error ... 397s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 398s ***** error ... 398s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 398s ***** error ... 398s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 398s ***** error ... 398s truncate (BurrDistribution) 398s ***** error ... 398s truncate (BurrDistribution, 2) 398s ***** error ... 398s truncate (BurrDistribution, 4, 2) 398s ***** shared pd 398s pd = BurrDistribution(1, 1, 1); 398s pd(2) = BurrDistribution(1, 3, 1); 398s ***** error cdf (pd, 1) 398s ***** error icdf (pd, 0.5) 398s ***** error iqr (pd) 398s ***** error mean (pd) 398s ***** error median (pd) 398s ***** error negloglik (pd) 398s ***** error paramci (pd) 398s ***** error pdf (pd, 1) 398s ***** error plot (pd) 398s ***** error proflik (pd, 2) 398s ***** error random (pd) 398s ***** error std (pd) 398s ***** error ... 398s truncate (pd, 2, 4) 398s ***** error var (pd) 398s 104 tests, 104 passed, 0 known failure, 0 skipped 398s [inst/dist_obj/LoguniformDistribution.m] 398s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/LoguniformDistribution.m 398s ***** shared pd, t 398s pd = LoguniformDistribution (1, 4); 398s t = truncate (pd, 2, 4); 398s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 398s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 398s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 398s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 398s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 398s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 398s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 398s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 398s ***** assert (iqr (pd), 1.4142, 1e-4); 398s ***** assert (iqr (t), 0.9852, 1e-4); 398s ***** assert (mean (pd), 2.1640, 1e-4); 398s ***** assert (mean (t), 2.8854, 1e-4); 398s ***** assert (median (pd), 2); 398s ***** assert (median (t), 2.8284, 1e-4); 398s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 398s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 398s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 398s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 398s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 398s ***** assert (any (random (pd, 1000, 1) < 1), false); 398s ***** assert (any (random (pd, 1000, 1) > 4), false); 398s ***** assert (any (random (t, 1000, 1) < 2), false); 398s ***** assert (any (random (t, 1000, 1) > 4), false); 398s ***** assert (std (pd), 0.8527, 1e-4); 398s ***** assert (std (t), 0.5751, 1e-4); 398s ***** assert (var (pd), 0.7270, 1e-4); 398s ***** assert (var (t), 0.3307, 1e-4); 398s ***** error ... 398s LoguniformDistribution (i, 1) 398s ***** error ... 398s LoguniformDistribution (Inf, 1) 398s ***** error ... 398s LoguniformDistribution ([1, 2], 1) 398s ***** error ... 398s LoguniformDistribution ("a", 1) 398s ***** error ... 398s LoguniformDistribution (NaN, 1) 398s ***** error ... 398s LoguniformDistribution (1, i) 398s ***** error ... 398s LoguniformDistribution (1, Inf) 398s ***** error ... 398s LoguniformDistribution (1, [1, 2]) 398s ***** error ... 398s LoguniformDistribution (1, "a") 398s ***** error ... 398s LoguniformDistribution (1, NaN) 398s ***** error ... 398s LoguniformDistribution (2, 1) 398s ***** error ... 398s cdf (LoguniformDistribution, 2, "uper") 398s ***** error ... 398s cdf (LoguniformDistribution, 2, 3) 398s ***** error ... 398s plot (LoguniformDistribution, "Parent") 398s ***** error ... 398s plot (LoguniformDistribution, "PlotType", 12) 398s ***** error ... 398s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 398s ***** error ... 398s plot (LoguniformDistribution, "PlotType", "pdfcdf") 398s ***** error ... 398s plot (LoguniformDistribution, "Discrete", "pdfcdf") 398s ***** error ... 398s plot (LoguniformDistribution, "Discrete", [1, 0]) 398s ***** error ... 398s plot (LoguniformDistribution, "Discrete", {true}) 398s ***** error ... 398s plot (LoguniformDistribution, "Parent", 12) 398s ***** error ... 398s plot (LoguniformDistribution, "Parent", "hax") 398s ***** error ... 398s plot (LoguniformDistribution, "invalidNAME", "pdf") 398s ***** error ... 398s plot (LoguniformDistribution, "PlotType", "probability") 398s ***** error ... 398s truncate (LoguniformDistribution) 398s ***** error ... 398s truncate (LoguniformDistribution, 2) 398s ***** error ... 398s truncate (LoguniformDistribution, 4, 2) 398s ***** shared pd 398s pd = LoguniformDistribution(1, 4); 398s pd(2) = LoguniformDistribution(2, 5); 398s ***** error cdf (pd, 1) 398s ***** error icdf (pd, 0.5) 398s ***** error iqr (pd) 398s ***** error mean (pd) 398s ***** error median (pd) 398s ***** error pdf (pd, 1) 398s ***** error plot (pd) 398s ***** error random (pd) 398s ***** error std (pd) 398s ***** error ... 398s truncate (pd, 2, 4) 398s ***** error var (pd) 398s 65 tests, 65 passed, 0 known failure, 0 skipped 398s [inst/dist_obj/RicianDistribution.m] 398s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/RicianDistribution.m 398s ***** shared pd, t 398s pd = RicianDistribution; 398s t = truncate (pd, 2, 4); 398s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 398s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 398s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 398s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 398s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 398s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 398s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 398s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 398s ***** assert (iqr (pd), 1.0890, 1e-4); 398s ***** assert (iqr (t), 0.5928, 1e-4); 398s ***** assert (mean (pd), 1.5486, 1e-4); 398s ***** assert (mean (t), 2.5380, 1e-4); 398s ***** assert (median (pd), 1.4755, 1e-4); 398s ***** assert (median (t), 2.4341, 1e-4); 398s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 398s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 398s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 398s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 398s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 398s ***** assert (any (random (t, 1000, 1) < 2), false); 399s ***** assert (any (random (t, 1000, 1) > 4), false); 399s ***** assert (std (pd), 0.7758, 1e-4); 399s ***** assert (std (t), 0.4294, 1e-4); 399s ***** assert (var (pd), 0.6019, 1e-4); 399s ***** assert (var (t), 0.1844, 1e-4); 399s ***** error ... 399s RicianDistribution(-eps, 1) 399s ***** error ... 399s RicianDistribution(-1, 1) 399s ***** error ... 399s RicianDistribution(Inf, 1) 399s ***** error ... 399s RicianDistribution(i, 1) 399s ***** error ... 399s RicianDistribution("a", 1) 399s ***** error ... 399s RicianDistribution([1, 2], 1) 399s ***** error ... 399s RicianDistribution(NaN, 1) 399s ***** error ... 399s RicianDistribution(1, 0) 399s ***** error ... 399s RicianDistribution(1, -1) 399s ***** error ... 399s RicianDistribution(1, Inf) 399s ***** error ... 399s RicianDistribution(1, i) 399s ***** error ... 399s RicianDistribution(1, "a") 399s ***** error ... 399s RicianDistribution(1, [1, 2]) 399s ***** error ... 399s RicianDistribution(1, NaN) 399s ***** error ... 399s cdf (RicianDistribution, 2, "uper") 399s ***** error ... 399s cdf (RicianDistribution, 2, 3) 399s ***** shared x 399s x = gevrnd (1, 1, 1, [1, 100]); 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 0) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 1) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", "") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 399s "parameter", {"s", "sigma", "param"}) 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "parameter", "param") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "NAME", "value") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 399s ***** error ... 399s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 399s "NAME", "value") 399s ***** error ... 399s plot (RicianDistribution, "Parent") 399s ***** error ... 399s plot (RicianDistribution, "PlotType", 12) 399s ***** error ... 399s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 399s ***** error ... 399s plot (RicianDistribution, "PlotType", "pdfcdf") 399s ***** error ... 399s plot (RicianDistribution, "Discrete", "pdfcdf") 399s ***** error ... 399s plot (RicianDistribution, "Discrete", [1, 0]) 399s ***** error ... 399s plot (RicianDistribution, "Discrete", {true}) 399s ***** error ... 399s plot (RicianDistribution, "Parent", 12) 399s ***** error ... 399s plot (RicianDistribution, "Parent", "hax") 399s ***** error ... 399s plot (RicianDistribution, "invalidNAME", "pdf") 399s ***** error ... 399s plot (RicianDistribution, "PlotType", "probability") 399s ***** error ... 399s proflik (RicianDistribution, 2) 399s ***** error ... 399s proflik (RicianDistribution.fit (x), 3) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), [1, 2]) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), {1}) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, ones (2)) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display") 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display", 1) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 400s ***** error ... 400s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 400s ***** error ... 400s truncate (RicianDistribution) 400s ***** error ... 400s truncate (RicianDistribution, 2) 400s ***** error ... 400s truncate (RicianDistribution, 4, 2) 400s ***** shared pd 400s pd = RicianDistribution(1, 1); 400s pd(2) = RicianDistribution(1, 3); 400s ***** error cdf (pd, 1) 400s ***** error icdf (pd, 0.5) 400s ***** error iqr (pd) 400s ***** error mean (pd) 400s ***** error median (pd) 400s ***** error negloglik (pd) 400s ***** error paramci (pd) 400s ***** error pdf (pd, 1) 400s ***** error plot (pd) 400s ***** error proflik (pd, 2) 400s ***** error random (pd) 400s ***** error std (pd) 400s ***** error ... 400s truncate (pd, 2, 4) 400s ***** error var (pd) 400s 97 tests, 97 passed, 0 known failure, 0 skipped 400s [inst/dist_obj/WeibullDistribution.m] 400s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_obj/WeibullDistribution.m 400s ***** shared pd, t 400s pd = WeibullDistribution; 400s t = truncate (pd, 2, 4); 400s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 400s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 400s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 400s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 400s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 400s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 400s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 400s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 400s ***** assert (iqr (pd), 1.0986, 1e-4); 400s ***** assert (iqr (t), 0.8020, 1e-4); 400s ***** assert (mean (pd), 1, 1e-14); 400s ***** assert (mean (t), 2.6870, 1e-4); 400s ***** assert (median (pd), 0.6931, 1e-4); 400s ***** assert (median (t), 2.5662, 1e-4); 400s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 400s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 400s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 400s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 400s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 400s ***** assert (any (random (t, 1000, 1) < 2), false); 400s ***** assert (any (random (t, 1000, 1) > 4), false); 400s ***** assert (std (pd), 1, 1e-14); 400s ***** assert (std (t), 0.5253, 1e-4); 400s ***** assert (var (pd), 1, 1e-14); 400s ***** assert (var (t), 0.2759, 1e-4); 400s ***** error ... 400s WeibullDistribution(0, 1) 400s ***** error ... 400s WeibullDistribution(-1, 1) 400s ***** error ... 400s WeibullDistribution(Inf, 1) 400s ***** error ... 400s WeibullDistribution(i, 1) 400s ***** error ... 400s WeibullDistribution("a", 1) 400s ***** error ... 400s WeibullDistribution([1, 2], 1) 400s ***** error ... 400s WeibullDistribution(NaN, 1) 400s ***** error ... 400s WeibullDistribution(1, 0) 400s ***** error ... 400s WeibullDistribution(1, -1) 400s ***** error ... 400s WeibullDistribution(1, Inf) 400s ***** error ... 400s WeibullDistribution(1, i) 400s ***** error ... 400s WeibullDistribution(1, "a") 400s ***** error ... 400s WeibullDistribution(1, [1, 2]) 400s ***** error ... 400s WeibullDistribution(1, NaN) 400s ***** error ... 400s cdf (WeibullDistribution, 2, "uper") 400s ***** error ... 400s cdf (WeibullDistribution, 2, 3) 400s ***** shared x 400s x = wblrnd (1, 1, [1, 100]); 400s ***** error ... 400s paramci (WeibullDistribution.fit (x), "alpha") 400s ***** error ... 400s paramci (WeibullDistribution.fit (x), "alpha", 0) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", 1) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", "") 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 401s "parameter", {"lambda", "k", "param"}) 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "parameter", "param") 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "NAME", "value") 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 401s ***** error ... 401s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 401s "NAME", "value") 401s ***** error ... 401s plot (WeibullDistribution, "Parent") 401s ***** error ... 401s plot (WeibullDistribution, "PlotType", 12) 401s ***** error ... 401s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 401s ***** error ... 401s plot (WeibullDistribution, "PlotType", "pdfcdf") 401s ***** error ... 401s plot (WeibullDistribution, "Discrete", "pdfcdf") 401s ***** error ... 401s plot (WeibullDistribution, "Discrete", [1, 0]) 401s ***** error ... 401s plot (WeibullDistribution, "Discrete", {true}) 401s ***** error ... 401s plot (WeibullDistribution, "Parent", 12) 401s ***** error ... 401s plot (WeibullDistribution, "Parent", "hax") 401s ***** error ... 401s plot (WeibullDistribution, "invalidNAME", "pdf") 401s ***** error ... 401s plot (WeibullDistribution, "PlotType", "probability") 401s ***** error ... 401s proflik (WeibullDistribution, 2) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 3) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), [1, 2]) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), {1}) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, ones (2)) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display") 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 401s ***** error ... 401s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 401s ***** error ... 401s truncate (WeibullDistribution) 401s ***** error ... 401s truncate (WeibullDistribution, 2) 401s ***** error ... 401s truncate (WeibullDistribution, 4, 2) 401s ***** shared pd 401s pd = WeibullDistribution(1, 1); 401s pd(2) = WeibullDistribution(1, 3); 401s ***** error cdf (pd, 1) 401s ***** error icdf (pd, 0.5) 401s ***** error iqr (pd) 401s ***** error mean (pd) 401s ***** error median (pd) 401s ***** error negloglik (pd) 401s ***** error paramci (pd) 401s ***** error pdf (pd, 1) 401s ***** error plot (pd) 401s ***** error proflik (pd, 2) 401s ***** error random (pd) 401s ***** error std (pd) 401s ***** error ... 401s truncate (pd, 2, 4) 401s ***** error var (pd) 401s 97 tests, 97 passed, 0 known failure, 0 skipped 401s [inst/crossval.m] 401s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/crossval.m 401s ***** test 401s load fisheriris 401s y = meas(:, 1); 401s X = [ones(size(y)) meas(:, 2:4)]; 401s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 401s results0 = crossval (f, X, y); 401s results1 = crossval (f, X, y, 'KFold', 10); 401s folds = 5; 401s results2 = crossval (f, X, y, 'KFold', folds); 401s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 401s results4 = crossval (f, X, y, 'LeaveOut', 1); 401s mcreps = 2; n_holdout = 20; 401s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 401s 401s ## ensure equal representation of iris species in the training set -- tends 401s ## to slightly reduce cross-validation mean square error 401s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 401s 401s assert (results0, results1, 2e-15); 401s assert (results2, results3, 5e-17); 401s assert (size(results4), [1 numel(y)]); 401s assert (mean(results4), 0.1018, 1e-4); 401s assert (size(results5), [mcreps 1]); 401s warning: strmatch is obsolete; use strncmp or strcmp instead 401s 1 test, 1 passed, 0 known failure, 0 skipped 401s [inst/anova2.m] 401s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/anova2.m 401s ***** demo 401s 401s # Factorial (Crossed) Two-way ANOVA with Interaction 401s 401s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 401s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 401s 401s [p, atab, stats] = anova2(popcorn, 3, "on"); 401s ***** demo 401s 401s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 401s 401s data = [54, 43, 78, 111; 401s 23, 34, 37, 41; 401s 45, 65, 99, 78; 401s 31, 33, 36, 35; 401s 15, 25, 30, 26]; 401s 401s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 401s ***** demo 401s 401s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 401s 401s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 401s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 401s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 401s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 401s 401s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 401s ***** test 401s ## Test for anova2 ("interaction") 401s ## comparison with results from Matlab for column effect 401s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 401s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 401s [p, atab, stats] = anova2 (popcorn, 3, "off"); 401s assert (p(1), 7.678957383294716e-07, 1e-14); 401s assert (p(2), 0.0001003738963050171, 1e-14); 401s assert (p(3), 0.7462153966366274, 1e-14); 401s assert (atab{2,5}, 56.700, 1e-14); 401s assert (atab{2,3}, 2, 0); 401s assert (atab{4,2}, 0.08333333333333348, 1e-14); 401s assert (atab{5,4}, 0.1388888888888889, 1e-14); 401s assert (atab{5,2}, 1.666666666666667, 1e-14); 401s assert (atab{6,2}, 22); 401s assert (stats.source, "anova2"); 401s assert (stats.colmeans, [6.25, 4.75, 4]); 401s assert (stats.inter, 1, 0); 401s assert (stats.pval, 0.7462153966366274, 1e-14); 401s assert (stats.df, 12); 401s ***** test 401s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 401s data = [54, 43, 78, 111; 401s 23, 34, 37, 41; 401s 45, 65, 99, 78; 401s 31, 33, 36, 35; 401s 15, 25, 30, 26]; 401s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 401s assert (atab{2,2}, 2174.95, 1e-10); 401s assert (atab{3,2}, 8371.7, 1e-10); 401s assert (atab{4,2}, 2404.3, 1e-10); 401s assert (atab{5,2}, 12950.95, 1e-10); 401s assert (atab{2,4}, 724.983333333333, 1e-10); 401s assert (atab{3,4}, 2092.925, 1e-10); 401s assert (atab{4,4}, 200.358333333333, 1e-10); 401s assert (atab{2,5}, 3.61843363972882, 1e-10); 401s assert (atab{3,5}, 10.445909412303, 1e-10); 401s assert (atab{2,6}, 0.087266112738617, 1e-10); 401s assert (atab{3,6}, 0.000698397753556, 1e-10); 401s ***** test 401s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 401s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 401s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 401s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 401s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 401s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 401s assert (atab{2,2}, 745.360306290833, 1e-10); 401s assert (atab{3,2}, 278.01854140125, 1e-10); 401s assert (atab{4,2}, 180.180377467501, 1e-10); 401s assert (atab{5,2}, 1203.55922515958, 1e-10); 401s assert (atab{2,4}, 372.680153145417, 1e-10); 401s assert (atab{3,4}, 92.67284713375, 1e-10); 401s assert (atab{4,4}, 10.0100209704167, 1e-10); 401s assert (atab{2,5}, 4.02146005730833, 1e-10); 401s assert (atab{3,5}, 9.25800729165627, 1e-10); 401s assert (atab{2,6}, 0.141597630656771, 1e-10); 401s assert (atab{3,6}, 0.000636643812875719, 1e-10); 401s 3 tests, 3 passed, 0 known failure, 0 skipped 401s [inst/confusionchart.m] 401s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/confusionchart.m 401s ***** demo 401s ## Setting the chart properties 401s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 401s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 401s confusionchart (Yt, Yp, "Title", ... 401s "Demonstration with summaries","Normalization",... 401s "absolute","ColumnSummary", "column-normalized","RowSummary",... 401s "row-normalized") 401s ***** demo 401s ## Cellstr as inputs 401s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 401s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 401s m = confusionmat (Yt, Yp); 401s confusionchart (m, {"Positive", "Negative"}); 401s ***** demo 401s ## Editing the object properties 401s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 401s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 401s cm = confusionchart (Yt, Yp); 401s cm.Title = "This is an example with a green diagonal"; 401s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 401s ***** demo 401s ## Confusion chart in a uipanel 401s h = uipanel (); 401s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 401s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 401s cm = confusionchart (h, Yt, Yp); 401s ***** demo 401s ## Sorting classes 401s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 401s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 401s cm = confusionchart (Yt, Yp, "Title", ... 401s "Classes are sorted in ascending order"); 401s cm = confusionchart (Yt, Yp, "Title", ... 401s "Classes are sorted according to clusters"); 401s sortClasses (cm, "cluster"); 401s ***** shared visibility_setting 401s visibility_setting = get (0, "DefaultFigureVisible"); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ()", "Invalid call"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 401s ".* YLabel .* string"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 401s set (0, "DefaultFigureVisible", visibility_setting); 401s ***** test 401s set (0, "DefaultFigureVisible", "off"); 401s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 401s ".* FontName .* string"); 401s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 402s ".* FontSize .* numeric"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 402s ".* DiagonalColor .* color"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 402s ".* OffDiagonalColor .* color"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 402s ".* invalid .* Normalization"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 402s ".* invalid .* ColumnSummary"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 402s ".* invalid .* RowSummary"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 402s ".* invalid .* GridVisible"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 402s ".* invalid .* HandleVisibility"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 402s ".* invalid .* OuterPosition"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 402s ".* invalid .* Position"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s ***** test 402s set (0, "DefaultFigureVisible", "off"); 402s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 402s set (0, "DefaultFigureVisible", visibility_setting); 402s 18 tests, 18 passed, 0 known failure, 0 skipped 402s [inst/regression_ttest.m] 403s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/regression_ttest.m 403s ***** error regression_ttest (); 403s ***** error regression_ttest (1); 403s ***** error ... 403s regression_ttest ([1 2 NaN]', [2 3 4]'); 403s ***** error ... 403s regression_ttest ([1 2 Inf]', [2 3 4]'); 403s ***** error ... 403s regression_ttest ([1 2 3+i]', [2 3 4]'); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 NaN]'); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 Inf]'); 403s ***** error ... 403s regression_ttest ([1 2 3]', [3 4 3+i]'); 403s ***** error ... 403s regression_ttest ([1 2 3]', [3 4 4 5]'); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 403s ***** error ... 403s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 403s 16 tests, 16 passed, 0 known failure, 0 skipped 403s [inst/tiedrank.m] 403s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/tiedrank.m 403s ***** test 403s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 403s assert (r, [1, 2.5, 4, 5, 2.5]); 403s assert (tieadj, 3); 403s ***** test 403s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 403s assert (r, [1; 2.5; 4; 5; 2.5]); 403s assert (tieadj, 3); 403s ***** test 403s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 403s assert (r, [1, 2.5, 4, 5, 2.5]); 403s assert (tieadj, [1; 0; 18]); 403s ***** test 403s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 403s assert (r, [1, 2.5, 2, 1, 2.5]); 403s assert (tieadj, 3); 403s ***** test 403s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 403s assert (r, [1, 2.5, 2, 1, 2.5]); 403s assert (tieadj, [1; 0; 18]); 403s ***** error tiedrank (ones (2)) 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], "A") 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], [true, true]) 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], 0, "A") 403s ***** error ... 403s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 403s 12 tests, 12 passed, 0 known failure, 0 skipped 403s [inst/dendrogram.m] 403s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dendrogram.m 403s ***** demo 403s ## simple dendrogram 403s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 403s y(:,3) = 1:5; 403s dendrogram (y); 403s title ("simple dendrogram"); 403s ***** demo 403s ## another simple dendrogram 403s v = 2 * rand (30, 1) - 1; 403s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 403s y = linkage (squareform (d, "tovector")); 403s dendrogram (y); 403s title ("another simple dendrogram"); 403s ***** demo 403s ## collapsed tree, find all the leaves of node 5 403s X = randn (60, 2); 403s D = pdist (X); 403s y = linkage (D, "average"); 403s subplot (2, 1, 1); 403s title ("original tree"); 403s dendrogram (y, 0); 403s subplot (2, 1, 2); 403s title ("collapsed tree"); 403s [~, t] = dendrogram (y, 20); 403s find(t == 5) 403s ***** demo 403s ## optimal leaf order 403s X = randn (30, 2); 403s D = pdist (X); 403s y = linkage (D, "average"); 403s order = optimalleaforder (y, D); 403s subplot (2, 1, 1); 403s title ("original leaf order"); 403s dendrogram (y); 403s subplot (2, 1, 2); 403s title ("optimal leaf order"); 403s dendrogram (y, "Reorder", order); 403s ***** demo 403s ## horizontal orientation and labels 403s X = randn (8, 2); 403s D = pdist (X); 403s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 403s "Sneezy"; "Dopey"]; 403s y = linkage (D, "average"); 403s dendrogram (y, "Orientation", "left", "Labels", L); 403s title ("horizontal orientation and labels"); 403s ***** shared visibility_setting 403s visibility_setting = get (0, "DefaultFigureVisible"); 403s ***** test 403s hf = figure ("visible", "off"); 403s unwind_protect 403s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 403s y(:,3) = 1:5; 403s dendrogram (y); 403s unwind_protect_cleanup 403s close (hf); 403s end_unwind_protect 403s ***** test 403s hf = figure ("visible", "off"); 403s unwind_protect 403s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 403s y(:,3) = 1:5; 403s dendrogram (y); 403s unwind_protect_cleanup 403s close (hf); 403s end_unwind_protect 403s ***** test 403s hf = figure ("visible", "off"); 403s unwind_protect 403s v = 2 * rand (30, 1) - 1; 403s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 403s y = linkage (squareform (d, "tovector")); 403s dendrogram (y); 403s unwind_protect_cleanup 403s close (hf); 403s end_unwind_protect 404s ***** test 404s hf = figure ("visible", "off"); 404s unwind_protect 404s X = randn (30, 2); 404s D = pdist (X); 404s y = linkage (D, "average"); 404s order = optimalleaforder (y, D); 404s subplot (2, 1, 1); 404s title ("original leaf order"); 404s dendrogram (y); 404s subplot (2, 1, 2); 404s title ("optimal leaf order"); 404s dendrogram (y, "Reorder", order); 404s unwind_protect_cleanup 404s close (hf); 404s end_unwind_protect 405s ***** error dendrogram (); 405s ***** error dendrogram (ones (2, 2), 1); 405s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 405s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 405s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 405s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 405s 9 tests, 9 passed, 0 known failure, 0 skipped 405s [inst/linkage.m] 405s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/linkage.m 405s ***** shared x, t 405s x = reshape (mod (magic (6),5), [], 3); 405s t = 1e-6; 405s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 405s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 405s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 405s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 405s lastwarn(); # Clear last warning before the test 405s ***** warning linkage (pdist (x), "centroid"); 405s ***** test 405s warning off Octave:clustering 405s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 405s warning on Octave:clustering 405s ***** warning linkage (pdist (x), "median"); 405s ***** test 405s warning off Octave:clustering 405s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 405s warning on Octave:clustering 405s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 405s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 405s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 405s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 405s 12 tests, 12 passed, 0 known failure, 0 skipped 405s [inst/hotelling_t2test2.m] 405s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hotelling_t2test2.m 405s ***** error hotelling_t2test2 (); 405s ***** error ... 405s hotelling_t2test2 ([2, 3, 4, 5, 6]); 406s ***** error ... 406s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 406s ***** error ... 406s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 406s ***** error ... 406s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 406s ***** error ... 406s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 406s ***** error ... 406s hotelling_t2test2 (ones (20,1), ones (20,2)); 406s ***** error ... 406s hotelling_t2test2 (ones (20,2), ones (25,3)); 406s ***** test 406s randn ("seed", 1); 406s x1 = randn (60000, 5); 406s randn ("seed", 5); 406s x2 = randn (30000, 5); 406s [h, pval, stats] = hotelling_t2test2 (x1, x2); 406s assert (h, 0); 406s assert (stats.df1, 5); 406s assert (stats.df2, 89994); 406s 14 tests, 14 passed, 0 known failure, 0 skipped 406s [inst/chi2gof.m] 406s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/chi2gof.m 406s ***** demo 406s x = normrnd (50, 5, 100, 1); 406s [h, p, stats] = chi2gof (x) 406s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 406s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 406s ***** demo 406s x = rand (100,1 ); 406s n = length (x); 406s binedges = linspace (0, 1, 11); 406s expectedCounts = n * diff (binedges); 406s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 406s ***** demo 406s bins = 0:5; 406s obsCounts = [6 16 10 12 4 2]; 406s n = sum(obsCounts); 406s lambdaHat = sum(bins.*obsCounts) / n; 406s expCounts = n * poisspdf(bins,lambdaHat); 406s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 406s "expected", expCounts, "nparams",1) 406s ***** error chi2gof () 406s ***** error chi2gof ([2,3;3,4]) 406s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 406s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 406s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 406s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 406s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 406s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 406s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 406s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 406s ***** test 406s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 406s [h, p, stats] = chi2gof (x); 406s assert (h, 0); 406s assert (p, NaN); 406s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 406s assert (stats.df, 0); 406s assert (stats.edges, [1, 2.5, 4], 1e-14); 406s assert (stats.O, [7, 5], 1e-14); 406s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 406s 11 tests, 11 passed, 0 known failure, 0 skipped 406s [inst/ranksum.m] 406s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ranksum.m 406s ***** test 406s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 406s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 406s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 406s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 406s assert (p, 0.004329004329004329, 1e-14); 406s assert (h, true); 406s assert (stats.ranksum, 21.5); 406s ***** test 406s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 406s 49 47 50 60 59 60 62 61 71]'; 406s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 406s 54 50 53 62 62 62 72 60 67]'; 406s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 406s assert (p, 0.1270832752950605, 1e-14); 406s assert (h, false); 406s assert (stats.ranksum, 837.5); 406s assert (stats.zval, -1.140287483634606, 1e-14); 406s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 406s "method", "exact"); 406s assert (p, 0.127343916432862, 1e-14); 406s assert (h, false); 406s assert (stats.ranksum, 837.5); 415s 2 tests, 2 passed, 0 known failure, 0 skipped 415s [inst/ridge.m] 415s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ridge.m 415s ***** demo 415s ## Perform ridge regression for a range of ridge parameters and observe 415s ## how the coefficient estimates change based on the acetylene dataset. 415s 415s load acetylene 415s 415s X = [x1, x2, x3]; 415s 415s x1x2 = x1 .* x2; 415s x1x3 = x1 .* x3; 415s x2x3 = x2 .* x3; 415s 415s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 415s 415s k = 0:1e-5:5e-3; 415s 415s b = ridge (y, D, k); 415s 415s figure 415s plot (k, b, "LineWidth", 2) 415s ylim ([-100, 100]) 415s grid on 415s xlabel ("Ridge Parameter") 415s ylabel ("Standardized Coefficient") 415s title ("Ridge Trace") 415s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 415s 415s ***** demo 415s 415s load carbig 415s X = [Acceleration Weight Displacement Horsepower]; 415s y = MPG; 415s 415s n = length(y); 415s 415s rand("seed",1); % For reproducibility 415s 415s c = cvpartition(n,'HoldOut',0.3); 415s idxTrain = training(c,1); 415s idxTest = ~idxTrain; 415s 415s idxTrain = training(c,1); 415s idxTest = ~idxTrain; 415s 415s k = 5; 415s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 415s 415s % Predict MPG values for the test data using the model. 415s yhat = b(1) + X(idxTest,:)*b(2:end); 415s scatter(y(idxTest),yhat) 415s 415s hold on 415s plot(y(idxTest),y(idxTest),"r") 415s xlabel('Actual MPG') 415s ylabel('Predicted MPG') 415s hold off 415s 415s ***** test 415s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 415s assert (b, [0.5533; 0.5533], 1e-4); 415s ***** test 415s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 415s assert (b, [0.4841; 0.4841], 1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0); 415s assert (b,[10.2273;1.97128;-0.601818],1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0.0005); 415s assert (b,[10.2233;1.9712;-0.6056],1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0.001); 415s assert (b,[10.2194;1.9711;-0.6094],1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0.002); 415s assert (b,[10.2116;1.9709;-0.6169],1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0.005); 415s assert (b,[10.1882;1.9704;-0.6393],1e-4); 415s ***** test 415s load acetylene 415s x = [x1, x2, x3]; 415s b = ridge (y, x, 0.01); 415s assert (b,[10.1497;1.9695;-0.6761],1e-4); 415s ***** error ridge (1) 415s ***** error ridge (1, 2) 415s ***** error ridge (ones (3), ones (3), 2) 415s ***** error ridge ([1, 2], ones (2), 2) 415s ***** error ridge ([], ones (3), 2) 415s ***** error ridge (ones (5,1), [], 2) 415s ***** error ... 415s ridge ([1; 2; 3; 4; 5], ones (3), 3) 415s ***** error ... 415s ridge ([1; 2; 3], ones (3), 3, 2) 415s ***** error ... 415s ridge ([1; 2; 3], ones (3), 3, "some") 415s 17 tests, 17 passed, 0 known failure, 0 skipped 415s [inst/vartest.m] 415s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/vartest.m 415s ***** error vartest (); 415s ***** error vartest ([1, 2, 3, 4], -0.5); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 0); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "tail", "val"); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "dim", 3); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 415s ***** error ... 415s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 415s ***** test 415s load carsmall 415s [h, pval, ci] = vartest (MPG, 7^2); 415s assert (h, 1); 415s assert (pval, 0.04335086742174443, 1e-14); 415s assert (ci, [49.397; 88.039], 1e-3); 415s 12 tests, 12 passed, 0 known failure, 0 skipped 415s [inst/inconsistent.m] 415s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/inconsistent.m 415s ***** error inconsistent () 415s ***** error inconsistent ([1 2 1], 2, 3) 415s ***** error inconsistent (ones (2, 2)) 415s ***** error inconsistent ([1 2 1], -1) 415s ***** error inconsistent ([1 2 1], 1.3) 415s ***** error inconsistent ([1 2 1], [1 1]) 415s ***** error inconsistent (ones (2, 3)) 415s ***** test 415s load fisheriris; 415s Z = linkage(meas, 'average', 'chebychev'); 415s assert (cond (inconsistent (Z)), 39.9, 1e-3); 415s 8 tests, 8 passed, 0 known failure, 0 skipped 415s [inst/crosstab.m] 415s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/crosstab.m 415s ***** error crosstab () 415s ***** error crosstab (1) 416s ***** error crosstab (ones (2), [1 1]) 416s ***** error crosstab ([1 1], ones (2)) 416s ***** error crosstab ([1], [1 2]) 416s ***** error crosstab ([1 2], [1]) 416s ***** test 416s load carbig 416s [table, chisq, p, labels] = crosstab (cyl4, when, org); 416s assert (table(2,3,1), 38); 416s assert (labels{3,3}, "Japan"); 416s ***** test 416s load carbig 416s [table, chisq, p, labels] = crosstab (cyl4, when, org); 416s assert (table(2,3,2), 17); 416s assert (labels{1,3}, "USA"); 416s 8 tests, 8 passed, 0 known failure, 0 skipped 416s [inst/Regression/RegressionGAM.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Regression/RegressionGAM.m 416s ***** demo 416s ## Train a RegressionGAM Model for synthetic values 416s f1 = @(x) cos (3 * x); 416s f2 = @(x) x .^ 3; 416s x1 = 2 * rand (50, 1) - 1; 416s x2 = 2 * rand (50, 1) - 1; 416s y = f1(x1) + f2(x2); 416s y = y + y .* 0.2 .* rand (50,1); 416s X = [x1, x2]; 416s a = fitrgam (X, y, "tol", 1e-3) 416s ***** demo 416s ## Declare two different functions 416s f1 = @(x) cos (3 * x); 416s f2 = @(x) x .^ 3; 416s 416s ## Generate 80 samples for f1 and f2 416s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 416s X1 = f1 (x); 416s X2 = f2 (x); 416s 416s ## Create a synthetic response by adding noise 416s rand ("seed", 3); 416s Ytrue = X1 + X2; 416s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 416s 416s ## Assemble predictor data 416s X = [X1, X2]; 416s 416s ## Train the GAM and test on the same data 416s a = fitrgam (X, Y, "order", [5, 5]); 416s [ypred, ySDsd, yInt] = predict (a, X); 416s 416s ## Plot the results 416s figure 416s [sortedY, indY] = sort (Ytrue); 416s plot (sortedY, "r-"); 416s xlim ([0, 80]); 416s hold on 416s plot (ypred(indY), "g+") 416s plot (yInt(indY,1), "k:") 416s plot (yInt(indY,2), "k:") 416s xlabel ("Predictor samples"); 416s ylabel ("Response"); 416s title ("actual vs predicted values for function f1(x) = cos (3x) "); 416s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 416s 416s ## Use 30% Holdout partitioning for training and testing data 416s C = cvpartition (80, "HoldOut", 0.3); 416s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 416s 416s ## Plot the results 416s figure 416s [sortedY, indY] = sort (Ytrue(test(C))); 416s plot (sortedY, 'r-'); 416s xlim ([0, sum(test(C))]); 416s hold on 416s plot (ypred(indY), "g+") 416s plot (yInt(indY,1),'k:') 416s plot (yInt(indY,2),'k:') 416s xlabel ("Predictor samples"); 416s ylabel ("Response"); 416s title ("actual vs predicted values for function f1(x) = cos (3x) "); 416s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 416s ***** test 416s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 416s y = [1; 2; 3; 4]; 416s a = RegressionGAM (x, y); 416s assert ({a.X, a.Y}, {x, y}) 416s assert ({a.BaseModel.Intercept}, {2.5000}) 416s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 416s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 416s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 416s assert ({a.Formula}, {[]}) 416s ***** test 416s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 416s y = [1; 2; 3; 4]; 416s pnames = {"A", "B", "C", "D"}; 416s formula = "Y ~ A + B + C + D + A:C"; 416s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 416s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 416s assert ({a.IntMatrix}, {intMat}) 416s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 416s assert ({a.Formula}, {formula}) 416s ***** error RegressionGAM () 416s ***** error RegressionGAM (ones(10,2)) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (5,1)) 416s ***** error ... 416s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 416s ***** error 416s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 416s ***** error 416s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 416s ***** error ... 416s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 416s ***** error ... 416s predict (RegressionGAM (ones(10,1), ones(10,1))) 416s ***** error ... 416s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 416s ***** error ... 416s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 416s 39 tests, 39 passed, 0 known failure, 0 skipped 416s [inst/kstest2.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/kstest2.m 416s ***** error kstest2 ([1,2,3,4,5,5]) 416s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 416s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 416s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 416s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 416s ***** test 416s load examgrades 416s [h, p] = kstest2 (grades(:,1), grades(:,2)); 416s assert (h, false); 416s assert (p, 0.1222791870137312, 1e-14); 416s ***** test 416s load examgrades 416s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 416s assert (h, false); 416s assert (p, 0.1844421391011258, 1e-14); 416s ***** test 416s load examgrades 416s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 416s assert (h, false); 416s assert (p, 0.06115357930171663, 1e-14); 416s ***** test 416s load examgrades 416s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 416s assert (h, true); 416s assert (p, 0.06115357930171663, 1e-14); 416s 14 tests, 14 passed, 0 known failure, 0 skipped 416s [inst/@cvpartition/test.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/test.m 416s ***** shared C 416s C = cvpartition (ones (10, 1), "KFold", 5); 416s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 416s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 416s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 416s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 416s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 416s ***** test 416s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 416s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 416s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 416s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 416s 9 tests, 9 passed, 0 known failure, 0 skipped 416s [inst/@cvpartition/cvpartition.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/cvpartition.m 416s ***** demo 416s ## Partition with Fisher iris dataset (n = 150) 416s ## Stratified by species 416s load fisheriris 416s y = species; 416s ## 10-fold cross-validation partition 416s c = cvpartition (species, 'KFold', 10) 416s ## leave-10-out partition 416s c1 = cvpartition (species, 'HoldOut', 10) 416s idx1 = test (c, 2); 416s idx2 = training (c, 2); 416s ## another leave-10-out partition 416s c2 = repartition (c1) 416s ***** test 416s C = cvpartition (ones (10, 1)); 416s assert (isa (C, "cvpartition"), true); 416s ***** test 416s C = cvpartition (ones (10, 1), "KFold", 5); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 5); 416s assert (get (C, "TrainSize"), ones(5,1) * 8); 416s assert (get (C, "TestSize"), ones (5,1) * 2); 416s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 416s assert (get (C, "Type"), "kfold"); 416s ***** test 416s C = cvpartition (ones (10, 1), "KFold", 2); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 2); 416s assert (get (C, "TrainSize"), [5; 5]); 416s assert (get (C, "TestSize"), [5; 5]); 416s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 416s assert (get (C, "Type"), "kfold"); 416s ***** test 416s C = cvpartition (ones (10, 1), "HoldOut", 5); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 1); 416s assert (get (C, "TrainSize"), 5); 416s assert (get (C, "TestSize"), 5); 416s assert (class (get (C, "inds")), "logical"); 416s assert (length (get (C, "inds")), 10); 416s assert (get (C, "Type"), "holdout"); 416s ***** test 416s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 10); 416s assert (get (C, "TrainSize"), ones (10, 1)); 416s assert (get (C, "TestSize"), ones (10, 1) * 9); 416s assert (get (C, "inds"), []); 416s assert (get (C, "Type"), "leaveout"); 416s ***** test 416s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 1); 416s assert (get (C, "TrainSize"), 10); 416s assert (get (C, "TestSize"), 10); 416s assert (get (C, "inds"), []); 416s assert (get (C, "Type"), "resubstitution"); 416s ***** test 416s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 416s assert (get (C, "NumObservations"), 10); 416s assert (get (C, "NumTestSets"), 10); 416s assert (get (C, "TrainSize"), ones (10, 1) * 9); 416s assert (get (C, "TestSize"), ones (10, 1)); 416s assert (get (C, "inds"), [1:10]'); 416s assert (get (C, "Type"), "given"); 416s ***** warning ... 416s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 416s 8 tests, 8 passed, 0 known failure, 0 skipped 416s [inst/@cvpartition/set.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/set.m 416s ***** shared C 416s C = cvpartition (ones (10, 1), "KFold", 5); 416s ***** test 416s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 416s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 416s ***** error set (C) 416s ***** error set (C, "NumObservations") 416s ***** error set (C, "some", 15) 416s ***** error set (C, 15, 15) 416s 5 tests, 5 passed, 0 known failure, 0 skipped 416s [inst/@cvpartition/display.m] 416s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/display.m 416s ***** test 416s C = cvpartition (ones (10, 1), "KFold", 5); 416s s = evalc ("display (C)"); 416s sout = "K-fold cross validation partition"; 416s assert (strcmpi (s(1:length (sout)), sout), true); 416s ***** test 416s C = cvpartition (ones (10, 1), "HoldOut", 5); 416s s = evalc ("display (C)"); 416s sout = "HoldOut cross validation partition"; 416s assert (strcmpi (s(1:length (sout)), sout), true); 416s ***** test 416s C = cvpartition (ones (10, 1), "LeaveOut", 5); 416s s = evalc ("display (C)"); 416s sout = "Leave-One-Out cross validation partition"; 416s assert (strcmpi (s(1:length (sout)), sout), true); 416s ***** test 416s C = cvpartition (ones (10, 1), "resubstitution", 5); 416s s = evalc ("display (C)"); 416s sout = "Resubstitution cross validation partition"; 416s assert (strcmpi (s(1:length (sout)), sout), true); 416s ***** test 416s C = cvpartition (ones (10, 1), "Given", 5); 416s s = evalc ("display (C)"); 416s sout = "Given cross validation partition"; 416s assert (strcmpi (s(1:length (sout)), sout), true); 416s ***** error display () 416s 6 tests, 6 passed, 0 known failure, 0 skipped 416s [inst/@cvpartition/repartition.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/repartition.m 417s ***** test 417s C = cvpartition (ones (10, 1), "KFold", 5); 417s Cnew = repartition (C); 417s assert (isa (Cnew, "cvpartition"), true); 417s ***** test 417s C = cvpartition (ones (100, 1), "HoldOut", 5); 417s Cnew = repartition (C); 417s indC = get (C, "inds"); 417s indCnew = get (Cnew, "inds"); 417s assert (isequal (indC, indCnew), false); 417s 2 tests, 2 passed, 0 known failure, 0 skipped 417s [inst/@cvpartition/get.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/get.m 417s ***** shared C 417s C = cvpartition (ones (10, 1), "KFold", 5); 417s ***** assert (get (C, "NumObservations"), 10); 417s ***** assert (get (C, "NumTestSets"), 5); 417s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 417s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 417s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 417s ***** assert (get (C, "Type"), "kfold"); 417s ***** error get (C, "some") 417s ***** error get (C, 25) 417s ***** error get (C, {25}) 417s 9 tests, 9 passed, 0 known failure, 0 skipped 417s [inst/@cvpartition/training.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/@cvpartition/training.m 417s ***** shared C 417s C = cvpartition (ones (10, 1), "KFold", 5); 417s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 417s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 417s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 417s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 417s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 417s ***** test 417s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 417s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 417s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 417s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 417s 9 tests, 9 passed, 0 known failure, 0 skipped 417s [inst/probit.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/probit.m 417s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 417s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 417s ***** error probit () 417s ***** error probit (1, 2) 417s 4 tests, 4 passed, 0 known failure, 0 skipped 417s [inst/signtest.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/signtest.m 417s ***** test 417s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 417s assert (pval, 1.091701889420221e-218, 1e-14); 417s assert (h, 1); 417s assert (stats.zval, -31.5437631079266, 1e-14); 417s ***** test 417s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 417s assert (pval, 0.6875000000000006, 1e-14); 417s assert (h, 0); 417s assert (stats.zval, NaN); 417s assert (stats.sign, 4); 417s ***** test 417s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 417s assert (pval, 0.6830913983096086, 1e-14); 417s assert (h, 0); 417s assert (stats.zval, 0.4082482904638631, 1e-14); 417s assert (stats.sign, 4); 417s ***** error signtest (ones (2)) 417s ***** error ... 417s signtest ([1, 2, 3, 4], ones (2)) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [1, 2, 3]) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'tail') 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'alpha', 0) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'alpha', "a") 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'tail', "some") 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'method', 0.01) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'method', "some") 417s ***** error ... 417s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 417s 20 tests, 20 passed, 0 known failure, 0 skipped 417s [inst/cl_multinom.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cl_multinom.m 417s ***** demo 417s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 417s ***** error cl_multinom (); 417s ***** error cl_multinom (1, 2, 3, 4, 5); 417s ***** error ... 417s cl_multinom (1, 2, 3, 4); 417s ***** error ... 417s cl_multinom (1, 2, 3, "some string"); 417s 4 tests, 4 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/unidstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/unidstat.m 417s ***** error unidstat () 417s ***** error unidstat ({}) 417s ***** error unidstat ("") 417s ***** error unidstat (i) 417s ***** test 417s N = 1:6; 417s [m, v] = unidstat (N); 417s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 417s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 417s assert (m, expected_m, 0.001); 417s assert (v, expected_v, 0.001); 417s 5 tests, 5 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/nctstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/nctstat.m 417s ***** error nctstat () 417s ***** error nctstat (1) 417s ***** error nctstat ({}, 2) 417s ***** error nctstat (1, "") 417s ***** error nctstat (i, 2) 417s ***** error nctstat (1, i) 417s ***** error ... 417s nctstat (ones (3), ones (2)) 417s ***** error ... 417s nctstat (ones (2), ones (3)) 417s ***** shared df, mu 417s df = [2, 0, -1, 1, 4]; 417s mu = [1, NaN, 3, -1, 2]; 417s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 417s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 417s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 417s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 417s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 417s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 417s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 417s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 417s 16 tests, 16 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/fstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/fstat.m 417s ***** error fstat () 417s ***** error fstat (1) 417s ***** error fstat ({}, 2) 417s ***** error fstat (1, "") 417s ***** error fstat (i, 2) 417s ***** error fstat (1, i) 417s ***** error ... 417s fstat (ones (3), ones (2)) 417s ***** error ... 417s fstat (ones (2), ones (3)) 417s ***** test 417s df1 = 1:6; 417s df2 = 5:10; 417s [m, v] = fstat (df1, df2); 417s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 417s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 417s assert (m, expected_mn, 0.001); 417s assert (v, expected_v, 0.001); 417s ***** test 417s df1 = 1:6; 417s [m, v] = fstat (df1, 5); 417s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 417s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 417s assert (m, expected_mn, 0.001); 417s assert (v, expected_v, 0.001); 417s 10 tests, 10 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/expstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/expstat.m 417s ***** error expstat () 417s ***** error expstat ({}) 417s ***** error expstat ("") 417s ***** error expstat (i) 417s ***** test 417s mu = 1:6; 417s [m, v] = expstat (mu); 417s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 417s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 417s 5 tests, 5 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/gevstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/gevstat.m 417s ***** error gevstat () 417s ***** error gevstat (1) 417s ***** error gevstat (1, 2) 417s ***** error gevstat ({}, 2, 3) 417s ***** error gevstat (1, "", 3) 417s ***** error gevstat (1, 2, "") 417s ***** error gevstat (i, 2, 3) 417s ***** error gevstat (1, i, 3) 417s ***** error gevstat (1, 2, i) 417s ***** error ... 417s gevstat (ones (3), ones (2), 3) 417s ***** error ... 417s gevstat (ones (2), 2, ones (3)) 417s ***** error ... 417s gevstat (1, ones (2), ones (3)) 417s ***** test 417s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 417s sigma = 2; 417s mu = 1; 417s [m, v] = gevstat (k, sigma, mu); 417s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 417s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 417s assert (m, expected_m, -0.001); 417s assert (v, expected_v, -0.001); 417s 13 tests, 13 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/loglstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/loglstat.m 417s ***** error loglstat () 417s ***** error loglstat (1) 417s ***** error loglstat ({}, 2) 417s ***** error loglstat (1, "") 417s ***** error loglstat (i, 2) 417s ***** error loglstat (1, i) 417s ***** error ... 417s loglstat (ones (3), ones (2)) 417s ***** error ... 417s loglstat (ones (2), ones (3)) 417s ***** test 417s [m, v] = loglstat (0, 1); 417s assert (m, Inf, 0.001); 417s assert (v, Inf, 0.001); 417s ***** test 417s [m, v] = loglstat (0, 0.8); 417s assert (m, 4.2758, 0.001); 417s assert (v, Inf, 0.001); 417s ***** test 417s [m, v] = loglstat (0, 0.6); 417s assert (m, 1.9820, 0.001); 417s assert (v, Inf, 0.001); 417s ***** test 417s [m, v] = loglstat (0, 0.4); 417s assert (m, 1.3213, 0.001); 417s assert (v, 2.5300, 0.001); 417s ***** test 417s [m, v] = loglstat (0, 0.2); 417s assert (m, 1.0690, 0.001); 417s assert (v, 0.1786, 0.001); 417s 13 tests, 13 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/nakastat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/nakastat.m 417s ***** error nakastat () 417s ***** error nakastat (1) 417s ***** error nakastat ({}, 2) 417s ***** error nakastat (1, "") 417s ***** error nakastat (i, 2) 417s ***** error nakastat (1, i) 417s ***** error ... 417s nakastat (ones (3), ones (2)) 417s ***** error ... 417s nakastat (ones (2), ones (3)) 417s ***** test 417s [m, v] = nakastat (1, 1); 417s assert (m, 0.8862269254, 1e-10); 417s assert (v, 0.2146018366, 1e-10); 417s ***** test 417s [m, v] = nakastat (1, 2); 417s assert (m, 1.25331413731, 1e-10); 417s assert (v, 0.42920367321, 1e-10); 417s ***** test 417s [m, v] = nakastat (2, 1); 417s assert (m, 0.93998560299, 1e-10); 417s assert (v, 0.11642706618, 1e-10); 417s 11 tests, 11 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/hnstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/hnstat.m 417s ***** error hnstat () 417s ***** error hnstat (1) 417s ***** error hnstat ({}, 2) 417s ***** error hnstat (1, "") 417s ***** error hnstat (i, 2) 417s ***** error hnstat (1, i) 417s ***** error ... 417s hnstat (ones (3), ones (2)) 417s ***** error ... 417s hnstat (ones (2), ones (3)) 417s ***** test 417s [m, v] = hnstat (0, 1); 417s assert (m, 0.7979, 1e-4); 417s assert (v, 0.3634, 1e-4); 417s ***** test 417s [m, v] = hnstat (2, 1); 417s assert (m, 2.7979, 1e-4); 417s assert (v, 0.3634, 1e-4); 417s ***** test 417s [m, v] = hnstat (2, 2); 417s assert (m, 3.5958, 1e-4); 417s assert (v, 1.4535, 1e-4); 417s ***** test 417s [m, v] = hnstat (2, 2.5); 417s assert (m, 3.9947, 1e-4); 417s assert (v, 2.2711, 1e-4); 417s ***** test 417s [m, v] = hnstat (1.5, 0.5); 417s assert (m, 1.8989, 1e-4); 417s assert (v, 0.0908, 1e-4); 417s ***** test 417s [m, v] = hnstat (-1.5, 0.5); 417s assert (m, -1.1011, 1e-4); 417s assert (v, 0.0908, 1e-4); 417s 14 tests, 14 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/ricestat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/ricestat.m 417s ***** error ricestat () 417s ***** error ricestat (1) 417s ***** error ricestat ({}, 2) 417s ***** error ricestat (1, "") 417s ***** error ricestat (i, 2) 417s ***** error ricestat (1, i) 417s ***** error ... 417s ricestat (ones (3), ones (2)) 417s ***** error ... 417s ricestat (ones (2), ones (3)) 417s ***** shared s, sigma 417s s = [2, 0, -1, 1, 4]; 417s sigma = [1, NaN, 3, -1, 2]; 417s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 417s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 417s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 417s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 417s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 417s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 417s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 417s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 417s 16 tests, 16 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/gpstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/gpstat.m 417s ***** error gpstat () 417s ***** error gpstat (1) 417s ***** error gpstat (1, 2) 417s ***** error gpstat ({}, 2, 3) 417s ***** error gpstat (1, "", 3) 417s ***** error gpstat (1, 2, "") 417s ***** error gpstat (i, 2, 3) 417s ***** error gpstat (1, i, 3) 417s ***** error gpstat (1, 2, i) 417s ***** error ... 417s gpstat (ones (3), ones (2), 3) 417s ***** error ... 417s gpstat (ones (2), 2, ones (3)) 417s ***** error ... 417s gpstat (1, ones (2), ones (3)) 417s ***** shared x, y 417s x = [-Inf, -1, 0, 1/2, 1, Inf]; 417s y = [0, 0.5, 1, 2, Inf, Inf]; 417s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 417s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 417s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 417s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 417s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 417s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 417s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 417s 19 tests, 19 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/betastat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/betastat.m 417s ***** error betastat () 417s ***** error betastat (1) 417s ***** error betastat ({}, 2) 417s ***** error betastat (1, "") 417s ***** error betastat (i, 2) 417s ***** error betastat (1, i) 417s ***** error ... 417s betastat (ones (3), ones (2)) 417s ***** error ... 417s betastat (ones (2), ones (3)) 417s ***** test 417s a = -2:6; 417s b = 0.4:0.2:2; 417s [m, v] = betastat (a, b); 417s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 417s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 417s assert (m, expected_m, eps*100); 417s assert (v, expected_v, 0.001); 417s ***** test 417s a = -2:1:6; 417s [m, v] = betastat (a, 1.5); 417s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 417s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 417s assert (m, expected_m); 417s assert (v, expected_v, 0.001); 417s ***** test 417s a = [14 Inf 10 NaN 10]; 417s b = [12 9 NaN Inf 12]; 417s [m, v] = betastat (a, b); 417s expected_m = [14/26 NaN NaN NaN 10/22]; 417s expected_v = [168/18252 NaN NaN NaN 120/11132]; 417s assert (m, expected_m); 417s assert (v, expected_v); 417s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 417s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 417s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 417s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 417s 15 tests, 15 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/logistat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/logistat.m 417s ***** error logistat () 417s ***** error logistat (1) 417s ***** error logistat ({}, 2) 417s ***** error logistat (1, "") 417s ***** error logistat (i, 2) 417s ***** error logistat (1, i) 417s ***** error ... 417s logistat (ones (3), ones (2)) 417s ***** error ... 417s logistat (ones (2), ones (3)) 417s ***** test 417s [m, v] = logistat (0, 1); 417s assert (m, 0); 417s assert (v, 3.2899, 0.001); 417s ***** test 417s [m, v] = logistat (0, 0.8); 417s assert (m, 0); 417s assert (v, 2.1055, 0.001); 417s ***** test 417s [m, v] = logistat (1, 0.6); 417s assert (m, 1); 417s assert (v, 1.1844, 0.001); 417s ***** test 417s [m, v] = logistat (0, 0.4); 417s assert (m, 0); 417s assert (v, 0.5264, 0.001); 417s ***** test 417s [m, v] = logistat (-1, 0.2); 417s assert (m, -1); 417s assert (v, 0.1316, 0.001); 417s 13 tests, 13 passed, 0 known failure, 0 skipped 417s [inst/dist_stat/nbinstat.m] 417s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/nbinstat.m 417s ***** error nbinstat () 417s ***** error nbinstat (1) 417s ***** error nbinstat ({}, 2) 417s ***** error nbinstat (1, "") 417s ***** error nbinstat (i, 2) 417s ***** error nbinstat (1, i) 417s ***** error ... 417s nbinstat (ones (3), ones (2)) 417s ***** error ... 417s nbinstat (ones (2), ones (3)) 417s ***** test 417s r = 1:4; 417s ps = 0.2:0.2:0.8; 417s [m, v] = nbinstat (r, ps); 417s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 417s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 417s assert (m, expected_m, 0.001); 417s assert (v, expected_v, 0.001); 417s ***** test 417s r = 1:4; 417s [m, v] = nbinstat (r, 0.5); 417s expected_m = [1, 2, 3, 4]; 417s expected_v = [2, 4, 6, 8]; 417s assert (m, expected_m, 0.001); 417s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/unifstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/unifstat.m 418s ***** error unifstat () 418s ***** error unifstat (1) 418s ***** error unifstat ({}, 2) 418s ***** error unifstat (1, "") 418s ***** error unifstat (i, 2) 418s ***** error unifstat (1, i) 418s ***** error ... 418s unifstat (ones (3), ones (2)) 418s ***** error ... 418s unifstat (ones (2), ones (3)) 418s ***** test 418s a = 1:6; 418s b = 2:2:12; 418s [m, v] = unifstat (a, b); 418s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 418s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s a = 1:6; 418s [m, v] = unifstat (a, 10); 418s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 418s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/binostat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/binostat.m 418s ***** error binostat () 418s ***** error binostat (1) 418s ***** error binostat ({}, 2) 418s ***** error binostat (1, "") 418s ***** error binostat (i, 2) 418s ***** error binostat (1, i) 418s ***** error ... 418s binostat (ones (3), ones (2)) 418s ***** error ... 418s binostat (ones (2), ones (3)) 418s ***** test 418s n = 1:6; 418s ps = 0:0.2:1; 418s [m, v] = binostat (n, ps); 418s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 418s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s n = 1:6; 418s [m, v] = binostat (n, 0.5); 418s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 418s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 418s [m, v] = binostat (n, 0.5); 418s assert (isnan (m), [true true false true false true false false]) 418s assert (isnan (v), [true true false true false true false false]) 418s assert (m(end), Inf); 418s assert (v(end), Inf); 418s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 418s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 418s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 418s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 418s 15 tests, 15 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/invgstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/invgstat.m 418s ***** error invgstat () 418s ***** error invgstat (1) 418s ***** error invgstat ({}, 2) 418s ***** error invgstat (1, "") 418s ***** error invgstat (i, 2) 418s ***** error invgstat (1, i) 418s ***** error ... 418s invgstat (ones (3), ones (2)) 418s ***** error ... 418s invgstat (ones (2), ones (3)) 418s ***** test 418s [m, v] = invgstat (1, 1); 418s assert (m, 1); 418s assert (v, 1); 418s ***** test 418s [m, v] = invgstat (2, 1); 418s assert (m, 2); 418s assert (v, 8); 418s ***** test 418s [m, v] = invgstat (2, 2); 418s assert (m, 2); 418s assert (v, 4); 418s ***** test 418s [m, v] = invgstat (2, 2.5); 418s assert (m, 2); 418s assert (v, 3.2); 418s ***** test 418s [m, v] = invgstat (1.5, 0.5); 418s assert (m, 1.5); 418s assert (v, 6.75); 418s 13 tests, 13 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/raylstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/raylstat.m 418s ***** error raylstat () 418s ***** error raylstat ({}) 418s ***** error raylstat ("") 418s ***** error raylstat (i) 418s ***** test 418s sigma = 1:6; 418s [m, v] = raylstat (sigma); 418s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 418s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s 5 tests, 5 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/poisstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/poisstat.m 418s ***** error poisstat () 418s ***** error poisstat ({}) 418s ***** error poisstat ("") 418s ***** error poisstat (i) 418s ***** test 418s lambda = 1 ./ (1:6); 418s [m, v] = poisstat (lambda); 418s assert (m, lambda); 418s assert (v, lambda); 418s 5 tests, 5 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/tlsstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/tlsstat.m 418s ***** error tlsstat () 418s ***** error tlsstat (1) 418s ***** error tlsstat (1, 2) 418s ***** error tlsstat ({}, 2, 3) 418s ***** error tlsstat (1, "", 3) 418s ***** error tlsstat (1, 2, ["d"]) 418s ***** error tlsstat (i, 2, 3) 418s ***** error tlsstat (1, i, 3) 418s ***** error tlsstat (1, 2, i) 418s ***** error ... 418s tlsstat (ones (3), ones (2), 1) 418s ***** error ... 418s tlsstat (ones (2), 1, ones (3)) 418s ***** error ... 418s tlsstat (1, ones (2), ones (3)) 418s ***** test 418s [m, v] = tlsstat (0, 1, 0); 418s assert (m, NaN); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (0, 1, 1); 418s assert (m, NaN); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (2, 1, 1); 418s assert (m, NaN); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (-2, 1, 1); 418s assert (m, NaN); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (0, 1, 2); 418s assert (m, 0); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (2, 1, 2); 418s assert (m, 2); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (-2, 1, 2); 418s assert (m, -2); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (0, 2, 2); 418s assert (m, 0); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (2, 2, 2); 418s assert (m, 2); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (-2, 2, 2); 418s assert (m, -2); 418s assert (v, NaN); 418s ***** test 418s [m, v] = tlsstat (0, 1, 3); 418s assert (m, 0); 418s assert (v, 3); 418s ***** test 418s [m, v] = tlsstat (0, 2, 3); 418s assert (m, 0); 418s assert (v, 6); 418s ***** test 418s [m, v] = tlsstat (2, 1, 3); 418s assert (m, 2); 418s assert (v, 3); 418s ***** test 418s [m, v] = tlsstat (2, 2, 3); 418s assert (m, 2); 418s assert (v, 6); 418s ***** test 418s [m, v] = tlsstat (-2, 1, 3); 418s assert (m, -2); 418s assert (v, 3); 418s ***** test 418s [m, v] = tlsstat (-2, 2, 3); 418s assert (m, -2); 418s assert (v, 6); 418s 28 tests, 28 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/bisastat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/bisastat.m 418s ***** error bisastat () 418s ***** error bisastat (1) 418s ***** error bisastat ({}, 2) 418s ***** error bisastat (1, "") 418s ***** error bisastat (i, 2) 418s ***** error bisastat (1, i) 418s ***** error ... 418s bisastat (ones (3), ones (2)) 418s ***** error ... 418s bisastat (ones (2), ones (3)) 418s ***** test 418s beta = 1:6; 418s gamma = 1:0.2:2; 418s [m, v] = bisastat (beta, gamma); 418s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 418s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 418s assert (m, expected_m, 1e-2); 418s assert (v, expected_v, 1e-3); 418s ***** test 418s beta = 1:6; 418s [m, v] = bisastat (beta, 1.5); 418s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 418s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 418s assert (m, expected_m, 1e-3); 418s assert (v, expected_v, 1e-4); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/gamstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/gamstat.m 418s ***** error gamstat () 418s ***** error gamstat (1) 418s ***** error gamstat ({}, 2) 418s ***** error gamstat (1, "") 418s ***** error gamstat (i, 2) 418s ***** error gamstat (1, i) 418s ***** error ... 418s gamstat (ones (3), ones (2)) 418s ***** error ... 418s gamstat (ones (2), ones (3)) 418s ***** test 418s a = 1:6; 418s b = 1:0.2:2; 418s [m, v] = gamstat (a, b); 418s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 418s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s a = 1:6; 418s [m, v] = gamstat (a, 1.5); 418s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 418s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/ncfstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/ncfstat.m 418s ***** error ncfstat () 418s ***** error ncfstat (1) 418s ***** error ncfstat (1, 2) 418s ***** error ncfstat ({}, 2, 3) 418s ***** error ncfstat (1, "", 3) 418s ***** error ncfstat (1, 2, "") 418s ***** error ncfstat (i, 2, 3) 418s ***** error ncfstat (1, i, 3) 418s ***** error ncfstat (1, 2, i) 418s ***** error ... 418s ncfstat (ones (3), ones (2), 3) 418s ***** error ... 418s ncfstat (ones (2), 2, ones (3)) 418s ***** error ... 418s ncfstat (1, ones (2), ones (3)) 418s ***** shared df1, df2, lambda 418s df1 = [2, 0, -1, 1, 4, 5]; 418s df2 = [2, 4, -1, 5, 6, 7]; 418s lambda = [1, NaN, 3, 0, 2, -1]; 418s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 418s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 418s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 418s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 418s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 418s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 418s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 418s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 418s 20 tests, 20 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/hygestat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/hygestat.m 418s ***** error hygestat () 418s ***** error hygestat (1) 418s ***** error hygestat (1, 2) 418s ***** error hygestat ({}, 2, 3) 418s ***** error hygestat (1, "", 3) 418s ***** error hygestat (1, 2, "") 418s ***** error hygestat (i, 2, 3) 418s ***** error hygestat (1, i, 3) 418s ***** error hygestat (1, 2, i) 418s ***** error ... 418s hygestat (ones (3), ones (2), 3) 418s ***** error ... 418s hygestat (ones (2), 2, ones (3)) 418s ***** error ... 418s hygestat (1, ones (2), ones (3)) 418s ***** test 418s m = 4:9; 418s k = 0:5; 418s n = 1:6; 418s [mn, v] = hygestat (m, k, n); 418s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 418s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 418s assert (mn, expected_mn, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s m = 4:9; 418s k = 0:5; 418s [mn, v] = hygestat (m, k, 2); 418s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 418s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 418s assert (mn, expected_mn, 0.001); 418s assert (v, expected_v, 0.001); 418s 14 tests, 14 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/normstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/normstat.m 418s ***** error normstat () 418s ***** error normstat (1) 418s ***** error normstat ({}, 2) 418s ***** error normstat (1, "") 418s ***** error normstat (i, 2) 418s ***** error normstat (1, i) 418s ***** error ... 418s normstat (ones (3), ones (2)) 418s ***** error ... 418s normstat (ones (2), ones (3)) 418s ***** test 418s mu = 1:6; 418s sigma = 0.2:0.2:1.2; 418s [m, v] = normstat (mu, sigma); 418s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 418s assert (m, mu); 418s assert (v, expected_v, 0.001); 418s ***** test 418s sigma = 0.2:0.2:1.2; 418s [m, v] = normstat (0, sigma); 418s expected_mn = [0, 0, 0, 0, 0, 0]; 418s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 418s assert (m, expected_mn, 0.001); 418s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/wblstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/wblstat.m 418s ***** error wblstat () 418s ***** error wblstat (1) 418s ***** error wblstat ({}, 2) 418s ***** error wblstat (1, "") 418s ***** error wblstat (i, 2) 418s ***** error wblstat (1, i) 418s ***** error ... 418s wblstat (ones (3), ones (2)) 418s ***** error ... 418s wblstat (ones (2), ones (3)) 418s ***** test 418s lambda = 3:8; 418s k = 1:6; 418s [m, v] = wblstat (lambda, k); 418s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 418s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s k = 1:6; 418s [m, v] = wblstat (6, k); 418s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 418s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/ncx2stat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/ncx2stat.m 418s ***** error ncx2stat () 418s ***** error ncx2stat (1) 418s ***** error ncx2stat ({}, 2) 418s ***** error ncx2stat (1, "") 418s ***** error ncx2stat (i, 2) 418s ***** error ncx2stat (1, i) 418s ***** error ... 418s ncx2stat (ones (3), ones (2)) 418s ***** error ... 418s ncx2stat (ones (2), ones (3)) 418s ***** shared df, d1 418s df = [2, 0, -1, 1, 4]; 418s d1 = [1, NaN, 3, -1, 2]; 418s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 418s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 418s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 418s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 418s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 418s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 418s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 418s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 418s 16 tests, 16 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/tristat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/tristat.m 418s ***** error tristat () 418s ***** error tristat (1) 418s ***** error tristat (1, 2) 418s ***** error tristat ("i", 2, 1) 418s ***** error tristat (0, "d", 1) 418s ***** error tristat (0, 3, {}) 418s ***** error tristat (i, 2, 1) 418s ***** error tristat (0, i, 1) 418s ***** error tristat (0, 3, i) 418s ***** test 418s a = 1:5; 418s b = 3:7; 418s c = 5:9; 418s [m, v] = tristat (a, b, c); 418s expected_m = [3, 4, 5, 6, 7]; 418s assert (m, expected_m); 418s assert (v, ones (1, 5) * (2/3)); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/plstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/plstat.m 418s ***** shared x, Fx 418s x = [0, 1, 3, 4, 7, 10]; 418s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 418s ***** assert (plstat (x, Fx), 4.15) 418s ***** test 418s [m, v] = plstat (x, Fx); 418s assert (v, 10.3775, 1e-14) 418s ***** error plstat () 418s ***** error plstat (1) 418s ***** error ... 418s plstat ([0, 1, 2], [0, 1]) 418s ***** error ... 418s plstat ([0], [1]) 418s ***** error ... 418s plstat ([0, 1, 2], [0, 1, 1.5]) 418s ***** error ... 418s plstat ([0, 1, 2], [0, i, 1]) 418s ***** error ... 418s plstat ([0, i, 2], [0, 0.5, 1]) 418s ***** error ... 418s plstat ([0, i, 2], [0, 0.5i, 1]) 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/lognstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/lognstat.m 418s ***** error lognstat () 418s ***** error lognstat (1) 418s ***** error lognstat ({}, 2) 418s ***** error lognstat (1, "") 418s ***** error lognstat (i, 2) 418s ***** error lognstat (1, i) 418s ***** error ... 418s lognstat (ones (3), ones (2)) 418s ***** error ... 418s lognstat (ones (2), ones (3)) 418s ***** test 418s mu = 0:0.2:1; 418s sigma = 0.2:0.2:1.2; 418s [m, v] = lognstat (mu, sigma); 418s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 418s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s ***** test 418s sigma = 0.2:0.2:1.2; 418s [m, v] = lognstat (0, sigma); 418s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 418s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 418s assert (m, expected_m, 0.001); 418s assert (v, expected_v, 0.001); 418s 10 tests, 10 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/geostat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/geostat.m 418s ***** error geostat () 418s ***** error geostat ({}) 418s ***** error geostat ("") 418s ***** error geostat (i) 418s ***** test 418s ps = 1 ./ (1:6); 418s [m, v] = geostat (ps); 418s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 418s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 418s 5 tests, 5 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/tstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/tstat.m 418s ***** error tstat () 418s ***** error tstat ({}) 418s ***** error tstat ("") 418s ***** error tstat (i) 418s ***** test 418s df = 3:8; 418s [m, v] = tstat (df); 418s expected_m = [0, 0, 0, 0, 0, 0]; 418s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 418s assert (m, expected_m); 418s assert (v, expected_v, 0.001); 418s 5 tests, 5 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/evstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/evstat.m 418s ***** error evstat () 418s ***** error evstat (1) 418s ***** error evstat ({}, 2) 418s ***** error evstat (1, "") 418s ***** error evstat (i, 2) 418s ***** error evstat (1, i) 418s ***** error ... 418s evstat (ones (3), ones (2)) 418s ***** error ... 418s evstat (ones (2), ones (3)) 418s ***** shared x, y0, y1 418s x = [-5, 0, 1, 2, 3]; 418s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 418s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 418s ***** assert (evstat (x, x), y0, 1e-4) 418s ***** assert (evstat (x, x+6), y1, 1e-4) 418s ***** assert (evstat (x, x-6), NaN (1,5)) 418s 11 tests, 11 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/chi2stat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/chi2stat.m 418s ***** error chi2stat () 418s ***** error chi2stat ({}) 418s ***** error chi2stat ("") 418s ***** error chi2stat (i) 418s ***** test 418s df = 1:6; 418s [m, v] = chi2stat (df); 418s assert (m, df); 418s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 418s 5 tests, 5 passed, 0 known failure, 0 skipped 418s [inst/dist_stat/burrstat.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dist_stat/burrstat.m 418s ***** error burrstat () 418s ***** error burrstat (1) 418s ***** error burrstat (1, 2) 418s ***** error burrstat ({}, 2, 3) 418s ***** error burrstat (1, "", 3) 418s ***** error burrstat (1, 2, "") 418s ***** error burrstat (i, 2, 3) 418s ***** error burrstat (1, i, 3) 418s ***** error burrstat (1, 2, i) 418s ***** error ... 418s burrstat (ones (3), ones (2), 3) 418s ***** error ... 418s burrstat (ones (2), 2, ones (3)) 418s ***** error ... 418s burrstat (1, ones (2), ones (3)) 418s ***** test 418s [m, v] = burrstat (1, 2, 5); 418s assert (m, 0.4295, 1e-4); 418s assert (v, 0.0655, 1e-4); 418s ***** test 418s [m, v] = burrstat (1, 1, 1); 418s assert (m, Inf); 418s assert (v, Inf); 418s ***** test 418s [m, v] = burrstat (2, 4, 1); 418s assert (m, 2.2214, 1e-4); 418s assert (v, 1.3484, 1e-4); 418s 15 tests, 15 passed, 0 known failure, 0 skipped 418s [inst/Classification/ClassificationDiscriminant.m] 418s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationDiscriminant.m 418s ***** demo 418s ## Create discriminant classifier 418s ## Evaluate some model predictions on new data. 418s 418s load fisheriris 418s x = meas; 418s y = species; 418s xc = [min(x); mean(x); max(x)]; 418s obj = fitcdiscr (x, y); 418s [label, score, cost] = predict (obj, xc); 418s ***** demo 418s load fisheriris 418s model = fitcdiscr (meas, species); 418s X = mean (meas); 418s Y = {'versicolor'}; 418s ## Compute loss for discriminant model 418s L = loss (model, X, Y) 418s ***** demo 418s load fisheriris 418s mdl = fitcdiscr (meas, species); 418s X = mean (meas); 418s Y = {'versicolor'}; 418s ## Margin for discriminant model 418s m = margin (mdl, X, Y) 418s ***** demo 418s load fisheriris 418s x = meas; 418s y = species; 418s obj = fitcdiscr (x, y, "gamma", 0.4); 418s ## Cross-validation for discriminant model 418s CVMdl = crossval (obj) 418s ***** test 418s load fisheriris 418s x = meas; 418s y = species; 418s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 418s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 418s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 418s 0.092721, 0.115388, 0.055244, 0.032710; ... 418s 0.167514, 0.055244, 0.185188, 0.042665; ... 418s 0.038401, 0.032710, 0.042665, 0.041882]; 418s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 418s 5.9360, 2.7700, 4.2600, 1.3260; ... 418s 6.5880, 2.9740, 5.5520, 2.0260]; 418s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 418s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 418s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 418s assert (class (Mdl), "ClassificationDiscriminant"); 418s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 418s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 418s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 418s assert (Mdl.ClassNames, unique (species)) 418s assert (Mdl.Sigma, sigma, 1e-6) 418s assert (Mdl.Mu, mu, 1e-14) 418s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 418s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 418s assert (Mdl.PredictorNames, PredictorNames) 418s ***** test 418s load fisheriris 418s x = meas; 418s y = species; 418s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 418s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 418s 0.046361, 0.115388, 0.027622, 0.016355; ... 418s 0.083757, 0.027622, 0.185188, 0.021333; ... 418s 0.019201, 0.016355, 0.021333, 0.041882]; 418s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 418s 5.9360, 2.7700, 4.2600, 1.3260; ... 418s 6.5880, 2.9740, 5.5520, 2.0260]; 418s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 418s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 418s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 418s assert (class (Mdl), "ClassificationDiscriminant"); 418s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 418s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 418s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 418s assert (Mdl.ClassNames, unique (species)) 418s assert (Mdl.Sigma, sigma, 1e-6) 418s assert (Mdl.Mu, mu, 1e-14) 418s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 418s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 418s ***** shared X, Y, MODEL 418s X = rand (10,2); 418s Y = [ones(5,1);2*ones(5,1)]; 418s MODEL = ClassificationDiscriminant (X, Y); 418s ***** error ClassificationDiscriminant () 418s ***** error ... 418s ClassificationDiscriminant (ones(4, 1)) 418s ***** error ... 418s ClassificationDiscriminant (ones (4,2), ones (1,4)) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "ResponseName", 1) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 418s ***** error ... 418s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 418s ***** error ... 418s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 418s ***** error ... 418s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 418s ***** error ... 418s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "Cost", "string") 418s ***** error ... 418s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 419s ***** error ... 419s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 419s ***** error ... 419s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 419s ***** error ... 419s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 419s ***** error ... 419s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 419s ***** error ... 419s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 419s ***** test 419s load fisheriris 419s x = meas; 419s y = species; 419s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 419s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 419s assert (label, {'versicolor'}) 419s assert (score, [0, 0.9999, 0.0001], 1e-4) 419s assert (cost, [1, 0.0001, 0.9999], 1e-4) 419s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 419s assert (label, {'versicolor'}) 419s assert (score, [0, 0.6368, 0.3632], 1e-4) 419s assert (cost, [1, 0.3632, 0.6368], 1e-4) 419s ***** test 419s load fisheriris 419s x = meas; 419s y = species; 419s xc = [min(x); mean(x); max(x)]; 419s Mdl = fitcdiscr (x, y); 419s [label, score, cost] = predict (Mdl, xc); 419s l = {'setosa'; 'versicolor'; 'virginica'}; 419s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 419s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 419s assert (label, l) 419s assert (score, s, 1e-4) 419s assert (cost, c, 1e-4) 419s ***** error ... 419s predict (MODEL) 419s ***** error ... 419s predict (MODEL, []) 419s ***** error ... 419s predict (MODEL, 1) 419s ***** test 419s load fisheriris 419s model = fitcdiscr (meas, species); 419s x = mean (meas); 419s y = {'versicolor'}; 419s L = loss (model, x, y); 419s assert (L, 0) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6]; 419s y = {'A'; 'B'; 'A'}; 419s model = fitcdiscr (x, y, "Gamma", 0.4); 419s x_test = [1, 6; 3, 3]; 419s y_test = {'A'; 'B'}; 419s L = loss (model, x_test, y_test); 419s assert (L, 0.3333, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6; 7, 8]; 419s y = ['1'; '2'; '3'; '1']; 419s model = fitcdiscr (x, y, "gamma" , 0.5); 419s x_test = [3, 3]; 419s y_test = ['1']; 419s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 419s assert (L, 0.2423, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6; 7, 8]; 419s y = ['1'; '2'; '3'; '1']; 419s model = fitcdiscr (x, y, "gamma" , 0.5); 419s x_test = [3, 3; 5, 7]; 419s y_test = ['1'; '2']; 419s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 419s assert (L, 0.3333, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6; 7, 8]; 419s y = ['1'; '2'; '3'; '1']; 419s model = fitcdiscr (x, y, "gamma" , 0.5); 419s x_test = [3, 3; 5, 7]; 419s y_test = ['1'; '2']; 419s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 419s assert (L, 0.5886, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6; 7, 8]; 419s y = ['1'; '2'; '3'; '1']; 419s model = fitcdiscr (x, y, "gamma" , 0.5); 419s x_test = [3, 3; 5, 7]; 419s y_test = ['1'; '2']; 419s W = [1; 2]; 419s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 419s assert (L, 0.5107, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6]; 419s y = {'A'; 'B'; 'A'}; 419s model = fitcdiscr (x, y, "gamma" , 0.5); 419s x_with_nan = [1, 2; NaN, 4]; 419s y_test = {'A'; 'B'}; 419s L = loss (model, x_with_nan, y_test); 419s assert (L, 0.3333, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6]; 419s y = {'A'; 'B'; 'A'}; 419s model = fitcdiscr (x, y); 419s x_with_nan = [1, 2; NaN, 4]; 419s y_test = {'A'; 'B'}; 419s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 419s assert (isnan (L)) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6]; 419s y = {'A'; 'B'; 'A'}; 419s model = fitcdiscr (x, y); 419s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 419s L = loss (model, x, y, 'LossFun', customLossFun); 419s assert (L, 0.8889, 1e-4) 419s ***** test 419s x = [1, 2; 3, 4; 5, 6]; 419s y = [1; 2; 1]; 419s model = fitcdiscr (x, y); 419s L = loss (model, x, y, 'LossFun', 'classiferror'); 419s assert (L, 0.3333, 1e-4) 419s ***** error ... 419s loss (MODEL) 419s ***** error ... 419s loss (MODEL, ones (4,2)) 419s ***** error ... 419s loss (MODEL, [], zeros (2)) 419s ***** error ... 419s loss (MODEL, 1, zeros (2)) 419s ***** error ... 419s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 419s ***** error ... 419s loss (MODEL, ones (4,2), ones (3,1)) 419s ***** error ... 419s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 419s ***** error ... 419s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 419s load fisheriris 419s mdl = fitcdiscr (meas, species); 419s X = mean (meas); 419s Y = {'versicolor'}; 419s m = margin (mdl, X, Y); 419s assert (m, 1, 1e-6) 419s ***** test 419s X = [1, 2; 3, 4; 5, 6]; 419s Y = [1; 2; 1]; 419s mdl = fitcdiscr (X, Y, "gamma", 0.5); 419s m = margin (mdl, X, Y); 419s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 419s ***** error ... 419s margin (MODEL) 419s ***** error ... 419s margin (MODEL, ones (4,2)) 419s ***** error ... 419s margin (MODEL, [], zeros (2)) 419s ***** error ... 419s margin (MODEL, 1, zeros (2)) 419s ***** error ... 419s margin (MODEL, ones (4,2), ones (3,1)) 419s ***** shared x, y, obj 419s load fisheriris 419s x = meas; 419s y = species; 419s obj = fitcdiscr (x, y, "gamma", 0.4); 419s ***** test 419s CVMdl = crossval (obj); 419s assert (class (CVMdl), "ClassificationPartitionedModel") 419s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 419s assert (CVMdl.KFold == 10) 419s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 419s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 419s ***** test 419s CVMdl = crossval (obj, "KFold", 3); 419s assert (class (CVMdl), "ClassificationPartitionedModel") 419s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 419s assert (CVMdl.KFold == 3) 419s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 419s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 419s ***** test 419s CVMdl = crossval (obj, "HoldOut", 0.2); 419s assert (class (CVMdl), "ClassificationPartitionedModel") 419s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 419s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 419s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 419s ***** test 419s CVMdl = crossval (obj, "LeaveOut", 'on'); 419s assert (class (CVMdl), "ClassificationPartitionedModel") 419s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 419s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 419s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 421s ***** test 421s partition = cvpartition (y, 'KFold', 3); 421s CVMdl = crossval (obj, 'cvPartition', partition); 421s assert (class (CVMdl), "ClassificationPartitionedModel") 421s assert (CVMdl.KFold == 3) 421s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 421s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 421s ***** error ... 421s crossval (obj, "kfold") 421s ***** error... 421s crossval (obj, "kfold", 12, "holdout", 0.2) 421s ***** error ... 421s crossval (obj, "kfold", 'a') 421s ***** error ... 421s crossval (obj, "holdout", 2) 421s ***** error ... 421s crossval (obj, "leaveout", 1) 421s ***** error ... 421s crossval (obj, "cvpartition", 1) 421s 65 tests, 65 passed, 0 known failure, 0 skipped 421s [inst/Classification/CompactClassificationGAM.m] 421s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/CompactClassificationGAM.m 421s ***** demo 421s ## Create a generalized additive model classifier and its compact version 421s # and compare their size 421s 421s load fisheriris 421s X = meas; 421s Y = species; 421s 421s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 421s CMdl = crossval (Mdl); 421s 421s whos ('Mdl', 'CMdl') 421s ***** test 421s Mdl = CompactClassificationGAM (); 421s assert (class (Mdl), "CompactClassificationGAM") 421s ***** test 421s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 421s y = [0; 0; 1; 1]; 421s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 421s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 421s CMdl = compact (Mdl); 421s assert (class (CMdl), "CompactClassificationGAM"); 421s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 421s assert (CMdl.ClassNames, {'0'; '1'}) 421s assert (CMdl.PredictorNames, PredictorNames) 421s assert (CMdl.BaseModel.Intercept, 0) 422s ***** test 422s load fisheriris 422s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 422s X = meas(inds, :); 422s Y = species(inds, :)'; 422s Y = strcmp (Y, 'virginica')'; 422s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 422s CMdl = compact (Mdl); 422s assert (class (CMdl), "CompactClassificationGAM"); 422s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 422s assert (CMdl.ClassNames, {'0'; '1'}) 422s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 422s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 422s assert (CMdl.ModelwInt.Intercept, 0) 427s ***** test 427s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 427s Y = [0; 1; 0; 1; 1]; 427s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 427s CMdl = compact (Mdl); 427s assert (class (CMdl), "CompactClassificationGAM"); 427s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 427s assert (CMdl.ClassNames, {'0'; '1'}) 427s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 427s assert (CMdl.Knots, [4, 4, 4]) 427s assert (CMdl.Order, [3, 3, 3]) 427s assert (CMdl.DoF, [7, 7, 7]) 427s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 428s ***** error ... 428s CompactClassificationGAM (1) 428s ***** test 428s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 428s y = [1; 0; 1; 0; 1]; 428s Mdl = fitcgam (x, y, "interactions", "all"); 428s CMdl = compact (Mdl); 428s l = {'0'; '0'; '0'; '0'; '0'}; 428s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 428s 0.4259, 0.5741; 0.3760, 0.6240]; 428s [labels, scores] = predict (CMdl, x); 428s assert (class (CMdl), "CompactClassificationGAM"); 428s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 428s assert (CMdl.ClassNames, {'1'; '0'}) 428s assert (CMdl.PredictorNames, {'x1', 'x2'}) 428s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 428s assert (labels, l) 428s assert (scores, s, 1e-1) 431s ***** test 431s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 431s y = [0; 0; 1; 1]; 431s interactions = [false, true, false; true, false, true; false, true, false]; 431s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 431s CMdl = compact (Mdl); 431s [label, score] = predict (CMdl, x, "includeinteractions", true); 431s l = {'0'; '0'; '1'; '1'}; 431s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 431s assert (class (CMdl), "CompactClassificationGAM"); 431s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 431s assert (CMdl.ClassNames, {'0'; '1'}) 431s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 431s assert (CMdl.ModelwInt.Intercept, 0) 431s assert (label, l) 431s assert (score, s, 1e-1) 435s ***** shared CMdl 435s Mdl = fitcgam (ones (4,2), ones (4,1)); 435s CMdl = compact (Mdl); 436s ***** error ... 436s predict (CMdl) 436s ***** error ... 436s predict (CMdl, []) 436s ***** error ... 436s predict (CMdl, 1) 436s 10 tests, 10 passed, 0 known failure, 0 skipped 436s [inst/Classification/ConfusionMatrixChart.m] 436s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ConfusionMatrixChart.m 436s ***** demo 436s ## Create a simple ConfusionMatrixChart Object 436s 436s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 436s NormalizedValues = cm.NormalizedValues 436s ClassLabels = cm.ClassLabels 436s ***** test 436s hf = figure ("visible", "off"); 436s unwind_protect 436s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 436s assert (isa (cm, "ConfusionMatrixChart"), true); 436s unwind_protect_cleanup 436s close (hf); 436s end_unwind_protect 436s 1 test, 1 passed, 0 known failure, 0 skipped 436s [inst/Classification/CompactClassificationDiscriminant.m] 436s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/CompactClassificationDiscriminant.m 436s ***** demo 436s ## Create a discriminant analysis classifier and its compact version 436s # and compare their size 436s 436s load fisheriris 436s X = meas; 436s Y = species; 436s 436s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 436s CMdl = crossval (Mdl); 436s 436s whos ('Mdl', 'CMdl') 436s ***** test 436s load fisheriris 436s x = meas; 436s y = species; 436s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 436s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 436s CMdl = compact (Mdl); 436s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 436s 0.092721, 0.115388, 0.055244, 0.032710; ... 436s 0.167514, 0.055244, 0.185188, 0.042665; ... 436s 0.038401, 0.032710, 0.042665, 0.041882]; 436s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 436s 5.9360, 2.7700, 4.2600, 1.3260; ... 436s 6.5880, 2.9740, 5.5520, 2.0260]; 436s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 436s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 436s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 436s assert (class (CMdl), "CompactClassificationDiscriminant"); 436s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 436s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 436s assert (CMdl.ClassNames, unique (species)) 436s assert (CMdl.Sigma, sigma, 1e-6) 436s assert (CMdl.Mu, mu, 1e-14) 436s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 436s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 436s assert (CMdl.PredictorNames, PredictorNames) 436s ***** test 436s load fisheriris 436s x = meas; 436s y = species; 436s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 436s CMdl = compact (Mdl); 436s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 436s 0.046361, 0.115388, 0.027622, 0.016355; ... 436s 0.083757, 0.027622, 0.185188, 0.021333; ... 436s 0.019201, 0.016355, 0.021333, 0.041882]; 436s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 436s 5.9360, 2.7700, 4.2600, 1.3260; ... 436s 6.5880, 2.9740, 5.5520, 2.0260]; 436s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 436s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 436s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 436s assert (class (CMdl), "CompactClassificationDiscriminant"); 436s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 436s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 436s assert (CMdl.ClassNames, unique (species)) 436s assert (CMdl.Sigma, sigma, 1e-6) 436s assert (CMdl.Mu, mu, 1e-14) 436s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 436s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 436s ***** error ... 436s CompactClassificationDiscriminant (1) 436s ***** test 436s load fisheriris 436s x = meas; 436s y = species; 436s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 436s CMdl = compact (Mdl); 436s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 436s assert (label, {'versicolor'}) 436s assert (score, [0, 0.9999, 0.0001], 1e-4) 436s assert (cost, [1, 0.0001, 0.9999], 1e-4) 436s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 436s assert (label, {'versicolor'}) 436s assert (score, [0, 0.6368, 0.3632], 1e-4) 436s assert (cost, [1, 0.3632, 0.6368], 1e-4) 436s ***** test 436s load fisheriris 436s x = meas; 436s y = species; 436s xc = [min(x); mean(x); max(x)]; 436s Mdl = fitcdiscr (x, y); 436s CMdl = compact (Mdl); 436s [label, score, cost] = predict (CMdl, xc); 436s l = {'setosa'; 'versicolor'; 'virginica'}; 436s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 436s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 436s assert (label, l) 436s assert (score, s, 1e-4) 436s assert (cost, c, 1e-4) 436s ***** shared MODEL 436s X = rand (10,2); 436s Y = [ones(5,1);2*ones(5,1)]; 436s MODEL = compact (ClassificationDiscriminant (X, Y)); 436s ***** error ... 436s predict (MODEL) 436s ***** error ... 436s predict (MODEL, []) 436s ***** error ... 436s predict (MODEL, 1) 436s ***** test 436s load fisheriris 436s model = fitcdiscr (meas, species); 436s x = mean (meas); 436s y = {'versicolor'}; 436s L = loss (model, x, y); 436s assert (L, 0) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6]; 436s y = {'A'; 'B'; 'A'}; 436s model = fitcdiscr (x, y, "Gamma", 0.4); 436s x_test = [1, 6; 3, 3]; 436s y_test = {'A'; 'B'}; 436s L = loss (model, x_test, y_test); 436s assert (L, 0.3333, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6; 7, 8]; 436s y = ['1'; '2'; '3'; '1']; 436s model = fitcdiscr (x, y, "gamma" , 0.5); 436s x_test = [3, 3]; 436s y_test = ['1']; 436s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 436s assert (L, 0.2423, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6; 7, 8]; 436s y = ['1'; '2'; '3'; '1']; 436s model = fitcdiscr (x, y, "gamma" , 0.5); 436s x_test = [3, 3; 5, 7]; 436s y_test = ['1'; '2']; 436s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 436s assert (L, 0.3333, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6; 7, 8]; 436s y = ['1'; '2'; '3'; '1']; 436s model = fitcdiscr (x, y, "gamma" , 0.5); 436s x_test = [3, 3; 5, 7]; 436s y_test = ['1'; '2']; 436s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 436s assert (L, 0.5886, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6; 7, 8]; 436s y = ['1'; '2'; '3'; '1']; 436s model = fitcdiscr (x, y, "gamma" , 0.5); 436s x_test = [3, 3; 5, 7]; 436s y_test = ['1'; '2']; 436s W = [1; 2]; 436s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 436s assert (L, 0.5107, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6]; 436s y = {'A'; 'B'; 'A'}; 436s model = fitcdiscr (x, y, "gamma" , 0.5); 436s x_with_nan = [1, 2; NaN, 4]; 436s y_test = {'A'; 'B'}; 436s L = loss (model, x_with_nan, y_test); 436s assert (L, 0.3333, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6]; 436s y = {'A'; 'B'; 'A'}; 436s model = fitcdiscr (x, y); 436s x_with_nan = [1, 2; NaN, 4]; 436s y_test = {'A'; 'B'}; 436s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 436s assert (isnan (L)) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6]; 436s y = {'A'; 'B'; 'A'}; 436s model = fitcdiscr (x, y); 436s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 436s L = loss (model, x, y, 'LossFun', customLossFun); 436s assert (L, 0.8889, 1e-4) 436s ***** test 436s x = [1, 2; 3, 4; 5, 6]; 436s y = [1; 2; 1]; 436s model = fitcdiscr (x, y); 436s L = loss (model, x, y, 'LossFun', 'classiferror'); 436s assert (L, 0.3333, 1e-4) 436s ***** error ... 436s loss (MODEL) 436s ***** error ... 436s loss (MODEL, ones (4,2)) 436s ***** error ... 436s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 436s ***** error ... 436s loss (MODEL, ones (4,2), ones (3,1)) 436s ***** error ... 436s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 436s ***** error ... 436s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 436s load fisheriris 436s mdl = fitcdiscr (meas, species); 436s X = mean (meas); 436s Y = {'versicolor'}; 436s m = margin (mdl, X, Y); 436s assert (m, 1, 1e-6) 436s ***** test 436s X = [1, 2; 3, 4; 5, 6]; 436s Y = [1; 2; 1]; 436s mdl = fitcdiscr (X, Y, "gamma", 0.5); 436s m = margin (mdl, X, Y); 436s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 436s ***** error ... 436s margin (MODEL) 436s ***** error ... 436s margin (MODEL, ones (4,2)) 436s ***** error ... 436s margin (MODEL, ones (4,2), ones (3,1)) 436s 28 tests, 28 passed, 0 known failure, 0 skipped 436s [inst/Classification/ClassificationNeuralNetwork.m] 436s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationNeuralNetwork.m 436s ***** error ... 436s ClassificationNeuralNetwork () 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2)) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 436s ***** error ... 436s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 436s ***** error ... 436s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 437s "Activations", {"sigmoid", "unsupported_type"}) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 437s ***** error ... 437s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 437s ***** error ... 437s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 437s ***** error ... 437s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 437s 35 tests, 35 passed, 0 known failure, 0 skipped 437s [inst/Classification/CompactClassificationNeuralNetwork.m] 437s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/CompactClassificationNeuralNetwork.m 437s ***** demo 437s ## Create a neural network classifier and its compact version 437s # and compare their size 437s 437s load fisheriris 437s X = meas; 437s Y = species; 437s 437s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 437s CMdl = crossval (Mdl); 437s 437s whos ('Mdl', 'CMdl') 437s ***** error ... 437s CompactClassificationDiscriminant (1) 437s 1 test, 1 passed, 0 known failure, 0 skipped 437s [inst/Classification/CompactClassificationSVM.m] 437s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/CompactClassificationSVM.m 437s ***** demo 437s ## Create a support vectors machine classifier and its compact version 437s # and compare their size 437s 437s load fisheriris 437s X = meas; 437s Y = species; 437s 437s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 437s CMdl = crossval (Mdl); 437s 437s whos ('Mdl', 'CMdl') 437s ***** error ... 437s CompactClassificationSVM (1) 437s ***** shared x, y, CMdl 437s load fisheriris 437s inds = ! strcmp (species, 'setosa'); 437s x = meas(inds, 3:4); 437s y = grp2idx (species(inds)); 437s ***** test 437s xc = [min(x); mean(x); max(x)]; 437s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 437s CMdl = compact (Mdl); 437s assert (isempty (CMdl.Alpha), true) 437s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 437s [label, score] = predict (CMdl, xc); 437s assert (label, [1; 2; 2]); 437s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 437s assert (score(:,1), -score(:,2), eps) 437s ***** test 437s Mdl = fitcsvm (x, y); 437s CMdl = compact (Mdl); 437s assert (isempty (CMdl.Beta), true) 437s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 437s assert (numel (CMdl.Alpha), 24) 437s assert (CMdl.Bias, -14.415, 1e-3) 437s xc = [min(x); mean(x); max(x)]; 437s label = predict (CMdl, xc); 437s assert (label, [1; 2; 2]); 437s ***** error ... 437s predict (CMdl) 437s ***** error ... 437s predict (CMdl, []) 437s ***** error ... 437s predict (CMdl, 1) 437s ***** test 437s CMdl.ScoreTransform = "a"; 437s ***** error ... 437s [labels, scores] = predict (CMdl, x); 437s ***** test 437s rand ("seed", 1); 437s C = cvpartition (y, 'HoldOut', 0.15); 437s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 437s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 437s CMdl = compact (Mdl); 437s testInds = test (C); 437s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 437s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 437s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 437s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 437s assert (computed_margin, expected_margin, 1e-4); 437s ***** error ... 437s margin (CMdl) 437s ***** error ... 437s margin (CMdl, zeros (2)) 437s ***** error ... 437s margin (CMdl, [], 1) 437s ***** error ... 437s margin (CMdl, 1, 1) 437s ***** error ... 437s margin (CMdl, [1, 2], []) 437s ***** error ... 437s margin (CMdl, [1, 2], [1; 2]) 437s ***** test 437s rand ("seed", 1); 437s C = cvpartition (y, 'HoldOut', 0.15); 437s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 437s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 437s CMdl = compact (Mdl); 437s testInds = test (C); 437s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 437s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 437s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 437s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 437s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 437s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 437s assert (L1, 2.8711, 1e-4); 437s assert (L2, 0.5333, 1e-4); 437s assert (L3, 10.9685, 1e-4); 437s assert (L4, 1.9827, 1e-4); 437s assert (L5, 1.5849, 1e-4); 437s assert (L6, 7.6739, 1e-4); 437s ***** error ... 437s loss (CMdl) 437s ***** error ... 437s loss (CMdl, zeros (2)) 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "LossFun") 437s ***** error ... 437s loss (CMdl, [], zeros (2)) 437s ***** error ... 437s loss (CMdl, 1, zeros (2)) 437s ***** error ... 437s loss (CMdl, [1, 2], []) 437s ***** error ... 437s loss (CMdl, [1, 2], [1; 2]) 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "LossFun", 1) 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "LossFun", "some") 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "Weights", 'a') 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 437s ***** error ... 437s loss (CMdl, [1, 2], 1, "some", "some") 437s 29 tests, 29 passed, 0 known failure, 0 skipped 437s [inst/Classification/ClassificationKNN.m] 437s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationKNN.m 437s ***** demo 437s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 437s ## Evaluate some model predictions on new data. 437s 437s load fisheriris 437s x = meas; 437s y = species; 437s xc = [min(x); mean(x); max(x)]; 437s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 437s [label, score, cost] = predict (obj, xc) 437s ***** demo 437s load fisheriris 437s x = meas; 437s y = species; 437s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 437s 437s ## Create a cross-validated model 437s CVMdl = crossval (obj) 437s ***** demo 437s load fisheriris 437s x = meas; 437s y = species; 437s covMatrix = cov (x); 437s 437s ## Fit the k-NN model using the 'mahalanobis' distance 437s ## and the custom covariance matrix 437s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 437s 'Cov', covMatrix); 437s 437s ## Create a partition model using cvpartition 437s Partition = cvpartition (size (x, 1), 'kfold', 12); 437s 437s ## Create cross-validated model using 'cvPartition' name-value argument 437s CVMdl = crossval (obj, 'cvPartition', Partition) 437s 437s ## Access the trained model from first fold of cross-validation 437s CVMdl.Trained{1} 437s ***** demo 437s X = [1, 2; 3, 4; 5, 6]; 437s Y = {'A'; 'B'; 'A'}; 437s model = fitcknn (X, Y); 437s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 437s ## Calculate loss using custom loss function 437s L = loss (model, X, Y, 'LossFun', customLossFun) 437s ***** demo 437s X = [1, 2; 3, 4; 5, 6]; 437s Y = {'A'; 'B'; 'A'}; 437s model = fitcknn (X, Y); 437s ## Calculate loss using 'mincost' loss function 437s L = loss (model, X, Y, 'LossFun', 'mincost') 437s ***** demo 437s X = [1, 2; 3, 4; 5, 6]; 437s Y = ['1'; '2'; '3']; 437s model = fitcknn (X, Y); 437s X_test = [3, 3; 5, 7]; 437s Y_test = ['1'; '2']; 437s ## Specify custom Weights 437s W = [1; 2]; 437s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 437s ***** demo 437s load fisheriris 437s mdl = fitcknn (meas, species); 437s X = mean (meas); 437s Y = {'versicolor'}; 437s m = margin (mdl, X, Y) 437s ***** demo 437s X = [1, 2; 4, 5; 7, 8; 3, 2]; 437s Y = [2; 1; 3; 2]; 437s ## Train the model 437s mdl = fitcknn (X, Y); 437s ## Specify Vars and Labels 437s Vars = 1; 437s Labels = 2; 437s ## Calculate partialDependence 437s [pd, x, y] = partialDependence (mdl, Vars, Labels); 437s ***** demo 437s X = [1, 2; 4, 5; 7, 8; 3, 2]; 437s Y = [2; 1; 3; 2]; 437s ## Train the model 437s mdl = fitcknn (X, Y); 437s ## Specify Vars and Labels 437s Vars = 1; 437s Labels = 1; 437s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 437s ## Calculate partialDependence using queryPoints 437s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 437s queryPoints) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s k = 10; 437s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = ones (4, 11); 437s y = ["a"; "a"; "b"; "b"]; 437s k = 10; 437s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s k = 10; 437s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s k = 10; 437s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s weights = ones (4,1); 437s a = ClassificationKNN (x, y, "Standardize", 1); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.Standardize}, {true}) 437s assert ({a.Sigma}, {std(x, [], 1)}) 437s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s weights = ones (4,1); 437s a = ClassificationKNN (x, y, "Standardize", false); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.Standardize}, {false}) 437s assert ({a.Sigma}, {[]}) 437s assert ({a.Mu}, {[]}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s s = ones (1, 3); 437s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.DistParameter}, {s}) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 437s assert (class (a), "ClassificationKNN"); 437s assert (a.DistParameter, 5) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 437s "NSMethod", "exhaustive"); 437s assert (class (a), "ClassificationKNN"); 437s assert (a.DistParameter, 5) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 437s assert (class (a), "ClassificationKNN"); 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 437s assert ({a.BucketSize}, {20}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y, "IncludeTies", true); 437s assert (class (a), "ClassificationKNN"); 437s assert (a.IncludeTies, true); 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y); 437s assert (class (a), "ClassificationKNN"); 437s assert (a.IncludeTies, false); 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s a = ClassificationKNN (x, y); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Prior, [0.5; 0.5]) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s prior = [0.5; 0.5]; 437s a = ClassificationKNN (x, y, "Prior", "empirical"); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Prior, prior) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "a"; "b"]; 437s prior = [0.75; 0.25]; 437s a = ClassificationKNN (x, y, "Prior", "empirical"); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Prior, prior) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "a"; "b"]; 437s prior = [0.5; 0.5]; 437s a = ClassificationKNN (x, y, "Prior", "uniform"); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Prior, prior) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s cost = eye (2); 437s a = ClassificationKNN (x, y, "Cost", cost); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Cost, [1, 0; 0, 1]) 437s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 437s y = ["a"; "a"; "b"; "b"]; 437s cost = eye (2); 437s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 437s assert (class (a), "ClassificationKNN") 437s assert (a.Cost, [1, 0; 0, 1]) 437s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 437s assert ({a.BucketSize}, {50}) 437s ***** test 437s x = [1, 2; 3, 4; 5,6; 5, 8]; 437s y = {'9'; '9'; '6'; '7'}; 437s a = ClassificationKNN (x, y); 437s assert (a.Prior, [0.5; 0.25; 0.25]) 437s ***** test 437s load fisheriris 437s x = meas; 437s y = species; 437s ClassNames = {'setosa', 'versicolor', 'virginica'}; 437s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 437s assert (a.ClassNames, ClassNames') 437s ***** error ClassificationKNN () 437s ***** error ... 437s ClassificationKNN (ones(4, 1)) 437s ***** error ... 437s ClassificationKNN (ones (4,2), ones (1,4)) 437s ***** error ... 437s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 437s ***** error ... 437s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 437s ***** error ... 437s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 437s ***** error ... 437s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 437s ***** error ... 437s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 437s ***** error ... 437s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 437s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 437s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 437s ***** error ... 437s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 437s ***** error ... 437s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 437s ***** error ... 437s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 437s ***** shared x, y 437s load fisheriris 437s x = meas; 437s y = species; 437s ***** test 437s xc = [min(x); mean(x); max(x)]; 437s obj = fitcknn (x, y, "NumNeighbors", 5); 437s [l, s, c] = predict (obj, xc); 437s assert (l, {"setosa"; "versicolor"; "virginica"}) 437s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 437s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 438s ***** test 438s xc = [min(x); mean(x); max(x)]; 438s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"; "versicolor"; "virginica"}) 438s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 438s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 438s ***** test 438s xc = [min(x); mean(x); max(x)]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 438s [l, s, c] = predict (obj, xc); 438s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 438s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 438s ***** test 438s xc = [min(x); mean(x); max(x)]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"; "versicolor"; "virginica"}) 438s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 438s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 438s ***** test 438s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 438s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 438s obj = fitcknn (x, y, "NumNeighbors", 5); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 438s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 438s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 5); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 0.6, 0.4], 1e-4) 438s assert (c, [1, 0.4, 0.6], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 0.5, 0.5], 1e-4) 438s assert (c, [1, 0.5, 0.5], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"}) 438s assert (s, [0.9, 0.1, 0], 1e-4) 438s assert (c, [0.1, 0.9, 1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 438s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"}) 438s assert (s, [0.8, 0.2, 0], 1e-4) 438s assert (c, [0.2, 0.8, 1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 1, 0], 1e-4) 438s assert (c, [1, 0, 1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 0.7, 0.3], 1e-4) 438s assert (c, [1, 0.3, 0.7], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 0.6, 0.4], 1e-4) 438s assert (c, [1, 0.4, 0.6], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"virginica"}) 438s assert (s, [0, 0.1, 0.9], 1e-4) 438s assert (c, [1, 0.9, 0.1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"virginica"}) 438s assert (s, [0, 0.1, 0.9], 1e-4) 438s assert (c, [1, 0.9, 0.1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"versicolor"}) 438s assert (s, [0, 1, 0], 1e-4) 438s assert (c, [1, 0, 1], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"}) 438s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 438s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 438s ***** test 438s xc = [5, 3, 5, 1.45]; 438s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"}) 438s assert (s, [0.8, 0.2, 0], 1e-4) 438s assert (c, [0.2, 0.8, 1], 1e-4) 438s ***** test 438s xc = [min(x); mean(x); max(x)]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa"; "versicolor"; "virginica"}) 438s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 438s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 438s ***** test 438s xc = [min(x); mean(x); max(x)]; 438s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 438s [l, s, c] = predict (obj, xc); 438s assert (l, {"setosa";"setosa";"setosa"}) 438s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 438s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 438s ***** error ... 438s predict (ClassificationKNN (ones (4,2), ones (4,1))) 438s ***** error ... 438s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 438s ***** error ... 438s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 438s ***** test 438s load fisheriris 438s model = fitcknn (meas, species, 'NumNeighbors', 5); 438s X = mean (meas); 438s Y = {'versicolor'}; 438s L = loss (model, X, Y); 438s assert (L, 0) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = {'A'; 'B'; 'A'}; 438s model = fitcknn (X, Y); 438s X_test = [1, 6; 3, 3]; 438s Y_test = {'A'; 'B'}; 438s L = loss (model, X_test, Y_test); 438s assert (abs (L - 0.6667) > 1e-5) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = {'A'; 'B'; 'A'}; 438s model = fitcknn (X, Y); 438s X_with_nan = [1, 2; NaN, 4]; 438s Y_test = {'A'; 'B'}; 438s L = loss (model, X_with_nan, Y_test); 438s assert (abs (L - 0.3333) < 1e-4) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = {'A'; 'B'; 'A'}; 438s model = fitcknn (X, Y); 438s X_with_nan = [1, 2; NaN, 4]; 438s Y_test = {'A'; 'B'}; 438s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 438s assert (isnan (L)) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = {'A'; 'B'; 'A'}; 438s model = fitcknn (X, Y); 438s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 438s L = loss (model, X, Y, 'LossFun', customLossFun); 438s assert (L, 0) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = [1; 2; 1]; 438s model = fitcknn (X, Y); 438s L = loss (model, X, Y, 'LossFun', 'classiferror'); 438s assert (L, 0) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = [true; false; true]; 438s model = fitcknn (X, Y); 438s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 438s assert (abs (L - 0.1269) < 1e-4) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = ['1'; '2'; '1']; 438s model = fitcknn (X, Y); 438s L = loss (model, X, Y, 'LossFun', 'classiferror'); 438s assert (L, 0) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = ['1'; '2'; '3']; 438s model = fitcknn (X, Y); 438s X_test = [3, 3]; 438s Y_test = ['1']; 438s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 438s assert (L, 1) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = ['1'; '2'; '3']; 438s model = fitcknn (X, Y); 438s X_test = [3, 3; 5, 7]; 438s Y_test = ['1'; '2']; 438s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 438s assert (L, 1) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = ['1'; '2'; '3']; 438s model = fitcknn (X, Y); 438s X_test = [3, 3; 5, 7]; 438s Y_test = ['1'; '2']; 438s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 438s assert (L, 1) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = ['1'; '2'; '3']; 438s model = fitcknn (X, Y); 438s X_test = [3, 3; 5, 7]; 438s Y_test = ['1'; '2']; 438s W = [1; 2]; 438s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 438s assert (abs (L - 0.6931) < 1e-4) 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1))) 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 438s ***** error ... 438s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 438s ***** error ... 438s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 438s ones (4,1), 'LossFun') 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 438s ones (4,1), 'LossFun', 'a') 438s ***** error ... 438s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 438s ones (4,1), 'Weights', 'w') 438s ***** test 438s load fisheriris 438s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 438s X = mean (meas); 438s Y = {'versicolor'}; 438s m = margin (mdl, X, Y); 438s assert (m, 1) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = [1; 2; 3]; 438s mdl = fitcknn (X, Y); 438s m = margin (mdl, X, Y); 438s assert (m, [1; 1; 1]) 438s ***** test 438s X = [7, 8; 9, 10]; 438s Y = ['1'; '2']; 438s mdl = fitcknn (X, Y); 438s m = margin (mdl, X, Y); 438s assert (m, [1; 1]) 438s ***** test 438s X = [11, 12]; 438s Y = {'1'}; 438s mdl = fitcknn (X, Y); 438s m = margin (mdl, X, Y); 438s assert (isnan (m)) 438s ***** test 438s X = [1, 2; 3, 4; 5, 6]; 438s Y = [1; 2; 3]; 438s mdl = fitcknn (X, Y); 438s X1 = [15, 16]; 438s Y1 = [1]; 438s m = margin (mdl, X1, Y1); 438s assert (m, -1) 438s ***** error ... 438s margin (ClassificationKNN (ones (4,2), ones (4,1))) 438s ***** error ... 438s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 438s ***** error ... 438s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 438s ***** error ... 438s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 438s ***** error ... 438s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 438s ***** shared X, Y, mdl 438s X = [1, 2; 4, 5; 7, 8; 3, 2]; 438s Y = [2; 1; 3; 2]; 438s mdl = fitcknn (X, Y); 438s ***** test 438s Vars = 1; 438s Labels = 2; 438s [pd, x, y] = partialDependence (mdl, Vars, Labels); 438s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 438s 0.5000, 0.5000]; 438s assert (pd, pdm) 439s ***** test 439s Vars = 1; 439s Labels = 2; 439s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 439s 'NumObservationsToSample', 5); 439s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 439s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 439s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 439s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 439s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 439s assert (abs (pdm - pd) < 1) 439s ***** test 439s Vars = 1; 439s Labels = 2; 439s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 439s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 439s 0.5000, 0.5000]; 439s assert (pd, pdm) 440s ***** test 440s Vars = [1, 2]; 440s Labels = 1; 440s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 440s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 440s queryPoints, 'UseParallel', true); 440s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 440s assert (pd, pdm) 440s ***** test 440s Vars = 1; 440s Labels = [1; 2]; 440s [pd, x, y] = partialDependence (mdl, Vars, Labels); 440s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 440s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 440s 0.5000, 0.5000, 0.5000]; 440s assert (pd, pdm) 440s ***** test 440s Vars = [1, 2]; 440s Labels = [1; 2]; 440s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 440s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 440s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 440s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 440s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 440s assert (pd, pdm) 440s ***** test 440s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 440s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 440s X = [X1, double(X2)]; 440s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 440s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 440s Vars = 1; 440s Labels = 1; 440s [pd, x, y] = partialDependence (mdl, Vars, Labels); 440s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 440s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 440s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 440s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 440s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 440s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 440s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 440s 0.7500, 0.7500, 0.7500]; 440s assert (pd, pdm) 441s ***** test 441s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 441s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 441s X = [X1, double(X2)]; 441s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 441s predictorNames = {'Feature1', 'Feature2'}; 441s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 441s Vars = 'Feature1'; 441s Labels = 1; 441s [pd, x, y] = partialDependence (mdl, Vars, Labels); 441s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 441s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 441s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 441s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 441s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 441s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 441s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 441s 0.7500, 0.7500, 0.7500]; 441s assert (pd, pdm) 441s ***** test 441s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 441s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 441s X = [X1, double(X2)]; 441s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 441s predictorNames = {'Feature1', 'Feature2'}; 441s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 441s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 441s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 441s new_X = [new_X1, double(new_X2)]; 441s Vars = 'Feature1'; 441s Labels = 1; 441s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 441s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 441s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 441s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 441s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 441s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 441s 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]; 441s assert (pd, pdm) 442s ***** error ... 442s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 442s ***** error ... 442s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 442s ***** error ... 442s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 442s ones (4,1), 'NumObservationsToSample') 442s ***** error ... 442s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 442s ones (4,1), 2) 442s ***** shared x, y, obj 442s load fisheriris 442s x = meas; 442s y = species; 442s covMatrix = cov (x); 442s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 442s 'mahalanobis', 'Cov', covMatrix); 442s ***** test 442s CVMdl = crossval (obj); 442s assert (class (CVMdl), "ClassificationPartitionedModel") 442s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 442s assert (CVMdl.KFold == 10) 442s assert (CVMdl.ModelParameters.NumNeighbors == 5) 442s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 442s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 442s assert (!CVMdl.ModelParameters.Standardize) 442s ***** test 442s CVMdl = crossval (obj, "KFold", 5); 442s assert (class (CVMdl), "ClassificationPartitionedModel") 442s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 442s assert (CVMdl.KFold == 5) 442s assert (CVMdl.ModelParameters.NumNeighbors == 5) 442s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 442s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 442s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 442s ***** test 442s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 442s CVMdl = crossval (obj, "HoldOut", 0.2); 442s assert (class (CVMdl), "ClassificationPartitionedModel") 442s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 442s assert (CVMdl.ModelParameters.NumNeighbors == 5) 442s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 442s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 442s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 442s ***** test 442s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 442s CVMdl = crossval (obj, "LeaveOut", 'on'); 442s assert (class (CVMdl), "ClassificationPartitionedModel") 442s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 442s assert (CVMdl.ModelParameters.NumNeighbors == 10) 442s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 442s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 442s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 443s ***** test 443s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 443s partition = cvpartition (y, 'KFold', 3); 443s CVMdl = crossval (obj, 'cvPartition', partition); 443s assert (class (CVMdl), "ClassificationPartitionedModel") 443s assert (CVMdl.KFold == 3) 443s assert (CVMdl.ModelParameters.NumNeighbors == 10) 443s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 443s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 443s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 443s ***** error ... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 443s ***** error... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 443s ***** error ... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 443s ***** error ... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 443s ***** error ... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 443s ***** error ... 443s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 443s 162 tests, 162 passed, 0 known failure, 0 skipped 443s [inst/Classification/ClassificationGAM.m] 443s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationGAM.m 443s ***** demo 443s ## Train a GAM classifier for binary classification 443s ## using specific data and plot the decision boundaries. 443s 443s ## Define specific data 443s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 443s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 443s Y = [0; 0; 0; 0; 0; ... 443s 1; 1; 1; 1; 1]; 443s 443s ## Train the GAM model 443s obj = fitcgam (X, Y, "Interactions", "all") 443s 443s ## Create a grid of values for prediction 443s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 443s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 443s [x1G, x2G] = meshgrid (x1, x2); 443s XGrid = [x1G(:), x2G(:)]; 443s [labels, score] = predict (obj, XGrid); 443s ***** test 443s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 443s y = [0; 0; 1; 1]; 443s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 443s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 443s assert (class (a), "ClassificationGAM"); 443s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 443s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 443s assert (a.ClassNames, {'0'; '1'}) 443s assert (a.PredictorNames, PredictorNames) 443s assert (a.BaseModel.Intercept, 0) 444s ***** test 444s load fisheriris 444s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 444s X = meas(inds, :); 444s Y = species(inds, :)'; 444s Y = strcmp (Y, 'virginica')'; 444s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 444s assert (class (a), "ClassificationGAM"); 444s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 444s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 444s assert (a.ClassNames, {'0'; '1'}) 444s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 444s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 444s assert (a.ModelwInt.Intercept, 0) 449s ***** test 449s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 449s Y = [0; 1; 0; 1; 1]; 449s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 449s assert (class (a), "ClassificationGAM"); 449s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 449s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 449s assert (a.ClassNames, {'0'; '1'}) 449s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 449s assert (a.Knots, [4, 4, 4]) 449s assert (a.Order, [3, 3, 3]) 449s assert (a.DoF, [7, 7, 7]) 449s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 450s ***** error ClassificationGAM () 450s ***** error ... 450s ClassificationGAM (ones(4, 1)) 450s ***** error ... 450s ClassificationGAM (ones (4,2), ones (1,4)) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 450s ***** error ... 450s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 450s ***** error ... 450s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 450s ***** error ... 450s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 450s ***** error ... 450s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 450s ***** error ... 450s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 450s ***** error ... 450s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 450s ***** test 450s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 450s y = [1; 0; 1; 0; 1]; 450s a = ClassificationGAM (x, y, "interactions", "all"); 450s l = {'0'; '0'; '0'; '0'; '0'}; 450s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 450s 0.4259, 0.5741; 0.3760, 0.6240]; 450s [labels, scores] = predict (a, x); 450s assert (class (a), "ClassificationGAM"); 450s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 450s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 450s assert (a.ClassNames, {'1'; '0'}) 450s assert (a.PredictorNames, {'x1', 'x2'}) 450s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 450s assert (labels, l) 450s assert (scores, s, 1e-1) 453s ***** test 453s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 453s y = [0; 0; 1; 1]; 453s interactions = [false, true, false; true, false, true; false, true, false]; 453s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 453s [label, score] = predict (a, x, "includeinteractions", true); 453s l = {'0'; '0'; '1'; '1'}; 453s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 453s assert (class (a), "ClassificationGAM"); 453s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 453s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 453s assert (a.ClassNames, {'0'; '1'}) 453s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 453s assert (a.ModelwInt.Intercept, 0) 453s assert (label, l) 453s assert (score, s, 1e-1) 457s ***** error ... 457s predict (ClassificationGAM (ones (4,2), ones (4,1))) 458s ***** error ... 458s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 459s ***** error ... 459s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 460s ***** shared x, y, obj 460s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 460s y = [0; 0; 1; 1]; 460s obj = fitcgam (x, y); 461s ***** test 461s CVMdl = crossval (obj); 461s assert (class (CVMdl), "ClassificationPartitionedModel") 461s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 461s assert (CVMdl.KFold == 10) 461s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 461s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 476s ***** test 476s CVMdl = crossval (obj, "KFold", 5); 476s assert (class (CVMdl), "ClassificationPartitionedModel") 476s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 476s assert (CVMdl.KFold == 5) 476s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 476s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 484s ***** test 484s CVMdl = crossval (obj, "HoldOut", 0.2); 484s assert (class (CVMdl), "ClassificationPartitionedModel") 484s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 484s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 484s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 485s ***** test 485s partition = cvpartition (y, 'KFold', 3); 485s CVMdl = crossval (obj, 'cvPartition', partition); 485s assert (class (CVMdl), "ClassificationPartitionedModel") 485s assert (CVMdl.KFold == 3) 485s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 485s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 490s ***** error ... 490s crossval (obj, "kfold") 490s ***** error... 490s crossval (obj, "kfold", 12, "holdout", 0.2) 490s ***** error ... 490s crossval (obj, "kfold", 'a') 490s ***** error ... 490s crossval (obj, "holdout", 2) 490s ***** error ... 490s crossval (obj, "leaveout", 1) 490s ***** error ... 490s crossval (obj, "cvpartition", 1) 490s 34 tests, 34 passed, 0 known failure, 0 skipped 490s [inst/Classification/ClassificationPartitionedModel.m] 490s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationPartitionedModel.m 490s ***** demo 490s 490s load fisheriris 490s x = meas; 490s y = species; 490s 490s ## Create a KNN classifier model 490s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 490s 490s ## Create a partition for 5-fold cross-validation 490s partition = cvpartition (y, "KFold", 5); 490s 490s ## Create the ClassificationPartitionedModel object 490s cvModel = crossval (obj, 'cvPartition', partition) 490s ***** demo 490s 490s load fisheriris 490s x = meas; 490s y = species; 490s 490s ## Create a KNN classifier model 490s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 490s 490s ## Create the ClassificationPartitionedModel object 490s cvModel = crossval (obj); 490s 490s ## Predict the class labels for the observations not used for training 490s [label, score, cost] = kfoldPredict (cvModel); 490s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 490s sum (strcmp (label, y)) / numel (y) *100, ... 490s sum (strcmp (label, y)), numel (y)) 490s ***** test 490s load fisheriris 490s a = fitcdiscr (meas, species, "gamma", 0.3); 490s cvModel = crossval (a, "KFold", 5); 490s assert (class (cvModel), "ClassificationPartitionedModel"); 490s assert (cvModel.NumObservations, 150); 490s assert (numel (cvModel.Trained), 5); 490s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 490s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 490s assert (cvModel.KFold, 5); 490s ***** test 490s load fisheriris 490s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 490s cvModel = crossval (a, "HoldOut", 0.3); 490s assert (class (cvModel), "ClassificationPartitionedModel"); 490s assert ({cvModel.X, cvModel.Y}, {meas, species}); 490s assert (cvModel.NumObservations, 150); 490s assert (numel (cvModel.Trained), 1); 490s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 490s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 490s ***** test 490s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 490s y = ["a"; "a"; "b"; "b"]; 490s a = fitcgam (x, y, "Interactions", "all"); 490s cvModel = crossval (a, "KFold", 5); 490s assert (class (cvModel), "ClassificationPartitionedModel"); 490s assert (cvModel.NumObservations, 4); 490s assert (numel (cvModel.Trained), 5); 490s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 490s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 490s assert (cvModel.KFold, 5); 519s ***** test 519s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 519s y = ["a"; "a"; "b"; "b"]; 519s a = fitcgam (x, y); 519s cvModel = crossval (a, "LeaveOut", "on"); 519s assert (class (cvModel), "ClassificationPartitionedModel"); 519s assert ({cvModel.X, cvModel.Y}, {x, y}); 519s assert (cvModel.NumObservations, 4); 519s assert (numel (cvModel.Trained), 4); 519s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 519s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 526s ***** test 526s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 526s y = ["a"; "a"; "b"; "b"]; 526s a = fitcknn (x, y); 526s partition = cvpartition (y, "KFold", 5); 526s cvModel = ClassificationPartitionedModel (a, partition); 526s assert (class (cvModel), "ClassificationPartitionedModel"); 526s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 526s assert (cvModel.NumObservations, 4); 526s assert (cvModel.ModelParameters.NumNeighbors, 1); 526s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 526s assert (cvModel.ModelParameters.Distance, "euclidean"); 526s assert (! cvModel.ModelParameters.Standardize); 526s ***** test 526s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 526s y = ["a"; "a"; "b"; "b"]; 526s a = fitcknn (x, y, "NSMethod", "exhaustive"); 526s partition = cvpartition (y, "HoldOut", 0.2); 526s cvModel = ClassificationPartitionedModel (a, partition); 526s assert (class (cvModel), "ClassificationPartitionedModel"); 526s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 526s assert ({cvModel.X, cvModel.Y}, {x, y}); 526s assert (cvModel.NumObservations, 4); 526s assert (cvModel.ModelParameters.NumNeighbors, 1); 526s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 526s assert (cvModel.ModelParameters.Distance, "euclidean"); 526s assert (! cvModel.ModelParameters.Standardize); 526s ***** test 526s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 526s y = ["a"; "a"; "b"; "b"]; 526s k = 3; 526s a = fitcknn (x, y, "NumNeighbors" ,k); 526s partition = cvpartition (y, "LeaveOut"); 526s cvModel = ClassificationPartitionedModel (a, partition); 526s assert (class (cvModel), "ClassificationPartitionedModel"); 526s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 526s assert ({cvModel.X, cvModel.Y}, {x, y}); 526s assert (cvModel.NumObservations, 4); 526s assert (cvModel.ModelParameters.NumNeighbors, k); 526s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 526s assert (cvModel.ModelParameters.Distance, "euclidean"); 526s assert (! cvModel.ModelParameters.Standardize); 526s ***** test 526s load fisheriris 526s inds = ! strcmp (species, 'setosa'); 526s x = meas(inds, 3:4); 526s y = grp2idx (species(inds)); 526s SVMModel = fitcsvm (x,y); 526s CVMdl = crossval (SVMModel, "KFold", 5); 526s assert (class (CVMdl), "ClassificationPartitionedModel") 526s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 526s assert (CVMdl.KFold == 5) 526s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 526s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 527s ***** test 527s load fisheriris 527s inds = ! strcmp (species, 'setosa'); 527s x = meas(inds, 3:4); 527s y = grp2idx (species(inds)); 527s obj = fitcsvm (x, y); 527s CVMdl = crossval (obj, "HoldOut", 0.2); 527s assert (class (CVMdl), "ClassificationPartitionedModel") 527s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 527s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 527s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 527s ***** test 527s load fisheriris 527s inds = ! strcmp (species, 'setosa'); 527s x = meas(inds, 3:4); 527s y = grp2idx (species(inds)); 527s obj = fitcsvm (x, y); 527s CVMdl = crossval (obj, "LeaveOut", 'on'); 527s assert (class (CVMdl), "ClassificationPartitionedModel") 527s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 527s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 527s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 527s ***** error ... 527s ClassificationPartitionedModel () 527s ***** error ... 527s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 527s ***** error ... 527s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 527s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 527s ***** error ... 527s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 527s ones (4,1)), 'Holdout') 527s ***** test 527s load fisheriris 527s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 527s cvModel = crossval (a, "Kfold", 4); 527s [label, score, cost] = kfoldPredict (cvModel); 527s assert (class(cvModel), "ClassificationPartitionedModel"); 527s assert ({cvModel.X, cvModel.Y}, {meas, species}); 527s assert (cvModel.NumObservations, 150); 527s ***** # assert (label, {"b"; "b"; "a"; "a"}); 527s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 527s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 527s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 527s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 527s ***** test 527s x = ones(4, 11); 527s y = {"a"; "a"; "b"; "b"}; 527s k = 3; 527s a = fitcknn (x, y, "NumNeighbors", k); 527s partition = cvpartition (y, "LeaveOut"); 527s cvModel = ClassificationPartitionedModel (a, partition); 527s [label, score, cost] = kfoldPredict (cvModel); 527s assert (class(cvModel), "ClassificationPartitionedModel"); 527s assert ({cvModel.X, cvModel.Y}, {x, y}); 527s assert (cvModel.NumObservations, 4); 527s assert (cvModel.ModelParameters.NumNeighbors, k); 527s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 527s assert (cvModel.ModelParameters.Distance, "euclidean"); 527s assert (! cvModel.ModelParameters.Standardize); 527s assert (label, {"b"; "b"; "a"; "a"}); 527s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 527s 0.6667, 0.3333], 1e-4); 527s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 527s 0.3333, 0.6667], 1e-4); 528s ***** error ... 528s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 528s 17 tests, 17 passed, 0 known failure, 0 skipped 528s [inst/Classification/ClassificationSVM.m] 528s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/Classification/ClassificationSVM.m 528s ***** demo 528s ## Create a Support Vector Machine classifier and determine margin for test 528s ## data. 528s load fisheriris 528s rng(1); ## For reproducibility 528s 528s ## Select indices of the non-setosa species 528s inds = !strcmp(species, 'setosa'); 528s 528s ## Select features and labels for non-setosa species 528s X = meas(inds, 3:4); 528s Y = grp2idx(species(inds)); 528s 528s ## Convert labels to +1 and -1 528s unique_classes = unique(Y); 528s Y(Y == unique_classes(1)) = -1; 528s Y(Y == unique_classes(2)) = 1; 528s 528s ## Partition data for training and testing 528s cv = cvpartition(Y, 'HoldOut', 0.15); 528s X_train = X(training(cv), :); 528s Y_train = Y(training(cv)); 528s X_test = X(test(cv), :); 528s Y_test = Y(test(cv)); 528s 528s ## Train the SVM model 528s CVSVMModel = fitcsvm(X_train, Y_train); 528s 528s ## Calculate margins 528s m = margin(CVSVMModel, X_test, Y_test); 528s disp(m); 528s ***** demo 528s ## Create a Support Vector Machine classifier and determine loss for test 528s ## data. 528s load fisheriris 528s rng(1); ## For reproducibility 528s 528s ## Select indices of the non-setosa species 528s inds = !strcmp(species, 'setosa'); 528s 528s ## Select features and labels for non-setosa species 528s X = meas(inds, 3:4); 528s Y = grp2idx(species(inds)); 528s 528s ## Convert labels to +1 and -1 528s unique_classes = unique(Y); 528s Y(Y == unique_classes(1)) = -1; 528s Y(Y == unique_classes(2)) = 1; 528s 528s ## Randomly partition the data into training and testing sets 528s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 528s 528s X_train = X(training(cv), :); 528s Y_train = Y(training(cv)); 528s 528s X_test = X(test(cv), :); 528s Y_test = Y(test(cv)); 528s 528s ## Train the SVM model 528s SVMModel = fitcsvm(X_train, Y_train); 528s 528s ## Calculate loss 528s 528s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 528s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 528s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 528s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 528s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 528s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 528s ***** test 528s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 528s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 528s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 528s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 528s assert (class (a), "ClassificationSVM"); 528s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 528s assert ({a.X, a.Y}, {x, y}) 528s assert (a.NumObservations, 5) 528s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 528s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 528s ***** test 528s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 528s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 528s a = ClassificationSVM (x, y); 528s assert (class (a), "ClassificationSVM"); 528s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 528s assert (a.ModelParameters.BoxConstraint, 1) 528s assert (a.ClassNames, [1; -1]) 528s assert (a.ModelParameters.KernelOffset, 0) 528s ***** test 528s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 528s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 528s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 528s "KernelOffset", 2); 528s assert (class (a), "ClassificationSVM"); 528s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 528s assert (a.ModelParameters.BoxConstraint, 2) 528s assert (a.ModelParameters.KernelOffset, 2) 528s ***** test 528s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 528s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 528s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 528s "PolynomialOrder", 3); 528s assert (class (a), "ClassificationSVM"); 528s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 528s assert (a.ModelParameters.PolynomialOrder, 3) 528s ***** error ClassificationSVM () 528s ***** error ... 528s ClassificationSVM (ones(10,2)) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (5,1)) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 528s ***** error ... 528s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 528s ***** error ... 528s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 528s ***** error ... 528s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 528s ***** error ... 528s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 528s ***** error ... 528s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 528s ***** error ... 528s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 528s ***** error ... 528s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 528s ***** error ... 528s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 528s ***** shared x, y, x_train, x_test, y_train, y_test, objST 528s load fisheriris 528s inds = ! strcmp (species, 'setosa'); 528s x = meas(inds, 3:4); 528s y = grp2idx (species(inds)); 528s ***** test 528s xc = [min(x); mean(x); max(x)]; 528s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 528s assert (isempty (obj.Alpha), true) 528s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 528s [label, score] = predict (obj, xc); 528s assert (label, [1; 2; 2]); 528s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 528s assert (score(:,1), -score(:,2), eps) 528s obj = fitPosterior (obj); 528s [label, probs] = predict (obj, xc); 528s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 1e-5); 528s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 528s ***** test 528s obj = fitcsvm (x, y); 528s assert (isempty (obj.Beta), true) 528s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 528s assert (numel (obj.Alpha), 24) 528s assert (obj.Bias, -14.415, 1e-3) 528s xc = [min(x); mean(x); max(x)]; 528s label = predict (obj, xc); 528s assert (label, [1; 2; 2]); 528s ***** error ... 528s predict (ClassificationSVM (ones (40,2), ones (40,1))) 528s ***** error ... 528s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 528s ***** error ... 528s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 528s ***** test 528s objST = fitcsvm (x, y); 528s objST.ScoreTransform = "a"; 528s ***** error ... 528s [labels, scores] = predict (objST, x); 528s ***** error ... 528s [labels, scores] = resubPredict (objST); 528s ***** test 528s rand ("seed", 1); 528s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 528s 'Tolerance', 1e-7); 528s obj = CVSVMModel.Trained{1}; 528s testInds = test (CVSVMModel.Partition); 528s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 528s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 528s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 528s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 528s assert (computed_margin, expected_margin, 1e-4); 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 528s ***** error ... 528s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 528s ***** test 528s rand ("seed", 1); 528s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 528s obj = CVSVMModel.Trained{1}; 528s testInds = test (CVSVMModel.Partition); 528s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 528s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 528s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 528s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 528s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 528s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 528s assert (L1, 2.8711, 1e-4); 528s assert (L2, 0.5333, 1e-4); 528s assert (L3, 10.9685, 1e-4); 528s assert (L4, 1.9827, 1e-4); 528s assert (L5, 1.5849, 1e-4); 528s assert (L6, 7.6739, 1e-4); 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones(2,1), "LossFun") 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "LossFun", 1) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "LossFun", "some") 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "Weights", ['a','b']) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "Weights", 'a') 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "Weights", [1,2,3]) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "Weights", 3) 528s ***** error ... 528s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 528s ones (2,1), "some", "some") 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 528s ***** error ... 528s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 528s ***** test 528s SVMModel = fitcsvm (x, y); 528s CVMdl = crossval (SVMModel, "KFold", 5); 528s assert (class (CVMdl), "ClassificationPartitionedModel") 528s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 528s assert (CVMdl.KFold == 5) 528s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 528s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 528s ***** test 528s obj = fitcsvm (x, y); 528s CVMdl = crossval (obj, "HoldOut", 0.2); 528s assert (class (CVMdl), "ClassificationPartitionedModel") 528s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 528s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 528s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 528s ***** test 528s obj = fitcsvm (x, y); 528s CVMdl = crossval (obj, "LeaveOut", 'on'); 528s assert (class (CVMdl), "ClassificationPartitionedModel") 528s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 528s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 528s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 529s "KFold", 5, "leaveout", 'on') 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 529s ***** error ... 529s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 529s 114 tests, 114 passed, 0 known failure, 0 skipped 529s [inst/cluster.m] 529s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cluster.m 529s ***** error cluster () 529s ***** error cluster ([1 1], "Cutoff", 1) 529s ***** error cluster ([1 2 1], "Bogus", 1) 529s ***** error cluster ([1 2 1], "Cutoff", -1) 529s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 529s ***** test 529s 6 tests, 6 passed, 0 known failure, 0 skipped 529s [inst/violin.m] 529s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/violin.m 529s ***** demo 529s clf 529s x = zeros (9e2, 10); 529s for i=1:10 529s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 529s endfor 529s h = violin (x, "color", "c"); 529s axis tight 529s set (h.violin, "linewidth", 2); 529s set (gca, "xgrid", "on"); 529s xlabel ("Variables") 529s ylabel ("Values") 529s ***** demo 529s clf 529s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 529s subplot (1,2,1) 529s title ("Grade 3 heights - vertical"); 529s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 529s violin (data, "Nbins", 10); 529s axis tight 529s 529s subplot(1,2,2) 529s title ("Grade 3 heights - horizontal"); 529s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 529s violin (data, "horizontal", "Nbins", 10); 529s axis tight 529s ***** demo 529s clf 529s data = exprnd (0.1, 500,4); 529s violin (data, "nbins", {5,10,50,100}); 529s axis ([0 5 0 max(data(:))]) 529s ***** demo 529s clf 529s data = exprnd (0.1, 500,4); 529s violin (data, "color", jet(4)); 529s axis ([0 5 0 max(data(:))]) 529s ***** demo 529s clf 529s data = repmat(exprnd (0.1, 500,1), 1, 4); 529s violin (data, "width", linspace (0.1,0.5,4)); 529s axis ([0 5 0 max(data(:))]) 529s ***** demo 529s clf 529s data = repmat(exprnd (0.1, 500,1), 1, 4); 529s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 529s axis ([0 5 0 max(data(:))]) 529s ***** test 529s hf = figure ("visible", "off"); 529s unwind_protect 529s data = exprnd (0.1, 500,4); 529s violin (data, "color", jet(4)); 529s axis ([0 5 0 max(data(:))]) 529s unwind_protect_cleanup 529s close (hf); 529s end_unwind_protect 530s ***** test 530s hf = figure ("visible", "off"); 530s unwind_protect 530s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 530s subplot (1,2,1) 530s title ("Grade 3 heights - vertical"); 530s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 530s violin (data, "Nbins", 10); 530s axis tight 530s unwind_protect_cleanup 530s close (hf); 530s end_unwind_protect 530s ***** test 530s hf = figure ("visible", "off"); 530s unwind_protect 530s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 530s subplot (1,2,1) 530s title ("Grade 3 heights - vertical"); 530s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 530s violin (data, "Nbins", 10); 530s axis tight 530s subplot(1,2,2) 530s title ("Grade 3 heights - horizontal"); 530s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 530s violin (data, "horizontal", "Nbins", 10); 530s axis tight 530s unwind_protect_cleanup 530s close (hf); 530s end_unwind_protect 530s ***** test 530s hf = figure ("visible", "off"); 530s unwind_protect 530s data = repmat(exprnd (0.1, 500,1), 1, 4); 530s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 530s axis ([0 5 0 max(data(:))]) 530s unwind_protect_cleanup 530s close (hf); 530s end_unwind_protect 531s ***** test 531s hf = figure ("visible", "off"); 531s unwind_protect 531s data = repmat(exprnd (0.1, 500,1), 1, 4); 531s violin (data, "width", linspace (0.1,0.5,4)); 531s axis ([0 5 0 max(data(:))]) 531s unwind_protect_cleanup 531s close (hf); 531s end_unwind_protect 531s 5 tests, 5 passed, 0 known failure, 0 skipped 531s [inst/manova1.m] 531s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/manova1.m 531s ***** demo 531s load carbig 531s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 531s ***** test 531s load carbig 531s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 531s assert (d, 3); 531s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 531s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 531s ***** test 531s load carbig 531s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 531s assert (d, 2); 531s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 531s [1e-12, 1e-12, 1e-12]'); 531s 2 tests, 2 passed, 0 known failure, 0 skipped 531s [inst/fitgmdist.m] 531s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitgmdist.m 531s ***** demo 531s ## Generate a two-cluster problem 531s C1 = randn (100, 2) + 2; 531s C2 = randn (100, 2) - 2; 531s data = [C1; C2]; 531s 531s ## Perform clustering 531s GMModel = fitgmdist (data, 2); 531s 531s ## Plot the result 531s figure 531s [heights, bins] = hist3([C1; C2]); 531s [xx, yy] = meshgrid(bins{1}, bins{2}); 531s bbins = [xx(:), yy(:)]; 531s contour (reshape (GMModel.pdf (bbins), size (heights))); 531s ***** demo 531s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 531s nbOrientations = 2; 531s initial_orientations = [38.0; 18.0]; 531s initial_weights = ones (1, nbOrientations) / nbOrientations; 531s initial_Sigma = 10 * ones (1, 1, nbOrientations); 531s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 531s "ComponentProportion", initial_weights); 531s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 531s "RegularizationValue", 0.0001) 531s ***** test 531s load fisheriris 531s classes = unique (species); 531s [~, score] = pca (meas, "NumComponents", 2); 531s options.MaxIter = 1000; 531s options.TolFun = 1e-6; 531s options.Display = "off"; 531s GMModel = fitgmdist (score, 2, "Options", options); 531s assert (isa (GMModel, "gmdistribution"), true); 531s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 531s 1 test, 1 passed, 0 known failure, 0 skipped 531s [inst/einstein.m] 531s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/einstein.m 531s ***** demo 531s einstein (0.4, 0.6) 531s ***** demo 531s einstein (0.2, 0.5) 531s ***** demo 531s einstein (0.6, 0.1) 531s ***** test 531s hf = figure ("visible", "off"); 531s unwind_protect 531s tiles = einstein (0.4, 0.6); 531s assert (isstruct (tiles), true); 531s unwind_protect_cleanup 531s close (hf); 531s end_unwind_protect 531s ***** error einstein 532s ***** error einstein (0.5) 532s ***** error einstein (0, 0.9) 532s ***** error einstein (0.4, 1) 532s ***** error einstein (-0.4, 1) 532s 6 tests, 6 passed, 0 known failure, 0 skipped 532s [inst/harmmean.m] 532s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/harmmean.m 532s ***** test 532s x = [0:10]; 532s y = [x;x+5;x+10]; 532s assert (harmmean (x), 0); 532s m = [0 8.907635160795225 14.30854471766802]; 532s assert (harmmean (y, 2), m', 4e-14); 532s assert (harmmean (y, "all"), 0); 532s y(2,4) = NaN; 532s m(2) = 9.009855936313949; 532s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 532s assert (harmmean (y', "omitnan"), m, 4e-14); 532s z = y + 20; 532s assert (harmmean (z, "all"), NaN); 532s assert (harmmean (z, "all", "includenan"), NaN); 532s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 532s m = [24.59488458841874 NaN 34.71244385944397]; 532s assert (harmmean (z'), m, 4e-14); 532s assert (harmmean (z', "includenan"), m, 4e-14); 532s m(2) = 29.84104075528277; 532s assert (harmmean (z', "omitnan"), m, 4e-14); 532s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 532s ***** test 532s x = repmat ([1:20;6:25], [5 2 6 3]); 532s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 532s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 532s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 532s assert (size (harmmean (x, [1 4 3])), [1 40]); 532s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 532s ***** test 532s x = repmat ([1:20;6:25], [5 2 6 3]); 532s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 532s assert (harmmean (x, [3 2]), m, 4e-14); 532s x(2,5,6,3) = NaN; 532s m(2,3) = NaN; 532s assert (harmmean (x, [3 2]), m, 4e-14); 532s m(2,3) = 13.06617961315406; 532s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 532s ***** error harmmean ("char") 532s ***** error harmmean ([1 -1 3]) 532s ***** error ... 532s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 532s ***** error ... 532s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 532s ***** error ... 532s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 532s 8 tests, 8 passed, 0 known failure, 0 skipped 532s [inst/chi2test.m] 532s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/chi2test.m 532s ***** error chi2test (); 532s ***** error chi2test ([1, 2, 3, 4, 5]); 532s ***** error chi2test ([1, 2; 2, 1+3i]); 532s ***** error chi2test ([NaN, 6; 34, 12]); 532s ***** error ... 532s p = chi2test (ones (3, 3), "mutual", []); 532s ***** error ... 532s p = chi2test (ones (3, 3, 3), "testtype", 2); 532s ***** error ... 532s p = chi2test (ones (3, 3, 3), "mutual"); 532s ***** error ... 532s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 532s ***** error ... 532s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 532s ***** error ... 532s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 532s ***** warning p = chi2test (ones (2)); 532s ***** warning p = chi2test (ones (3, 2)); 532s ***** warning p = chi2test (0.4 * ones (3)); 532s ***** test 532s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 532s p = chi2test (x); 532s assert (p, 0.017787, 1e-6); 532s ***** test 532s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 532s [p, chisq] = chi2test (x); 532s assert (chisq, 11.9421, 1e-4); 532s ***** test 532s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 532s [p, chisq, df] = chi2test (x); 532s assert (df, 4); 532s ***** test 532s ***** shared x 532s x(:,:,1) = [59, 32; 9,16]; 532s x(:,:,2) = [55, 24;12,33]; 532s x(:,:,3) = [107,80;17,56];%! 532s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 532s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 532s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 532s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 532s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 532s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 532s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 532s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 532s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 532s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 532s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 532s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 532s ***** test 532s [pval, chisq, df, E] = chi2test (x); 532s assert (chisq, 64.0982, 1e-4); 532s assert (df, 7); 532s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 532s ***** test 532s [pval, chisq, df, E] = chi2test (x, "joint", 2); 532s assert (chisq, 56.0943, 1e-4); 532s assert (df, 5); 532s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 532s ***** test 532s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 532s assert (chisq, 146.6058, 1e-4); 532s assert (df, 9); 532s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 532s ***** test 532s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 532s assert (chisq, 52.2509, 1e-4); 532s assert (df, 3); 532s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 532s ***** test 532s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 532s assert (chisq, 1.6034, 1e-4); 532s assert (df, 2); 532s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 532s 34 tests, 34 passed, 0 known failure, 0 skipped 532s [inst/squareform.m] 532s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/squareform.m 532s ***** shared v, m 532s v = 1:6; 532s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 532s ***** assert (squareform (v), m) 532s ***** assert (squareform (squareform (v)), v) 532s ***** assert (squareform (m), v) 532s ***** assert (squareform (v'), m) 532s ***** assert (squareform (1), [0 1;1 0]) 532s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 532s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 532s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 532s ***** test 532s for c = {@single, @double, @uint8, @uint32, @uint64} 532s f = c{1}; 532s assert (squareform (f (v)), f (m)) 532s assert (squareform (f (m)), f (v)) 532s endfor 532s 9 tests, 9 passed, 0 known failure, 0 skipped 532s [inst/confusionmat.m] 532s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/confusionmat.m 532s ***** test 532s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 532s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 532s 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; ... 532s 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]; 532s assert (confusionmat (Yt, Yp), C) 532s 1 test, 1 passed, 0 known failure, 0 skipped 532s [inst/shadow9/var.m] 532s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/shadow9/var.m 532s ***** assert (var (13), 0) 532s ***** assert (var (single (13)), single (0)) 532s ***** assert (var ([1,2,3]), 1) 532s ***** assert (var ([1,2,3], 1), 2/3, eps) 532s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 532s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 532s ***** assert (var (5, 99), 0) 532s ***** assert (var (5, 99, 1), 0) 532s ***** assert (var (5, 99, 2), 0) 532s ***** assert (var ([5 3], [99 99], 2), 1) 532s ***** assert (var ([1:7], [1:7]), 3) 532s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 532s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 532s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 532s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 532s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 532s ***** test 532s x = [-10:10]; 532s y = [x;x+5;x-5]; 532s assert (var (x), 38.5); 532s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 532s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 532s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 532s assert (var (y, "all"), 54.19354838709678, 1e-14); 532s y(2,4) = NaN; 532s assert (var (y, "all"), NaN); 532s assert (var (y, "all", "includenan"), NaN); 532s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 532s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 532s assert (var (y, [], 2), [38.5; NaN; 38.5]); 532s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 532s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 532s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 532s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 532s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 532s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 532s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 532s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 532s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 532s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 532s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 532s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 532s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 532s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 532s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 532s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 532s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 532s 60 * ones(1,1,2)) 532s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 532s 6 * ones(1,3,2)) 532s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 532s ***** test 532s x = reshape(1:18, [3 3 2]); 532s x([2, 14]) = NaN; 532s w = ones (3,3,2); 532s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 532s ***** test 532s x = reshape(1:18, [3 3 2]); 532s w = ones (3,3,2); 532s w([2, 14]) = NaN; 532s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 532s ***** assert (var ([1 2 3], "aLl"), 1); 532s ***** assert (var ([1 2 3], "OmitNan"), 1); 532s ***** assert (var ([1 2 3], "IncludeNan"), 1); 532s ***** test 532s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 532s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 532s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 532s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 532s assert (size (var (x, 0, [1 4 3])), [1, 40]); 532s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 532s ***** assert (var (3*magic(3)), [63 144 63]) 532s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 532s ***** assert (var (3*magic(3), 1), [42 96 42]) 532s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 532s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 532s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 532s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 532s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 532s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 532s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 532s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 532s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 532s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 532s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 532s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 532s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 532s ***** test 532s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 532s v = repmat (33.38912133891213, [10, 1, 1, 3]); 532s assert (var (x, 0, [3, 2]), v, 1e-14); 532s v = repmat (33.250, [10, 1, 1, 3]); 532s assert (var (x, 1, [3, 2]), v, 1e-14); 532s x(2,5,6,3) = NaN; 532s v(2,1,1,3) = NaN; 532s assert (var (x, 1, [3, 2]), v, 4e-14); 532s v = repmat (33.38912133891213, [10 1 1 3]); 532s v(2,1,1,3) = NaN; 532s assert (var (x, [], [3, 2]), v, 4e-14); 532s v(2,1,1,3) = 33.40177912169048; 532s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 532s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 532s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 532s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 532s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 532s ***** assert (var (magic (3), [], 3), zeros (3,3)) 532s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 532s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 532s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 532s ***** assert (var ([]), NaN) 532s ***** assert (class (var (single ([]))), "single") 532s ***** assert (var ([],[],1), NaN(1,0)) 532s ***** assert (var ([],[],2), NaN(0,1)) 532s ***** assert (var ([],[],3), []) 532s ***** assert (class (var (single ([]), [], 1)), "single") 532s ***** assert (var (ones (1,0)), NaN) 533s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 533s ***** assert (var (ones (1,0), [], 2), NaN) 533s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 533s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 533s ***** assert (var (ones (0,1)), NaN) 533s ***** assert (var (ones (0,1), [], 1), NaN) 533s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 533s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 533s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 533s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 533s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 533s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 533s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 533s ***** test 533s [~, m] = var ([]); 533s assert (m, NaN); 533s ***** test <*62395> 533s [~, m] = var (13); 533s assert (m, 13); 533s [~, m] = var (single(13)); 533s assert (m, single(13)); 533s [~, m] = var ([1, 2, 3; 3 2 1], []); 533s assert (m, [2 2 2]); 533s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 533s assert (m, [2 2 2]); 533s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 533s assert (m, [2 2]'); 533s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 533s assert (m, [1 2 3; 3 2 1]); 533s ***** test <*62395> 533s [~, m] = var (5,99); 533s assert (m, 5); 533s [~, m] = var ([1:7], [1:7]); 533s assert (m, 5); 533s [~, m] = var ([eye(3)], [1:3]); 533s assert (m, [1/6, 1/3, 0.5], eps); 533s [~, m] = var (ones (2,2,2), [1:2], 3); 533s assert (m, ones (2,2)); 533s [~, m] = var ([1 2; 3 4], 0, 'all'); 533s assert (m, 2.5, eps); 533s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 533s assert (m, [3.5, 5.5], eps); 533s ***** test 533s [v, m] = var (4 * eye (2), [1, 3]); 533s assert (v, [3, 3]); 533s assert (m, [1, 3]); 533s ***** test <*62395> 533s [~, m] = var ([]); 533s assert (m, NaN); 533s ***** test <*62395> 533s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 533s [~, m] = var (x, 0, [3 2]); 533s assert (m, mean (x, [3 2])); 533s [~, m] = var (x, 0, [1 2]); 533s assert (m, mean (x, [1 2])); 533s [~, m] = var (x, 0, [1 3 4]); 533s assert (m, mean (x, [1 3 4])); 533s ***** test 533s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 533s x(2,5,6,3) = NaN; 533s [~, m] = var (x, 0, [3 2], "omitnan"); 533s assert (m, mean (x, [3 2], "omitnan")); 533s ***** test <*63203> 533s [v, m] = var (Inf); 533s assert (v, NaN); 533s assert (m, Inf); 533s ***** test <*63203> 533s [v, m] = var (NaN); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3]); 533s assert (v, NaN); 533s assert (m, Inf); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3]'); 533s assert (v, NaN); 533s assert (m, Inf); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3]); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3]'); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3], [], 1); 533s assert (v, [0, NaN, 0]); 533s assert (m, [1, Inf, 3]); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3], [], 2); 533s assert (v, NaN); 533s assert (m, Inf); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3], [], 3); 533s assert (v, [0, NaN, 0]); 533s assert (m, [1, Inf, 3]); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3], [], 1); 533s assert (v, [0, NaN, 0]); 533s assert (m, [1, NaN, 3]); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3], [], 2); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3], [], 3); 533s assert (v, [0, NaN, 0]); 533s assert (m, [1, NaN, 3]); 533s ***** test <*63203> 533s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 533s assert (v, [2, NaN, 2]); 533s assert (m, [2, Inf, 4]); 533s ***** test <*63203> 533s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 533s assert (v, [2, NaN, 2]); 533s assert (m, [2, Inf, 4]); 533s ***** test <*63203> 533s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 533s assert (v, [2, NaN, 2]); 533s assert (m, [2, NaN, 4]); 533s ***** test <*63203> 533s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 533s assert (v, [2, NaN, 2]); 533s assert (m, [2, NaN, 4]); 533s ***** test <*63203> 533s [v, m] = var ([Inf, 2, NaN]); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([Inf, 2, NaN]'); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([NaN, 2, Inf]); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([NaN, 2, Inf]'); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([Inf, 2, NaN], [], 1); 533s assert (v, [NaN, 0, NaN]); 533s assert (m, [Inf, 2, NaN]); 533s ***** test <*63203> 533s [v, m] = var ([Inf, 2, NaN], [], 2); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([NaN, 2, Inf], [], 1); 533s assert (v, [NaN, 0, NaN]); 533s assert (m, [NaN, 2, Inf]); 533s ***** test <*63203> 533s [v, m] = var ([NaN, 2, Inf], [], 2); 533s assert (v, NaN); 533s assert (m, NaN); 533s ***** test <*63203> 533s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 533s assert (v, [2, 2, NaN]); 533s assert (m, [2, 4, NaN]); 533s ***** test <*63203> 533s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 533s assert (v, [2, 2, NaN]); 533s assert (m, [2, 4, NaN]); 533s ***** test <*63291> 533s [v, m] = var (2 * eye (2)); 533s assert (v, [2, 2]); 533s assert (m, [1, 1]); 533s ***** test <*63291> 533s [v, m] = var (4 * eye (2), [1, 3]); 533s assert (v, [3, 3]); 533s assert (m, [1, 3]); 533s ***** test <*63291> 533s [v, m] = var (sparse (2 * eye (2))); 533s assert (full (v), [2, 2]); 533s assert (full (m), [1, 1]); 533s ***** test <*63291> 533s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 533s assert (full (v), [3, 3]); 533s assert (full (m), [1, 3]); 533s ***** test<*63291> 533s [v, m] = var (sparse (eye (2))); 533s assert (issparse (v)); 533s assert (issparse (m)); 533s ***** test<*63291> 533s [v, m] = var (sparse (eye (2)), [1, 3]); 533s assert (issparse (v)); 533s assert (issparse (m)); 533s ***** error var () 533s ***** error var (1, 2, "omitnan", 3) 533s ***** error var (1, 2, 3, 4) 533s ***** error var (1, 2, 3, 4, 5) 533s ***** error var (1, "foo") 534s ***** error var (1, [], "foo") 534s ***** error var ([1 2 3], 2) 534s ***** error var ([1 2], 2, "all") 534s ***** error var ([1 2],0.5, "all") 534s ***** error var (1, -1) 534s ***** error var (1, [1 -1]) 534s ***** error ... 534s var ([1 2 3], [1 -1 0]) 534s ***** error var ({1:5}) 534s ***** error var ("char") 534s ***** error var (['A'; 'B']) 534s ***** error var (1, [], ones (2,2)) 534s ***** error var (1, 0, 1.5) 534s ***** error var (1, [], 0) 534s ***** error var (1, [], 1.5) 534s ***** error var ([1 2 3], [], [-1 1]) 534s ***** error ... 534s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 534s ***** error ... 534s var ([1 2], eye (2)) 534s ***** error ... 534s var ([1 2 3 4], [1 2; 3 4]) 534s ***** error ... 534s var ([1 2 3 4], [1 2; 3 4], 1) 534s ***** error ... 534s var ([1 2 3 4], [1 2; 3 4], [2 3]) 534s ***** error ... 534s var (ones (2, 2), [1 2], [1 2]) 534s ***** error ... 534s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 534s ***** error ... 534s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 534s ***** error var ([1 2 3; 2 3 4], [1 3 4]) 534s ***** error var ([1 2], [1 2 3]) 534s ***** error var (1, [1 2]) 534s ***** error var ([1 2 3; 2 3 4], [1 3 4], 1) 534s ***** error var ([1 2 3; 2 3 4], [1 3], 2) 534s ***** error var ([1 2], [1 2], 1) 534s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 534s var (1, [], 1, "all") 534s ***** error ... 534s var ([1 2 3; 2 3 4], [1 3], "all") 534s ***** error ... 534s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 534s 162 tests, 162 passed, 0 known failure, 0 skipped 534s [inst/shadow9/std.m] 534s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/shadow9/std.m 534s ***** assert (std (13), 0) 534s ***** assert (std (single (13)), single (0)) 534s ***** assert (std ([1,2,3]), 1) 534s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 534s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 534s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 534s ***** assert (std (5, 99), 0) 534s ***** assert (std (5, 99, 1), 0) 534s ***** assert (std (5, 99, 2), 0) 534s ***** assert (std ([5 3], [99 99], 2), 1) 534s ***** assert (std ([1:7], [1:7]), sqrt (3)) 534s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 534s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 534s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 534s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 534s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 534s ***** test 534s x = [-10:10]; 534s y = [x;x+5;x-5]; 534s assert (std (x), sqrt (38.5), 1e-14); 534s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 534s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 534s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 534s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 534s y(2,4) = NaN; 534s assert (std (y, "all"), NaN); 534s assert (std (y, "all", "includenan"), NaN); 534s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 534s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 534s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 534s assert (std (y, [], 2, "omitnan"), ... 534s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 534s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 534s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 534s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 534s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 534s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 534s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 534s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 534s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 534s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 534s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 534s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 534s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 534s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 534s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 534s sqrt(5)*ones(1,3,2), eps) 534s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 534s sqrt(5)*ones(3,1,2), eps) 534s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 534s sqrt(60)*ones(1,1,2),eps) 534s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 534s sqrt(6)*ones(1,3,2),eps) 534s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 534s sqrt(969),eps) 534s ***** test 534s x = reshape(1:18, [3 3 2]); 534s x([2, 14]) = NaN; 534s w = ones (3,3,2); 534s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 534s ***** test 534s x = reshape(1:18, [3 3 2]); 534s w = ones (3,3,2); 534s w([2, 14]) = NaN; 534s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 534s ***** assert (std ([1 2 3], "aLl"), 1); 534s ***** assert (std ([1 2 3], "OmitNan"), 1); 534s ***** assert (std ([1 2 3], "IncludeNan"), 1); 534s ***** test 534s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 534s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 534s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 534s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 534s assert (size (std (x, 0, [1 4 3])), [1, 40]); 534s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 534s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 534s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 534s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 534s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 534s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 534s sqrt([42 36 42]), eps) 534s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 534s sqrt([42 36 42]), eps) 534s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 534s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 534s sqrt([42 36 42]), eps) 534s ***** test 534s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 534s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 534s assert (std (x, 0, [3, 2]), v, 1e-14); 534s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 534s assert (std (x, 1, [3, 2]), v, 1e-14); 534s x(2,5,6,3) = NaN; 534s v(2,1,1,3) = NaN; 534s assert (std (x, 1, [3, 2]), v, 1e-14); 534s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 534s v(2,1,1,3) = NaN; 534s assert (std (x, [], [3, 2]), v, 1e-14); 534s v(2,1,1,3) = sqrt (33.40177912169048); 534s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 534s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 534s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 534s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 534s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 534s ***** assert (std (magic (3), [], 3), zeros (3,3)) 534s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 534s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 534s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 534s ***** assert (std ([]), NaN) 534s ***** assert (class (var (single ([]))), "single") 534s ***** assert (std ([],[],1), NaN(1,0)) 534s ***** assert (std ([],[],2), NaN(0,1)) 534s ***** assert (std ([],[],3), []) 534s ***** assert (class (var (single ([]), [], 1)), "single") 534s ***** assert (std (ones (1,0)), NaN) 534s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 534s ***** assert (std (ones (1,0), [], 2), NaN) 534s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 534s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 534s ***** assert (std (ones (0,1)), NaN) 534s ***** assert (std (ones (0,1), [], 1), NaN) 534s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 534s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 534s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 534s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 534s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 534s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 534s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 534s ***** test 534s [~, m] = std ([]); 534s assert (m, NaN); 534s ***** test <*62395> 534s [~, m] = std (13); 534s assert (m, 13); 534s [~, m] = std (single(13)); 534s assert (m, single(13)); 534s [~, m] = std ([1, 2, 3; 3 2 1], []); 534s assert (m, [2 2 2]); 534s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 534s assert (m, [2 2 2]); 534s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 534s assert (m, [2 2]'); 534s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 534s assert (m, [1 2 3; 3 2 1]); 534s ***** test <*62395> 534s [~, m] = std (5,99); 534s assert (m, 5); 534s [~, m] = std ([1:7], [1:7]); 534s assert (m, 5); 534s [~, m] = std ([eye(3)], [1:3]); 534s assert (m, [1/6, 1/3, 0.5], eps); 534s [~, m] = std (ones (2,2,2), [1:2], 3); 534s assert (m, ones (2,2)); 534s [~, m] = std ([1 2; 3 4], 0, 'all'); 534s assert (m, 2.5, eps); 534s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 534s assert (m, [3.5, 5.5], eps); 534s ***** test 534s [v, m] = std (4 * eye (2), [1, 3]); 534s assert (v, sqrt ([3, 3]), 1e-14); 534s assert (m, [1, 3]); 534s ***** test <*62395> 534s [~, m] = std ([]); 534s assert (m, NaN); 534s ***** test 534s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 534s [~, m] = std (x, 0, [3 2]); 534s assert (m, mean (x, [3 2])); 534s [~, m] = std (x, 0, [1 2]); 534s assert (m, mean (x, [1 2])); 534s [~, m] = std (x, 0, [1 3 4]); 534s assert (m, mean (x, [1 3 4])); 534s ***** test 534s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 534s x(2,5,6,3) = NaN; 534s [~, m] = std (x, 0, [3 2], "omitnan"); 534s assert (m, mean (x, [3 2], "omitnan")); 534s ***** test <*63203> 534s [v, m] = std (Inf); 534s assert (v, NaN); 534s assert (m, Inf); 534s ***** test <*63203> 534s [v, m] = std (NaN); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3]); 534s assert (v, NaN); 534s assert (m, Inf); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3]'); 534s assert (v, NaN); 534s assert (m, Inf); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3]); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3]'); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3], [], 1); 534s assert (v, [0, NaN, 0]); 534s assert (m, [1, Inf, 3]); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3], [], 2); 534s assert (v, NaN); 534s assert (m, Inf); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3], [], 3); 534s assert (v, [0, NaN, 0]); 534s assert (m, [1, Inf, 3]); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3], [], 1); 534s assert (v, [0, NaN, 0]); 534s assert (m, [1, NaN, 3]); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3], [], 2); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3], [], 3); 534s assert (v, [0, NaN, 0]); 534s assert (m, [1, NaN, 3]); 534s ***** test <*63203> 534s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 534s assert (v, sqrt ([2, NaN, 2])); 534s assert (m, [2, Inf, 4]); 534s ***** test <*63203> 534s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 534s assert (v, sqrt ([2, NaN, 2])); 534s assert (m, [2, Inf, 4]); 534s ***** test <*63203> 534s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 534s assert (v, sqrt ([2, NaN, 2])); 534s assert (m, [2, NaN, 4]); 534s ***** test <*63203> 534s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 534s assert (v, sqrt ([2, NaN, 2])); 534s assert (m, [2, NaN, 4]); 534s ***** test <*63203> 534s [v, m] = std ([Inf, 2, NaN]); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([Inf, 2, NaN]'); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([NaN, 2, Inf]); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([NaN, 2, Inf]'); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([Inf, 2, NaN], [], 1); 534s assert (v, [NaN, 0, NaN]); 534s assert (m, [Inf, 2, NaN]); 534s ***** test <*63203> 534s [v, m] = std ([Inf, 2, NaN], [], 2); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([NaN, 2, Inf], [], 1); 534s assert (v, [NaN, 0, NaN]); 534s assert (m, [NaN, 2, Inf]); 534s ***** test <*63203> 534s [v, m] = std ([NaN, 2, Inf], [], 2); 534s assert (v, NaN); 534s assert (m, NaN); 534s ***** test <*63203> 534s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 534s assert (v, sqrt ([2, 2, NaN])); 534s assert (m, [2, 4, NaN]); 534s ***** test <*63203> 534s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 534s assert (v, sqrt ([2, 2, NaN])); 534s assert (m, [2, 4, NaN]); 534s ***** test <*63291> 534s [v, m] = std (2 * eye (2)); 534s assert (v, sqrt ([2, 2])); 534s assert (m, [1, 1]); 534s ***** test <*63291> 534s [v, m] = std (4 * eye (2), [1, 3]); 534s assert (v, sqrt ([3, 3])); 534s assert (m, [1, 3]); 534s ***** test <*63291> 534s [v, m] = std (sparse (2 * eye (2))); 534s assert (full (v), sqrt ([2, 2])); 534s assert (full (m), [1, 1]); 534s ***** test <*63291> 534s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 534s assert (full (v), sqrt ([3, 3])); 534s assert (full (m), [1, 3]); 534s ***** test <*63291> 534s [v, m] = std (sparse (eye (2))); 534s assert (issparse (v)); 534s assert (issparse (m)); 534s ***** test <*63291> 534s [v, m] = std (sparse (eye (2)), [1, 3]); 534s assert (issparse (v)); 534s assert (issparse (m)); 534s ***** error std () 535s ***** error std (1, 2, "omitnan", 3) 535s ***** error std (1, 2, 3, 4) 535s ***** error std (1, 2, 3, 4, 5) 535s ***** error std (1, "foo") 535s ***** error std (1, [], "foo") 535s ***** error std ([1 2 3], 2) 535s ***** error std ([1 2], 2, "all") 535s ***** error std ([1 2],0.5, "all") 535s ***** error std (1, -1) 535s ***** error std (1, [1 -1]) 535s ***** error ... 535s std ([1 2 3], [1 -1 0]) 535s ***** error std ({1:5}) 535s ***** error std ("char") 535s ***** error std (['A'; 'B']) 535s ***** error std (1, [], ones (2,2)) 535s ***** error std (1, 0, 1.5) 535s ***** error std (1, [], 0) 535s ***** error std (1, [], 1.5) 535s ***** error std ([1 2 3], [], [-1 1]) 535s ***** error ... 535s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 535s ***** error ... 535s std ([1 2], eye (2)) 535s ***** error ... 535s std ([1 2 3 4], [1 2; 3 4]) 535s ***** error ... 535s std ([1 2 3 4], [1 2; 3 4], 1) 535s ***** error ... 535s std ([1 2 3 4], [1 2; 3 4], [2 3]) 535s ***** error ... 535s std (ones (2, 2), [1 2], [1 2]) 535s ***** error ... 535s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 535s ***** error ... 535s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 535s ***** error std ([1 2 3; 2 3 4], [1 3 4]) 535s ***** error std ([1 2], [1 2 3]) 535s ***** error std (1, [1 2]) 535s ***** error std ([1 2 3; 2 3 4], [1 3 4], 1) 535s ***** error std ([1 2 3; 2 3 4], [1 3], 2) 535s ***** error std ([1 2], [1 2], 1) 535s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 535s std (1, [], 1, "all") 535s ***** error ... 535s std ([1 2 3; 2 3 4], [1 3], "all") 535s ***** error ... 535s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 535s 162 tests, 162 passed, 0 known failure, 0 skipped 535s [inst/shadow9/mean.m] 535s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/shadow9/mean.m 535s ***** test 535s x = -10:10; 535s y = x'; 535s z = [y, y+10]; 535s assert (mean (x), 0); 535s assert (mean (y), 0); 535s assert (mean (z), [0, 10]); 535s ***** assert (mean (magic (3), 1), [5, 5, 5]) 535s ***** assert (mean (magic (3), 2), [5; 5; 5]) 535s ***** assert (mean (logical ([1 0 1 1])), 0.75) 535s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 535s ***** assert (mean ([1 2], 3), [1 2]) 535s ***** test 535s in = [1 2 3]; 535s out = 2; 535s assert (mean (in, "default"), mean (in)); 535s assert (mean (in, "default"), out); 535s assert (mean (in, "double"), out); 535s assert (mean (in, "native"), out); 535s ***** test 535s in = single ([1 2 3]); 535s out = 2; 535s assert (mean (in, "default"), mean (in)); 535s assert (mean (in, "default"), single (out)); 535s assert (mean (in, "double"), out); 535s assert (mean (in, "native"), single (out)); 535s ***** test 535s in = logical ([1 0 1]); 535s out = 2/3; 535s assert (mean (in, "default"), mean (in), eps); 535s assert (mean (in, "default"), out, eps); 535s assert (mean (in, "double"), out, eps); 535s assert (mean (in, "native"), out, eps); 535s ***** test 535s in = char ("ab"); 535s out = 97.5; 535s assert (mean (in, "default"), mean (in), eps); 535s assert (mean (in, "default"), out, eps); 535s assert (mean (in, "double"), out, eps); 535s ***** test 535s in = uint8 ([1 2 3]); 535s out = 2; 535s assert (mean (in, "default"), mean (in)); 535s assert (mean (in, "default"), out); 535s assert (mean (in, "double"), out); 535s assert (mean (in, "native"), uint8 (out)); 536s ***** test 536s in = uint8 ([0 1 2 3]); 536s out = 1.5; 536s out_u8 = 2; 536s assert (mean (in, "default"), mean (in), eps); 536s assert (mean (in, "default"), out, eps); 536s assert (mean (in, "double"), out, eps); 536s assert (mean (in, "native"), uint8 (out_u8)); 536s assert (class (mean (in, "native")), "uint8"); 536s ***** test # internal sum exceeding intmax 536s in = uint8 ([3 141 141 255]); 536s out = 135; 536s assert (mean (in, "default"), mean (in)); 536s assert (mean (in, "default"), out); 536s assert (mean (in, "double"), out); 536s assert (mean (in, "native"), uint8 (out)); 536s assert (class (mean (in, "native")), "uint8"); 536s ***** test # fractional answer with internal sum exceeding intmax 536s in = uint8 ([1 141 141 255]); 536s out = 134.5; 536s out_u8 = 135; 536s assert (mean (in, "default"), mean (in)); 536s assert (mean (in, "default"), out); 536s assert (mean (in, "double"), out); 536s assert (mean (in, "native"), uint8 (out_u8)); 536s assert (class (mean (in, "native")), "uint8"); 536s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 536s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 536s out_same = intmax ("uint64")-1; 536s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 536s out_opp = -1; 536s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 536s out_neg = intmin ("int64")+1; 536s 536s ## both positive 536s assert (mean (in_same, "default"), mean (in_same)); 536s assert (mean (in_same, "default"), double (out_same)); 536s assert (mean (in_same, "double"), double (out_same)); 536s assert (mean (in_same, "native"), uint64 (out_same)); 536s assert (class (mean (in_same, "native")), "uint64"); 536s 536s ## opposite signs 536s assert (mean (in_opp, "default"), mean (in_opp)); 536s assert (mean (in_opp, "default"), double (out_opp)); 536s assert (mean (in_opp, "double"), double (out_opp)); 536s assert (mean (in_opp, "native"), int64 (out_opp)); 536s assert (class (mean (in_opp, "native")), "int64"); 536s 536s ## both negative 536s assert (mean (in_neg, "default"), mean (in_neg)); 536s assert (mean (in_neg, "default"), double(out_neg)); 536s assert (mean (in_neg, "double"), double(out_neg)); 536s assert (mean (in_neg, "native"), int64(out_neg)); 536s assert (class (mean (in_neg, "native")), "int64"); 536s ***** test <54567> 536s in = [(intmin('int64')+5), (intmax('int64'))-5]; 536s assert (mean (in, "native"), int64(-1)); 536s assert (class (mean (in, "native")), "int64"); 536s assert (mean (double(in)), double(0) ); 536s assert (mean (in), double(-0.5) ); 536s assert (mean (in, "default"), double(-0.5) ); 536s assert (mean (in, "double"), double(-0.5) ); 536s assert (mean (in, "all", "native"), int64(-1)); 536s assert (mean (in, 2, "native"), int64(-1)); 536s assert (mean (in, [1 2], "native"), int64(-1)); 536s assert (mean (in, [2 3], "native"), int64(-1)); 536s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 536s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 536s ***** test 536s x = [-10:10]; 536s y = [x;x+5;x-5]; 536s assert (mean (x), 0); 536s assert (mean (y, 2), [0, 5, -5]'); 536s assert (mean (y, "all"), 0); 536s y(2,4) = NaN; 536s assert (mean (y', "omitnan"), [0 5.35 -5]); 536s z = y + 20; 536s assert (mean (z, "all"), NaN); 536s assert (mean (z, "all", "includenan"), NaN); 536s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 536s m = [20 NaN 15]; 536s assert (mean (z'), m); 536s assert (mean (z', "includenan"), m); 536s m = [20 25.35 15]; 536s assert (mean (z', "omitnan"), m); 536s assert (mean (z, 2, "omitnan"), m'); 536s assert (mean (z, 2, "native", "omitnan"), m'); 536s assert (mean (z, 2, "omitnan", "native"), m'); 536s ***** test 536s assert (mean (true, "all"), 1); 536s assert (mean (false), 0); 536s assert (mean ([true false true]), 2/3, 4e-14); 536s assert (mean ([true false true], 1), [1 0 1]); 536s assert (mean ([true false NaN], 1), [1 0 NaN]); 536s assert (mean ([true false NaN], 2), NaN); 536s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 536s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 536s ***** assert (mean ("abc"), double (98)) 536s ***** assert (mean ("ab"), double (97.5), eps) 536s ***** assert (mean ("abc", "double"), double (98)) 536s ***** assert (mean ("abc", "default"), double (98)) 536s ***** test 536s x = magic (4); 536s x([2, 9:12]) = NaN; 536s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 536s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 536s assert (mean (x,2), NaN(4,1), eps); 536s assert (mean (x,3), x, eps); 536s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 536s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 536s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 536s assert (mean (x, 3, 'omitnan'), x, eps); 536s ***** assert (mean ([]), NaN(1,1)) 536s ***** assert (mean (single([])), NaN(1,1,"single")) 536s ***** assert (mean ([], 1), NaN(1,0)) 536s ***** assert (mean ([], 2), NaN(0,1)) 536s ***** assert (mean ([], 3), NaN(0,0)) 536s ***** assert (mean (ones(1,0)), NaN(1,1)) 536s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 536s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 536s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 536s ***** assert (mean (ones(0,1)), NaN(1,1)) 536s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 536s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 536s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 536s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 536s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 536s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 536s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 536s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 536s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 536s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 536s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 536s ***** test 536s x = repmat ([1:20;6:25], [5 2 6 3]); 536s assert (size (mean (x, [3 2])), [10 1 1 3]); 536s assert (size (mean (x, [1 2])), [1 1 6 3]); 536s assert (size (mean (x, [1 2 4])), [1 1 6]); 536s assert (size (mean (x, [1 4 3])), [1 40]); 536s assert (size (mean (x, [1 2 3 4])), [1 1]); 536s ***** assert (mean (ones (2,2), 3), ones (2,2)) 536s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 536s ***** assert (mean (magic (3), 3), magic (3)) 536s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 536s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 536s ***** test 536s x = repmat ([1:20;6:25], [5 2 6 3]); 536s m = repmat ([10.5;15.5], [5 1 1 3]); 536s assert (mean (x, [3 2]), m, 4e-14); 536s x(2,5,6,3) = NaN; 536s m(2,1,1,3) = NaN; 536s assert (mean (x, [3 2]), m, 4e-14); 536s m(2,1,1,3) = 15.52301255230125; 536s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 536s ***** assert (mean ([1 2 3], "aLL"), 2) 536s ***** assert (mean ([1 2 3], "OmitNan"), 2) 536s ***** assert (mean ([1 2 3], "DOUBle"), 2) 536s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 536s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 536s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 536s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 537s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 537s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 537s 35184372088833-1/(2^8), eps(35184372088833)) 537s !!!!! known bug: https://octave.org/testfailure/?63848 537s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 537s 537s Location | Observed | Expected | Reason 537s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 537s ***** error mean () 537s ***** error mean (1, 2, 3) 538s ***** error mean (1, 2, 3, 4) 538s ***** error mean (1, "all", 3) 538s ***** error mean (1, "b") 538s ***** error mean (1, 1, "foo") 538s ***** error mean ("abc", "native") 538s ***** error mean ({1:5}) 538s ***** error mean (1, ones (2,2)) 538s ***** error mean (1, 1.5) 538s ***** error mean (1, 0) 538s ***** error mean (1, []) 538s ***** error mean (1, -1) 538s ***** error mean (1, -1.5) 538s ***** error mean (1, NaN) 538s ***** error mean (1, Inf) 538s ***** error mean (repmat ([1:20;6:25], [5 2]), -1) 538s ***** error mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 538s ***** error mean (1, ones(1,0)) 538s ***** error mean (1, [2 2]) 538s 80 tests, 79 passed, 0 known failure, 1 skipped 538s [inst/shadow9/median.m] 538s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/shadow9/median.m 538s ***** assert (median (1), 1) 538s ***** assert (median ([1,2,3]), 2) 538s ***** assert (median ([1,2,3]'), 2) 538s ***** assert (median (cat(3,3,1,2)), 2) 538s ***** assert (median ([3,1,2]), 2) 538s ***** assert (median ([2,4,6,8]), 5) 538s ***** assert (median ([8,2,6,4]), 5) 538s ***** assert (median (single ([1,2,3])), single (2)) 538s ***** assert (median ([1,2], 3), [1,2]) 538s ***** test 538s x = [1, 2, 3, 4, 5, 6]; 538s x2 = x'; 538s y = [1, 2, 3, 4, 5, 6, 7]; 538s y2 = y'; 538s 538s assert (median (x) == median (x2) && median (x) == 3.5); 538s assert (median (y) == median (y2) && median (y) == 4); 538s assert (median ([x2, 2 * x2]), [3.5, 7]); 538s assert (median ([y2, 3 * y2]), [4, 12]); 538s ***** test 538s in = [1 2 3]; 538s out = 2; 538s assert (median (in, "default"), median (in)); 538s assert (median (in, "default"), out); 538s ***** test 538s in = single ([1 2 3]); 538s out = 2; 538s assert (median (in, "default"), single (median (in))); 538s assert (median (in, "default"), single (out)); 538s assert (median (in, "double"), double (out)); 538s assert (median (in, "native"), single (out)); 538s ***** test 538s in = uint8 ([1 2 3]); 538s out = 2; 538s assert (median (in, "default"), double (median (in))); 538s assert (median (in, "default"), double (out)); 538s assert (median (in, "double"), out); 538s assert (median (in, "native"), uint8 (out)); 538s ***** test 538s in = logical ([1 0 1]); 538s out = 1; 538s assert (median (in, "default"), double (median (in))); 538s assert (median (in, "default"), double (out)); 538s assert (median (in, "double"), double (out)); 538s assert (median (in, "native"), double (out)); 538s ***** test 538s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 538s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 538s assert (median (x), y); 538s assert (median (x, 1), y); 538s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 538s assert (median (x, "omitnan"), y); 538s assert (median (x, 1, "omitnan"), y); 538s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 538s assert (median (x, 2, "omitnan"), y); 538s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 538s assert (median (x, 2), y); 538s assert (median (x, "all"), NaN); 538s assert (median (x, "all", "omitnan"), 2); 538s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 538s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 538s ***** test 538s assert (median (true, "all"), logical (1)); 538s assert (median (false), logical (0)); 538s assert (median ([true false true]), true); 538s assert (median ([true false true], 2), true); 538s assert (median ([true false true], 1), logical ([1 0 1])); 538s assert (median ([true false NaN], 1), [1 0 NaN]); 538s assert (median ([true false NaN], 2), NaN); 538s assert (median ([true false NaN], 2, "omitnan"), 0.5); 538s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 538s ***** test 538s x = repmat ([1:20;6:25], [5 2 6 3]); 538s assert (size (median (x, [3 2])), [10 1 1 3]); 538s assert (size (median (x, [1 2])), [1 1 6 3]); 538s assert (size (median (x, [1 2 4])), [1 1 6]); 538s assert (size (median (x, [1 4 3])), [1 40]); 538s assert (size (median (x, [1 2 3 4])), [1 1]); 538s ***** assert (median (ones (2,2), 3), ones (2,2)) 538s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 538s ***** assert (median (magic (3), 3), magic (3)) 538s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 538s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 538s ***** test 538s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 538s assert (median (x, [3 2]), [NaN NaN 1.4]'); 538s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 538s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 538s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 538s ***** assert (median (NaN), NaN) 538s ***** assert (median (NaN, "omitnan"), NaN) 538s ***** assert (median (NaN (2)), [NaN NaN]) 538s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 538s ***** assert (median ([1 NaN 3]), NaN) 538s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 538s ***** assert (median ([1 NaN 3], 2), NaN) 538s ***** assert (median ([1 NaN 3]'), NaN) 538s ***** assert (median ([1 NaN 3]', 1), NaN) 538s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 538s ***** assert (median ([1 NaN 3], "omitnan"), 2) 538s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 538s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 538s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 538s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 538s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 538s ***** assert (median ([1 2 NaN 3]), NaN) 538s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 538s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 538s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 538s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 538s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 538s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 538s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 538s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 538s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 538s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 538s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 538s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 538s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 538s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 538s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 538s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 538s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 538s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 538s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 538s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 538s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 538s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 538s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 538s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 538s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 538s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 538s ***** assert (median (NaN("single")), NaN("single")) 538s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 538s ***** assert (median (NaN("single"), "double"), NaN("double")) 538s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 538s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 538s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 538s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 538s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 538s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 539s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 539s ***** test <*64011> 539s x = [magic(3), magic(3)]; 539s x([3, 7, 11, 12, 16, 17]) = NaN; 539s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 539s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 539s assert (median (x), ynan); 539s assert (median (x, "omitnan"), yomitnan, eps); 539s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 539s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 539s ***** assert (median (Inf), Inf) 539s ***** assert (median (-Inf), -Inf) 539s ***** assert (median ([-Inf Inf]), NaN) 539s ***** assert (median ([3 Inf]), Inf) 539s ***** assert (median ([3 4 Inf]), 4) 539s ***** assert (median ([Inf 3 4]), 4) 539s ***** assert (median ([Inf 3 Inf]), Inf) 539s ***** assert (median ([1, 2, Inf]), 2) 539s ***** assert (median ([1, 2, Inf, Inf]), Inf) 539s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 539s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 539s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 539s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 539s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 539s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 539s ***** assert (median ([]), NaN) 539s ***** assert (median (ones(1,0)), NaN) 539s ***** assert (median (ones(0,1)), NaN) 539s ***** assert (median ([], 1), NaN(1,0)) 539s ***** assert (median ([], 2), NaN(0,1)) 539s ***** assert (median ([], 3), NaN(0,0)) 539s ***** assert (median (ones(1,0), 1), NaN(1,0)) 539s ***** assert (median (ones(1,0), 2), NaN(1,1)) 539s ***** assert (median (ones(1,0), 3), NaN(1,0)) 539s ***** assert (median (ones(0,1), 1), NaN(1,1)) 539s ***** assert (median (ones(0,1), 2), NaN(0,1)) 539s ***** assert (median (ones(0,1), 3), NaN(0,1)) 539s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 539s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 539s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 539s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 539s ***** assert (median([1 3 3i 2 1i]), 2) 539s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 539s ***** shared a, b, x, y 539s old_state = rand ("state"); 539s restore_state = onCleanup (@() rand ("state", old_state)); 539s rand ("state", 2); 539s a = rand (2,3,4,5); 539s b = rand (3,4,6,5); 539s x = sort (a, 4); 539s y = sort (b, 3); 539s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 539s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 539s ***** shared ## Clear shared to prevent variable echo for any later test failures 539s ***** test 539s x = ones(15,1,4); 539s x([13,15],1,:) = NaN; 539s assert (median (x, 1, "omitnan"), ones (1,1,4)) 539s ***** assert (median ([true, false]), true) 539s ***** assert (median (logical ([])), false) 539s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 539s ***** assert (median (uint8 ([])), uint8 (NaN)) 539s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 539s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 539s ***** assert (median (int8 ([])), int8 (NaN)) 539s ***** assert (median (single ([1, 3, 4])), single (3)) 539s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 539s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 539s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 539s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 539s int8 ([64 65 65 67])) 539s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 539s int8 ([126; 4])) 539s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 539s intmax ("int64") - 1) 539s ***** assert <54567> (median ( ... 539s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 539s int64([intmax("int64") - 1; 2])) 539s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 539s intmax ("uint64") - 1) 539s ***** assert <54567> (median ( ... 539s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 539s uint64([intmax("uint64") - 1; 2])) 539s ***** assert <54567> (median (... 539s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 539s int8(-1)) 539s ***** assert <54567> (median ([int8([1 2 3 4]); ... 539s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 539s int8([3;-1])) 539s ***** assert <54567> (median (... 539s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 539s int64(-1)) 539s ***** assert <54567> (median ([int64([1 2 3 4]); ... 539s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 539s int64([3;-1])) 539s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 539s intmax("uint64")-1) 539s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 539s double(intmax("uint64")-1)) 539s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 539s double(intmax("uint64")-1)) 539s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 539s intmax("uint64")-1) 539s ***** assert (median ([1 2 3], "aLL"), 2) 539s ***** assert (median ([1 2 3], "OmitNan"), 2) 539s ***** assert (median ([1 2 3], "DOUBle"), 2) 539s ***** error median () 539s ***** error median (1, 2, 3) 539s ***** error median (1, 2, 3, 4) 539s ***** error median (1, "all", 3) 539s ***** error median (1, "b") 539s ***** error median (1, 1, "foo") 540s ***** error <'all' cannot be used with> median (1, 3, "all") 540s ***** error <'all' cannot be used with> median (1, [2 3], "all") 540s ***** error median ({1:5}) 540s ***** error median ("char") 540s ***** error median(1, "double", "native") 540s ***** error median (1, ones (2,2)) 540s ***** error median (1, 1.5) 540s ***** error median (1, 0) 540s ***** error median ([1 2 3], [-1 1]) 540s ***** error median(1, [1 2 2]) 540s 159 tests, 159 passed, 0 known failure, 0 skipped 540s [inst/adtest.m] 540s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/adtest.m 540s ***** error adtest (); 540s ***** error adtest (ones (20,2)); 540s ***** error adtest ([1+i,0-3i]); 540s ***** error ... 540s adtest (ones (20,1), "Distribution", "normal"); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"norm", 5}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"ev", 5}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", 35); 540s ***** error ... 540s adtest (rand (20,1), "Name", "norm"); 540s ***** error ... 540s adtest (rand (20,1), "Name", {"norm", 75, 10}); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 540s ***** error ... 540s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 540s ***** error ... 540s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 540s "Asymptotic", true); 540s ***** error ... 540s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 540s "Alpha", 0.000000001); 540s ***** error ... 540s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 540s "Alpha", 0.999999999); 540s ***** error ... 540s adtest (10); 540s ***** warning ... 540s randn ("seed", 34); 540s adtest (ones (20,1), "Alpha", 0.000001); 540s ***** warning ... 540s randn ("seed", 34); 540s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 540s ***** warning ... 540s randn ("seed", 34); 540s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 540s ***** test 540s load examgrades 540s x = grades(:,1); 540s [h, pval, adstat, cv] = adtest (x); 540s assert (h, false); 540s assert (pval, 0.1854, 1e-4); 540s assert (adstat, 0.5194, 1e-4); 540s assert (cv, 0.7470, 1e-4); 540s ***** test 540s load examgrades 540s x = grades(:,1); 540s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 540s assert (h, false); 540s assert (pval, 0.071363, 1e-6); 540s ***** test 540s load examgrades 540s x = grades(:,1); 540s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 540s assert (h, false); 540s assert (pval, 0.4687, 1e-4); 540s 25 tests, 25 passed, 0 known failure, 0 skipped 540s [inst/cdfcalc.m] 540s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/cdfcalc.m 540s ***** test 540s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 540s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 540s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 540s assert (xCDF, [2, 3, 4, 5, 6]'); 540s assert (n, 10); 540s ***** shared x 540s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 540s ***** error yCDF = cdfcalc (x); 540s ***** error [yCDF, xCDF] = cdfcalc (); 540s ***** error [yCDF, xCDF] = cdfcalc (x, x); 540s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 540s 5 tests, 5 passed, 0 known failure, 0 skipped 540s [inst/sampsizepwr.m] 540s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/sampsizepwr.m 540s ***** demo 540s ## Compute the mean closest to 100 that can be determined to be 540s ## significantly different from 100 using a t-test with a sample size 540s ## of 60 and a power of 0.8. 540s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 540s disp (mu1); 540s ***** demo 540s ## Compute the sample sizes required to distinguish mu0 = 100 from 540s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 540s ## smaller sample sizes of 1.5 and a power of 0.6. 540s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 540s ***** demo 540s ## Compute the sample size N required to distinguish p=.26 from p=.2 540s ## with a binomial test. The result is approximate, so make a plot to 540s ## see if any smaller N values also have the required power of 0.6. 540s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 540s nn = 1:250; 540s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 540s Nexact = min (nn(pwr >= 0.6)); 540s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 540s grid on 540s ***** demo 540s ## The company must test 52 bottles to detect the difference between a mean 540s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 540s ## to visualize how the sample size affects the power of the test. 540s 540s nout = sampsizepwr('t',[100 5],102,0.80); 540s nn = 1:100; 540s pwrout = sampsizepwr('t',[100 5],102,[],nn); 540s 540s figure; 540s plot (nn, pwrout, "b-", nout, 0.8, "ro") 540s title ("Power versus Sample Size") 540s xlabel ("Sample Size") 540s ylabel ("Power") 540s ***** error ... 540s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("z", 100, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("t", 100, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("t2", 60, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 540s ***** error ... 540s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("var", 0, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("var", -5, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("p", 0, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", -1, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", 0, [], 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 540s ***** error ... 540s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], [], [], 60); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], 110, [], []); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 540s ***** error ... 540s out = sampsizepwr ("var", 5, -1, [], 60); 540s ***** error ... 540s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 540s ***** error ... 540s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 540s ***** error ... 540s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], 110, 1.2); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], 110, 0); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 540s ***** error ... 540s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 540s ***** error ... 540s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 540s ***** error ... 540s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 540s ***** error ... 540s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 540s ***** warning ... 540s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 540s ***** warning ... 540s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 540s ***** test 540s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 540s assert (mu1, 103.67704316, 1e-8); 541s ***** test 541s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 541s assert (N1, 9); 541s assert (N2, 14); 541s ***** test 541s nn = 1:250; 541s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 541s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 541s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 541s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 541s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 541s ***** test 541s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 541s assert (nout, 52); 541s ***** test 541s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 541s assert (power, 0.5797373588621888, 1e-14); 541s ***** test 541s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 541s assert (nout, 18); 542s ***** test 542s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 542s assert (p1out, 25.65317979360237, 1e-14); 542s ***** test 542s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 542s assert (pwr, 0.716504004686586, 1e-14); 542s ***** test 542s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 542s assert (n, 11); 542s ***** test 542s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 542s assert ([n1, n2], [8, 16]); 543s 68 tests, 68 passed, 0 known failure, 0 skipped 543s [inst/procrustes.m] 543s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/procrustes.m 543s ***** demo 543s ## Create some random points in two dimensions 543s n = 10; 543s randn ("seed", 1); 543s X = normrnd (0, 1, [n, 2]); 543s 543s ## Those same points, rotated, scaled, translated, plus some noise 543s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 543s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 543s 543s ## Conform Y to X, plot original X and Y, and transformed Y 543s [d, Z] = procrustes (X, Y); 543s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 543s ***** demo 543s ## Find Procrustes distance and plot superimposed shape 543s 543s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 543s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 543s plot (X(:,1),X(:,2),"x"); 543s hold on 543s plot (Y(:,1),Y(:,2),"o"); 543s xlim ([0 100]); 543s ylim ([0 100]); 543s legend ("Target shape (X)", "Source shape (Y)"); 543s [d, Z] = procrustes (X, Y) 543s plot (Z(:,1), Z(:,2), "s"); 543s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 543s hold off 543s ***** demo 543s ## Apply Procrustes transformation to larger set of points 543s 543s ## Create matrices with landmark points for two triangles 543s X = [5, 0; 5, 5; 8, 5]; # target 543s Y = [0, 0; 1, 0; 1, 1]; # source 543s 543s ## Create a matrix with more points on the source triangle 543s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 543s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 543s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 543s 543s ## Plot both shapes, including the larger set of points for the source shape 543s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 543s hold on 543s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 543s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 543s xlim ([-1 10]); 543s ylim ([-1 6]); 543s legend ("Target shape (X)", "Source shape (Y)", ... 543s "More points on Y", "Location", "northwest"); 543s hold off 543s 543s ## Obtain the Procrustes transformation 543s [d, Z, transform] = procrustes (X, Y) 543s 543s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 543s ## on the source shape onto the target shape, and then visualize the results. 543s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 543s figure 543s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 543s hold on 543s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 543s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 543s xlim ([-1 10]); 543s ylim ([-1 6]); 543s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 543s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 543s legend ("Target shape (X)", "Source shape (Y)", ... 543s "More points on Y", "Transformed source shape (Z)", ... 543s "Transformed additional points", "Location", "northwest"); 543s hold off 543s ***** demo 543s ## Compare shapes without reflection 543s 543s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 543s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 543s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 543s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 543s plot (T(:,1), T(:,2), "x-"); 543s hold on 543s plot (S(:,1), S(:,2), "o-"); 543s legend ("Target shape (d)", "Source shape (b)"); 543s hold off 543s d_false = procrustes (T, S, "reflection", false); 543s printf ("Procrustes distance without reflection: %f\n", d_false); 543s d_true = procrustes (T, S, "reflection", true); 543s printf ("Procrustes distance with reflection: %f\n", d_true); 543s d_best = procrustes (T, S, "reflection", "best"); 543s printf ("Procrustes distance with best fit: %f\n", d_true); 543s ***** error procrustes (); 543s ***** error procrustes (1, 2, 3, 4, 5, 6); 543s ***** error ... 543s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 543s ***** error ... 543s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 543s ***** error ... 543s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 543s ***** error ... 543s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (11, 3)); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 4)); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), true); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 543s ***** error ... 543s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 543s 15 tests, 15 passed, 0 known failure, 0 skipped 543s [inst/vartestn.m] 543s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/vartestn.m 543s ***** demo 543s ## Test the null hypothesis that the variances are equal across the five 543s ## columns of data in the students’ exam grades matrix, grades. 543s 543s load examgrades 543s vartestn (grades) 543s ***** demo 543s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 543s ## equal across different model years. 543s 543s load carsmall 543s vartestn (MPG, Model_Year) 543s ***** demo 543s ## Use Levene’s test to test the null hypothesis that the variances in miles 543s ## per gallon (MPG) are equal across different model years. 543s 543s load carsmall 543s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 543s ***** demo 543s ## Test the null hypothesis that the variances are equal across the five 543s ## columns of data in the students’ exam grades matrix, grades, using the 543s ## Brown-Forsythe test. Suppress the display of the summary table of 543s ## statistics and the box plot. 543s 543s load examgrades 543s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 543s ***** error vartestn (); 543s ***** error vartestn (1); 543s ***** error ... 543s vartestn ([1, 2, 3, 4, 5, 6, 7]); 543s ***** error ... 543s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 543s ***** error ... 543s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 543s ***** error ... 543s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 543s ***** error ... 543s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 543s ***** error ... 543s vartestn (ones (50,3), "Display", "some"); 543s ***** error ... 543s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 543s ***** error ... 543s vartestn (ones (50,3), [], "som"); 543s ***** error ... 543s vartestn (ones (50,3), [], "some", "some"); 543s ***** error ... 543s vartestn (ones (50,3), [1, 2], "Display", "off"); 543s ***** test 543s load examgrades 543s [p, stat] = vartestn (grades, "Display", "off"); 543s assert (p, 7.908647337018238e-08, 1e-14); 543s assert (stat.chisqstat, 38.7332, 1e-4); 543s assert (stat.df, 4); 543s ***** test 543s load examgrades 543s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 543s assert (p, 9.523239714592791e-07, 1e-14); 543s assert (stat.fstat, 8.5953, 1e-4); 543s assert (stat.df, [4, 595]); 543s ***** test 543s load examgrades 543s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 543s assert (p, 7.219514351897161e-07, 1e-14); 543s assert (stat.fstat, 8.7503, 1e-4); 543s assert (stat.df, [4, 595]); 543s ***** test 543s load examgrades 543s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 543s assert (p, 1.312093241723211e-06, 1e-14); 543s assert (stat.fstat, 8.4160, 1e-4); 543s assert (stat.df, [4, 595]); 543s ***** test 543s load examgrades 543s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 543s assert (p, 8.235660885480556e-07, 1e-14); 543s assert (stat.fstat, 8.6766, 1e-4); 543s assert (stat.df, [4, 595]); 543s 17 tests, 17 passed, 0 known failure, 0 skipped 543s [inst/regress_gp.m] 543s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/regress_gp.m 543s ***** demo 543s ## Linear fitting of 1D Data 543s rand ("seed", 125); 543s X = 2 * rand (5, 1) - 1; 543s randn ("seed", 25); 543s Y = 2 * X - 1 + 0.3 * randn (5, 1); 543s 543s ## Points for interpolation/extrapolation 543s Xfit = linspace (-2, 2, 10)'; 543s 543s ## Fit regression model 543s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 543s 543s ## Plot fitted data 543s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 543s title ("Gaussian process regression with linear kernel"); 543s ***** demo 543s ## Linear fitting of 2D Data 543s rand ("seed", 135); 543s X = 2 * rand (4, 2) - 1; 543s randn ("seed", 35); 543s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 543s 543s ## Mesh for interpolation/extrapolation 543s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 543s Xfit = [x1(:), x2(:)]; 543s 543s ## Fit regression model 543s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 543s Ypred = reshape (Ypred, 10, 10); 543s YintU = reshape (Yint(:,1), 10, 10); 543s YintL = reshape (Yint(:,2), 10, 10); 543s 543s ## Plot fitted data 543s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 543s hold on; 543s h = mesh (x1, x2, Ypred, zeros (10, 10)); 543s set (h, "facecolor", "none", "edgecolor", "yellow"); 543s h = mesh (x1, x2, YintU, ones (10, 10)); 543s set (h, "facecolor", "none", "edgecolor", "cyan"); 543s h = mesh (x1, x2, YintL, ones (10, 10)); 543s set (h, "facecolor", "none", "edgecolor", "cyan"); 543s hold off 543s axis tight 543s view (75, 25) 543s title ("Gaussian process regression with linear kernel"); 543s ***** demo 543s ## Projection over basis function with linear kernel 543s pp = [2, 2, 0.3, 1]; 543s n = 10; 543s rand ("seed", 145); 543s X = 2 * rand (n, 1) - 1; 543s randn ("seed", 45); 543s Y = polyval (pp, X) + 0.3 * randn (n, 1); 543s 543s ## Powers 543s px = [sqrt(abs(X)), X, X.^2, X.^3]; 543s 543s ## Points for interpolation/extrapolation 543s Xfit = linspace (-1, 1, 100)'; 543s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 543s 543s ## Define a prior covariance assuming that the sqrt component is not present 543s Sp = 100 * eye (size (px, 2) + 1); 543s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 543s 543s ## Fit regression model 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 543s 543s ## Plot fitted data 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("Linear kernel over basis function with prior covariance"); 543s ***** demo 543s ## Projection over basis function with linear kernel 543s pp = [2, 2, 0.3, 1]; 543s n = 10; 543s rand ("seed", 145); 543s X = 2 * rand (n, 1) - 1; 543s randn ("seed", 45); 543s Y = polyval (pp, X) + 0.3 * randn (n, 1); 543s 543s ## Powers 543s px = [sqrt(abs(X)), X, X.^2, X.^3]; 543s 543s ## Points for interpolation/extrapolation 543s Xfit = linspace (-1, 1, 100)'; 543s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 543s 543s ## Fit regression model without any assumption on prior covariance 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 543s 543s ## Plot fitted data 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("Linear kernel over basis function without prior covariance"); 543s ***** demo 543s ## Projection over basis function with rbf kernel 543s pp = [2, 2, 0.3, 1]; 543s n = 10; 543s rand ("seed", 145); 543s X = 2 * rand (n, 1) - 1; 543s randn ("seed", 45); 543s Y = polyval (pp, X) + 0.3 * randn (n, 1); 543s 543s ## Powers 543s px = [sqrt(abs(X)), X, X.^2, X.^3]; 543s 543s ## Points for interpolation/extrapolation 543s Xfit = linspace (-1, 1, 100)'; 543s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 543s 543s ## Fit regression model with RBF kernel (standard parameters) 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 543s 543s ## Plot fitted data 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("RBF kernel over basis function with standard parameters"); 543s text (-0.5, 4, "theta = 5\n g = 0.01"); 543s ***** demo 543s ## Projection over basis function with rbf kernel 543s pp = [2, 2, 0.3, 1]; 543s n = 10; 543s rand ("seed", 145); 543s X = 2 * rand (n, 1) - 1; 543s randn ("seed", 45); 543s Y = polyval (pp, X) + 0.3 * randn (n, 1); 543s 543s ## Powers 543s px = [sqrt(abs(X)), X, X.^2, X.^3]; 543s 543s ## Points for interpolation/extrapolation 543s Xfit = linspace (-1, 1, 100)'; 543s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 543s 543s ## Fit regression model with RBF kernel with different parameters 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 543s 543s ## Plot fitted data 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("GP regression with RBF kernel and non default parameters"); 543s text (-0.5, 4, "theta = 10\n g = 0.01"); 543s 543s ## Fit regression model with RBF kernel with different parameters 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 543s 543s ## Plot fitted data 543s figure 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("GP regression with RBF kernel and non default parameters"); 543s text (-0.5, 4, "theta = 50\n g = 0.01"); 543s 543s ## Fit regression model with RBF kernel with different parameters 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 543s 543s ## Plot fitted data 543s figure 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("GP regression with RBF kernel and non default parameters"); 543s text (-0.5, 4, "theta = 50\n g = 0.001"); 543s 543s ## Fit regression model with RBF kernel with different parameters 543s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 543s 543s ## Plot fitted data 543s figure 543s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 543s Xfit, polyval (pp, Xfit), "g-;True;"); 543s axis tight 543s axis manual 543s hold on 543s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 543s hold off 543s title ("GP regression with RBF kernel and non default parameters"); 543s text (-0.5, 4, "theta = 50\n g = 0.05"); 543s ***** demo 543s ## RBF fitting on noiseless 1D Data 543s x = [0:2*pi/7:2*pi]'; 543s y = 5 * sin (x); 543s 543s ## Predictive grid of 500 equally spaced locations 543s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 543s 543s ## Fit regression model with RBF kernel 543s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 543s 543s ## Plot fitted data 543s r = mvnrnd (Yfit, diag (Ysd)', 50); 543s plot (xi, r', "c-"); 543s hold on 543s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 543s plot (x, y, ".k;Predictor points;", "markersize", 20) 543s plot (xi, 5 * sin (xi), "-y;True Function;"); 543s xlim ([-0.5,2*pi+0.5]); 543s ylim ([-10,10]); 543s hold off 543s title ("GP regression with RBF kernel on noiseless 1D data"); 543s text (0, -7, "theta = 5\n g = 0.01"); 543s ***** demo 543s ## RBF fitting on noisy 1D Data 543s x = [0:2*pi/7:2*pi]'; 543s x = [x; x]; 543s y = 5 * sin (x) + randn (size (x)); 543s 543s ## Predictive grid of 500 equally spaced locations 543s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 543s 543s ## Fit regression model with RBF kernel 543s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 543s 543s ## Plot fitted data 543s r = mvnrnd (Yfit, diag (Ysd)', 50); 543s plot (xi, r', "c-"); 543s hold on 543s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 543s plot (x, y, ".k;Predictor points;", "markersize", 20) 543s plot (xi, 5 * sin (xi), "-y;True Function;"); 543s xlim ([-0.5,2*pi+0.5]); 543s ylim ([-10,10]); 543s hold off 543s title ("GP regression with RBF kernel on noisy 1D data"); 543s text (0, -7, "theta = 5\n g = 0.01"); 543s ***** error regress_gp (ones (20, 2)) 543s ***** error regress_gp (ones (20, 2), ones (20, 1)) 543s ***** error ... 543s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 543s ***** error ... 543s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 543s 22 tests, 22 passed, 0 known failure, 0 skipped 543s [inst/fitcdiscr.m] 543s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitcdiscr.m 543s ***** demo 543s ## Train a linear discriminant classifier for Gamma = 0.5 543s ## and plot the decision boundaries. 543s 543s load fisheriris 543s idx = ! strcmp (species, "setosa"); 543s X = meas(idx,3:4); 543s Y = cast (strcmpi (species(idx), "virginica"), "double"); 543s obj = fitcdiscr (X, Y, "Gamma", 0.5) 543s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 543s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 543s [x1G, x2G] = meshgrid (x1, x2); 543s XGrid = [x1G(:), x2G(:)]; 543s pred = predict (obj, XGrid); 543s gidx = logical (str2num (cell2mat (pred))); 543s 543s figure 543s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 543s hold on 543s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 543s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 543s xlabel ("Petal length (cm)"); 543s ylabel ("Petal width (cm)"); 543s title ("Linear Discriminant Analysis Decision Boundary"); 543s legend ({"Versicolor Region", "Virginica Region", ... 543s "Sampled Versicolor", "Sampled Virginica"}, ... 543s "location", "northwest") 543s axis tight 543s hold off 543s ***** test 543s load fisheriris 543s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 543s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 543s assert (label, {'versicolor'}) 543s assert (score, [0, 0.9999, 0.0001], 1e-4) 543s assert (cost, [1, 0.0001, 0.9999], 1e-4) 543s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 543s assert (label, {'versicolor'}) 543s assert (score, [0, 0.6368, 0.3632], 1e-4) 543s assert (cost, [1, 0.3632, 0.6368], 1e-4) 543s assert (class (Mdl), "ClassificationDiscriminant"); 543s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 543s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 543s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 543s assert (Mdl.ClassNames, unique (species)) 543s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 543s 0.046361, 0.115388, 0.027622, 0.016355; ... 543s 0.083757, 0.027622, 0.185188, 0.021333; ... 543s 0.019201, 0.016355, 0.021333, 0.041882]; 543s assert (Mdl.Sigma, sigma, 1e-6) 543s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 543s 5.9360, 2.7700, 4.2600, 1.3260; ... 543s 6.5880, 2.9740, 5.5520, 2.0260]; 543s assert (Mdl.Mu, mu, 1e-14) 543s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 543s ***** error fitcdiscr () 543s ***** error fitcdiscr (ones (4,1)) 543s ***** error 543s fitcdiscr (ones (4,2), ones (4, 1), "K") 543s ***** error 543s fitcdiscr (ones (4,2), ones (3, 1)) 544s ***** error 544s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 544s 6 tests, 6 passed, 0 known failure, 0 skipped 544s [inst/hmmestimate.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/hmmestimate.m 544s ***** test 544s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 544s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 544s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 544s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 544s [transprobest, outprobest] = hmmestimate (sequence, states); 544s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 544s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 544s assert (transprobest, expectedtransprob, 0.001); 544s assert (outprobest, expectedoutprob, 0.001); 544s ***** test 544s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 544s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 544s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 544s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 544s "Two", "One", "One", "One", "One", "One", "One"}; 544s symbols = {"A", "B", "C"}; 544s statenames = {"One", "Two"}; 544s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 544s symbols, "statenames", statenames); 544s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 544s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 544s assert (transprobest, expectedtransprob, 0.001); 544s assert (outprobest, expectedoutprob, 0.001); 544s ***** test 544s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 544s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 544s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 544s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 544s pseudotransitions = [8, 2; 4, 6]; 544s pseudoemissions = [2, 4, 4; 7, 2, 1]; 544s [transprobest, outprobest] = hmmestimate (sequence, states, ... 544s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 544s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 544s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 544s 0.823529, 0.117647, 0.058824]; 544s assert (transprobest, expectedtransprob, 0.001); 544s assert (outprobest, expectedoutprob, 0.001); 544s 3 tests, 3 passed, 0 known failure, 0 skipped 544s [inst/bartlett_test.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/bartlett_test.m 544s ***** error bartlett_test () 544s ***** error ... 544s bartlett_test (1, 2, 3, 4); 544s ***** error bartlett_test (randn (50, 2), 0); 544s ***** error ... 544s bartlett_test (randn (50, 2), [1, 2, 3]); 544s ***** error ... 544s bartlett_test (randn (50, 1), ones (55, 1)); 544s ***** error ... 544s bartlett_test (randn (50, 1), ones (50, 2)); 544s ***** error ... 544s bartlett_test (randn (50, 2), [], 1.2); 544s ***** error ... 544s bartlett_test (randn (50, 2), [], "alpha"); 544s ***** error ... 544s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 544s ***** error ... 544s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 544s ***** warning ... 544s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 544s ***** test 544s load examgrades 544s [h, pval, chisq, df] = bartlett_test (grades); 544s assert (h, 1); 544s assert (pval, 7.908647337018238e-08, 1e-14); 544s assert (chisq, 38.73324, 1e-5); 544s assert (df, 4); 544s ***** test 544s load examgrades 544s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 544s assert (h, 1); 544s assert (pval, 0.01172, 1e-5); 544s assert (chisq, 8.89274, 1e-5); 544s assert (df, 2); 544s ***** test 544s load examgrades 544s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 544s assert (h, 0); 544s assert (pval, 0.88118, 1e-5); 544s assert (chisq, 0.02234, 1e-5); 544s assert (df, 1); 544s ***** test 544s load examgrades 544s grades = [grades; nan(10, 5)]; 544s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 544s assert (h, 0); 544s assert (pval, 0.88118, 1e-5); 544s assert (chisq, 0.02234, 1e-5); 544s assert (df, 1); 544s ***** test 544s load examgrades 544s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 544s assert (h, 0); 544s assert (pval, 0.01791, 1e-5); 544s assert (chisq, 5.60486, 1e-5); 544s assert (df, 1); 544s 16 tests, 16 passed, 0 known failure, 0 skipped 544s [inst/kmeans.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/kmeans.m 544s ***** demo 544s ## Generate a two-cluster problem 544s randn ("seed", 31) # for reproducibility 544s C1 = randn (100, 2) + 1; 544s randn ("seed", 32) # for reproducibility 544s C2 = randn (100, 2) - 1; 544s data = [C1; C2]; 544s 544s ## Perform clustering 544s rand ("seed", 1) # for reproducibility 544s [idx, centers] = kmeans (data, 2); 544s 544s ## Plot the result 544s figure; 544s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 544s hold on; 544s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 544s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 544s hold off; 544s ***** demo 544s ## Cluster data using k-means clustering, then plot the cluster regions 544s ## Load Fisher's iris data set and use the petal lengths and widths as 544s ## predictors 544s 544s load fisheriris 544s X = meas(:,3:4); 544s 544s figure; 544s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 544s title ("Fisher's Iris Data"); 544s xlabel ("Petal Lengths (cm)"); 544s ylabel ("Petal Widths (cm)"); 544s 544s ## Cluster the data. Specify k = 3 clusters 544s rand ("seed", 1) # for reproducibility 544s [idx, C] = kmeans (X, 3); 544s x1 = min (X(:,1)):0.01:max (X(:,1)); 544s x2 = min (X(:,2)):0.01:max (X(:,2)); 544s [x1G, x2G] = meshgrid (x1, x2); 544s XGrid = [x1G(:), x2G(:)]; 544s 544s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 544s figure; 544s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 544s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 544s hold on; 544s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 544s title ("Fisher's Iris Data"); 544s xlabel ("Petal Lengths (cm)"); 544s ylabel ("Petal Widths (cm)"); 544s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 544s hold off 544s ***** demo 544s ## Partition Data into Two Clusters 544s 544s randn ("seed", 1) # for reproducibility 544s r1 = randn (100, 2) * 0.75 + ones (100, 2); 544s randn ("seed", 2) # for reproducibility 544s r2 = randn (100, 2) * 0.5 - ones (100, 2); 544s X = [r1; r2]; 544s 544s figure; 544s plot (X(:,1), X(:,2), "."); 544s title ("Randomly Generated Data"); 544s rand ("seed", 1) # for reproducibility 544s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 544s "Replicates", 5, "Display", "final"); 544s figure; 544s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 544s hold on 544s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 544s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 544s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 544s title ("Cluster Assignments and Centroids"); 544s hold off 544s ***** demo 544s ## Assign New Data to Existing Clusters 544s 544s ## Generate a training data set using three distributions 544s randn ("seed", 5) # for reproducibility 544s r1 = randn (100, 2) * 0.75 + ones (100, 2); 544s randn ("seed", 7) # for reproducibility 544s r2 = randn (100, 2) * 0.5 - ones (100, 2); 544s randn ("seed", 9) # for reproducibility 544s r3 = randn (100, 2) * 0.75; 544s X = [r1; r2; r3]; 544s 544s ## Partition the training data into three clusters by using kmeans 544s 544s rand ("seed", 1) # for reproducibility 544s [idx, C] = kmeans (X, 3); 544s 544s ## Plot the clusters and the cluster centroids 544s 544s figure 544s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 544s hold on 544s plot (C(:,1), C(:,2), "kx"); 544s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 544s 544s ## Generate a test data set 544s randn ("seed", 25) # for reproducibility 544s r1 = randn (100, 2) * 0.75 + ones (100, 2); 544s randn ("seed", 27) # for reproducibility 544s r2 = randn (100, 2) * 0.5 - ones (100, 2); 544s randn ("seed", 29) # for reproducibility 544s r3 = randn (100, 2) * 0.75; 544s Xtest = [r1; r2; r3]; 544s 544s ## Classify the test data set using the existing clusters 544s ## Find the nearest centroid from each test data point by using pdist2 544s 544s D = pdist2 (C, Xtest, "euclidean"); 544s [group, ~] = find (D == min (D)); 544s 544s ## Plot the test data and label the test data using idx_test with gscatter 544s 544s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 544s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 544s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 544s "Data classified to Cluster 3", "Location", "NorthWest"); 544s title ("Assign New Data to Existing Clusters"); 544s ***** test 544s samples = 4; 544s dims = 3; 544s k = 2; 544s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 544s "emptyAction", "singleton"); 544s assert (size (cls), [samples, 1]); 544s assert (size (c), [k, dims]); 544s assert (size (d), [k, 1]); 544s assert (size (z), [samples, k]); 544s ***** test 544s samples = 4; 544s dims = 3; 544s k = 2; 544s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 544s "emptyAction", "singleton"); 544s assert (size (cls), [samples, 1]); 544s assert (size (c), [k, dims]); 544s assert (size (d), [k, 1]); 544s assert (size (z), [samples, k]); 544s ***** test 544s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 544s assert (cls, [1; 1]); 544s assert (c, [1.5, 0; NA, NA]); 544s ***** test 544s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 544s "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 544s ***** test 544s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 544s ***** test 544s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 544s ***** error kmeans (rand (3,2), 4); 544s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 544s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 544s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 544s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 544s ***** error kmeans (rand (3,4), 2, "start", "normal"); 544s ***** error kmeans (rand (4,3), 2, "replicates", i); 544s ***** error kmeans (rand (4,3), 2, "replicates", -1); 544s ***** error kmeans (rand (4,3), 2, "replicates", []); 544s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 544s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 544s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 544s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 544s ***** error kmeans (rand (4,3), 2, "maxiter", []); 544s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 544s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 544s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 544s 31 tests, 31 passed, 0 known failure, 0 skipped 544s [inst/dcov.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/dcov.m 544s ***** demo 544s base=@(x) (x- min(x))./(max(x)-min(x)); 544s N = 5e2; 544s x = randn (N,1); x = base (x); 544s z = randn (N,1); z = base (z); 544s # Linear relations 544s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 544s ly = x .* cy; 544s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 544s # Correlated Gaussian 544s cz = 1 - abs (cy); 544s gy = base ( ly + cz.*z); 544s # Shapes 544s sx = repmat (x,1,7); 544s sy = zeros (size (ly)); 544s v = 2 * rand (size(x,1),2) - 1; 544s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 544s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 544s tmp = R(35) * v.'; 544s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 544s tmp = R(45) * v.'; 544s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 544s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 544s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 544s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 544s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 544s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 544s sy = base (sy); 544s sx = base (sx); 544s # scaled shape 544s sc = 1/3; 544s ssy = (sy-0.5) * sc + 0.5; 544s n = size (ly,2); 544s ym = 1.2; 544s xm = 0.5; 544s fmt={'horizontalalignment','center'}; 544s ff = "% .2f"; 544s figure (1) 544s for i=1:n 544s subplot(4,n,i); 544s plot (x, gy(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 544s 544s subplot(4,n,i+n); 544s plot (x, ly(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 544s 544s subplot(4,n,i+2*n); 544s plot (sx(:,i), sy(:,i), '.b'); 544s axis tight 544s axis off 544s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 544s v = axis (); 544s 544s subplot(4,n,i+3*n); 544s plot (sx(:,i), ssy(:,i), '.b'); 544s axis (v) 544s axis off 544s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 544s endfor 544s ***** error dcov (randn (30, 5), randn (25,5)) 544s 1 test, 1 passed, 0 known failure, 0 skipped 544s [inst/ismissing.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/ismissing.m 544s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 544s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 544s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 544s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 544s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 544s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 544s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 544s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 544s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 544s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 544s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 544s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 544s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 544s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 544s ***** assert (ismissing (double (NaN)), true) 544s ***** assert (ismissing (single (NaN)), true) 544s ***** assert (ismissing (' '), true) 544s ***** assert (ismissing ({''}), true) 544s ***** assert (ismissing ({' '}), false) 544s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 544s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 544s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 544s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 544s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 544s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 544s ***** assert (ismissing ({'123', '', 123}), [false false false]) 544s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 544s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 544s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 544s ***** assert (ismissing ({1, 2, 3}), [false false false]) 544s ***** assert (ismissing ([struct struct struct]), [false false false]) 544s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 544s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 544s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 544s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 544s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 544s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 544s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 544s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 544s ***** assert (ismissing ([]), logical([])) 544s ***** assert (ismissing (''), logical([])) 544s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 544s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 544s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 544s ***** error ismissing () 544s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 544s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 544s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 544s ***** error ismissing (struct, 1) 544s 49 tests, 49 passed, 0 known failure, 0 skipped 544s [inst/fitlm.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/fitlm.m 544s ***** demo 544s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 544s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 544s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 544s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 544s 25.694 ]'; 544s 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]'; 544s 544s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 544s ***** demo 544s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 544s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 544s brands = {'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'}; 544s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 544s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 544s 544s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 544s "CategoricalVars",[1,2],"display","on"); 544s ***** test 544s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 544s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 544s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 544s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 544s 25.694 ]'; 544s 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]'; 544s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 544s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 544s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 544s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 544s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 544s assert (TAB{2,2}, 10, 1e-04); 544s assert (TAB{3,2}, 7.99999999999999, 1e-09); 544s assert (TAB{4,2}, 8.99999999999999, 1e-09); 544s assert (TAB{5,2}, 11.0001428571429, 1e-09); 544s assert (TAB{6,2}, 19.0001111111111, 1e-09); 544s assert (TAB{2,3}, 1.01775379540949, 1e-09); 544s assert (TAB{3,3}, 1.64107868458008, 1e-09); 544s assert (TAB{4,3}, 1.43932122062479, 1e-09); 544s assert (TAB{5,3}, 1.48983900477565, 1e-09); 544s assert (TAB{6,3}, 1.3987687997822, 1e-09); 544s assert (TAB{2,6}, 9.82555903510687, 1e-09); 544s assert (TAB{3,6}, 4.87484242844031, 1e-09); 544s assert (TAB{4,6}, 6.25294748040552, 1e-09); 544s assert (TAB{5,6}, 7.38344399756088, 1e-09); 544s assert (TAB{6,6}, 13.5834536158296, 1e-09); 544s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 544s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 544s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 544s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 544s ***** test 544s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 544s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 544s brands = bsxfun (@times, ones(6,1), [1,2,3]); 544s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 544s 544s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 544s "categoricalvars",[1,2],"display","off"); 544s assert (TAB{2,2}, 5.66666666666667, 1e-09); 544s assert (TAB{3,2}, -1.33333333333333, 1e-09); 544s assert (TAB{4,2}, -2.16666666666667, 1e-09); 544s assert (TAB{5,2}, 1.16666666666667, 1e-09); 544s assert (TAB{6,2}, -0.333333333333334, 1e-09); 544s assert (TAB{7,2}, -0.166666666666667, 1e-09); 544s assert (TAB{2,3}, 0.215165741455965, 1e-09); 544s assert (TAB{3,3}, 0.304290309725089, 1e-09); 544s assert (TAB{4,3}, 0.304290309725089, 1e-09); 544s assert (TAB{5,3}, 0.304290309725089, 1e-09); 544s assert (TAB{6,3}, 0.43033148291193, 1e-09); 544s assert (TAB{7,3}, 0.43033148291193, 1e-09); 544s assert (TAB{2,6}, 26.3362867542108, 1e-09); 544s assert (TAB{3,6}, -4.38178046004138, 1e-09); 544s assert (TAB{4,6}, -7.12039324756724, 1e-09); 544s assert (TAB{5,6}, 3.83405790253621, 1e-09); 544s assert (TAB{6,6}, -0.774596669241495, 1e-09); 544s assert (TAB{7,6}, -0.387298334620748, 1e-09); 544s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 544s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 544s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 544s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 544s assert (TAB{6,7}, 0.453570536021938, 1e-09); 544s assert (TAB{7,7}, 0.705316781644046, 1e-09); 544s ## Test with string ids for categorical variables 544s brands = {'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'; ... 544s 'Gourmet', 'National', 'Generic'}; 544s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 544s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 544s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 544s "categoricalvars",[1,2],"display","off"); 544s ***** test 544s load carsmall 544s X = [Weight,Horsepower,Acceleration]; 544s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 544s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 544s assert (TAB{2,2}, 47.9767628118615, 1e-09); 544s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 544s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 544s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 544s assert (TAB{2,3}, 3.87851641748551, 1e-09); 544s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 544s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 544s assert (TAB{5,3}, 0.193325043113178, 1e-09); 544s assert (TAB{2,6}, 12.369874881944, 1e-09); 544s assert (TAB{3,6}, -5.80228828790225, 1e-09); 544s assert (TAB{4,6}, -1.76626492228599, 1e-09); 544s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 544s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 544s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 544s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 544s assert (TAB{5,7}, 0.952359384151778, 1e-09); 544s 3 tests, 3 passed, 0 known failure, 0 skipped 544s [inst/binotest.m] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/inst/binotest.m 544s ***** demo 544s % flip a coin 1000 times, showing 475 heads 544s % Hypothesis: coin is fair, i.e. p=1/2 544s [h,p_val,ci] = binotest(475,1000,0.5) 544s % Result: h = 0 : null hypothesis not rejected, coin could be fair 544s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 544s % 0.444 <= p <= 0.506 with 95% confidence 544s ***** demo 544s % flip a coin 100 times, showing 65 heads 544s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 544s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 544s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 544s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 544s % 0 <= p <= 0.76 with 99% confidence 544s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 544s [h,p_val,ci] = binotest (51,235,1/6); 544s assert (p_val, 0.0437, 0.00005) 544s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 544s assert (p_val, 0.027, 0.0005) 544s 1 test, 1 passed, 0 known failure, 0 skipped 544s Checking C++ files ... 544s [src/libsvmread.cc] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/libsvmread.cc 544s ***** error [L, D] = libsvmread (24); 544s ***** error ... 544s D = libsvmread ("filename"); 544s ***** test 544s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 544s assert (size (L), [270, 1]); 544s assert (size (D), [270, 13]); 544s ***** test 544s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 544s assert (issparse (L), false); 544s assert (issparse (D), true); 544s 4 tests, 4 passed, 0 known failure, 0 skipped 544s [src/svmpredict.cc] 544s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/svmpredict.cc 544s ***** test 544s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 544s model = svmtrain (L, D, '-c 1 -g 0.07'); 544s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 544s assert (size (predict_label), size (dec_values)); 544s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 544s assert (dec_values(1), 1.225836001973273, 1e-14); 544s assert (dec_values(2), -0.3212992933043805, 1e-14); 544s assert (predict_label(1), 1); 545s ***** shared L, D, model 545s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 545s model = svmtrain (L, D, '-c 1 -g 0.07'); 545s ***** error ... 545s [p, a] = svmpredict (L, D, model); 545s ***** error p = svmpredict (L, D); 545s ***** error ... 545s p = svmpredict (single (L), D, model); 545s ***** error p = svmpredict (L, D, 123); 545s 5 tests, 5 passed, 0 known failure, 0 skipped 545s [src/editDistance.cc] 545s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/editDistance.cc 545s ***** error d = editDistance (1, 2, 3, 4); 545s ***** error ... 545s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 545s ***** error ... 545s [C, IA] = editDistance ({"AS","SD","AD"}); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, [1, 2]); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, -2); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, 1.25); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 545s ***** error ... 545s d = editDistance ("string1", "string2", [1, 2]); 545s ***** error ... 545s d = editDistance ("string1", "string2", -2); 545s ***** error ... 545s d = editDistance ("string1", "string2", 1.25); 545s ***** error ... 545s d = editDistance ({{"string1", "string2"}, 2}); 545s ***** error ... 545s d = editDistance ({{"string1", "string2"}, 2}, 2); 545s ***** error ... 545s d = editDistance ([1, 2, 3]); 545s ***** error ... 545s d = editDistance (["AS","SD","AD","AS"]); 545s ***** error ... 545s d = editDistance (["AS","SD","AD"], 2); 545s ***** error ... 545s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 545s ***** error ... 545s d = editDistance ([1,2,3], {"AS","AS","AD"}); 545s ***** error ... 545s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 545s ***** error ... 545s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 545s ***** test 545s d = editDistance ({"AS","SD","AD"}); 545s assert (d, [2; 1; 1]); 545s assert (class (d), "double"); 545s ***** test 545s C = editDistance ({"AS","SD","AD"}, 1); 545s assert (iscellstr (C), true); 545s assert (C, {"AS";"SD"}); 545s ***** test 545s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 545s assert (class (IA), "double"); 545s assert (IA, [1;2]); 545s ***** test 545s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 545s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 545s assert (class (IA), "double"); 545s assert (A(IA), C); 545s ***** test 545s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 545s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 545s assert (class (IA), "cell"); 545s assert (C, {"ASS"; "FDE"; "OPA"}); 545s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 545s assert (A(IA{2}), {"FDE"; "EDS"}); 545s assert (A(IA{3}), {"OPA"}); 545s ***** test 545s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 545s [C, IA, IC] = editDistance (A, 2); 545s assert (class (IA), "double"); 545s assert (A(IA), C); 545s assert (IC, [1; 1; 3; 1; 5]); 545s ***** test 545s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 545s assert (d, [0; 1; 2]); 545s assert (class (d), "double"); 545s ***** test 545s d = editDistance ({"AS","SD","AD"}, {"AS"}); 545s assert (d, [0; 2; 1]); 545s assert (class (d), "double"); 545s ***** test 545s d = editDistance ({"AS"}, {"AS","SD","AD"}); 545s assert (d, [0; 2; 1]); 545s assert (class (d), "double"); 545s ***** test 545s b = editDistance ("Octave", "octave"); 545s assert (b, 1); 545s assert (class (b), "double"); 545s 33 tests, 33 passed, 0 known failure, 0 skipped 545s [src/svmtrain.cc] 545s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/svmtrain.cc 545s ***** test 545s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 545s model = svmtrain(L, D, '-c 1 -g 0.07'); 545s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 545s assert (isstruct (model), true); 545s assert (isfield (model, "Parameters"), true); 545s assert (model.totalSV, 130); 545s assert (model.nr_class, 2); 545s assert (size (model.Label), [2, 1]); 545s ***** shared L, D 545s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 545s ***** error [L, D] = svmtrain (L, D); 545s ***** error ... 545s model = svmtrain (single (L), D); 545s ***** error ... 545s model = svmtrain (L, D, "", ""); 545s 4 tests, 4 passed, 0 known failure, 0 skipped 545s [src/fcnntrain.cc] 545s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/fcnntrain.cc 545s ***** shared X, Y, MODEL 545s load fisheriris 545s X = meas; 545s Y = grp2idx (species); 545s ***** error ... 545s model = fcnntrain (X, Y); 545s ***** error ... 545s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 545s ***** error ... 545s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 545s 33 tests, 33 passed, 0 known failure, 0 skipped 545s [src/libsvmwrite.cc] 545s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/libsvmwrite.cc 545s ***** shared L, D 545s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 545s ***** error libsvmwrite ("", L, D); 545s ***** error ... 545s libsvmwrite (tempname (), [L;L], D); 545s ***** error ... 545s OUT = libsvmwrite (tempname (), L, D); 545s ***** error ... 545s libsvmwrite (tempname (), single (L), D); 545s ***** error libsvmwrite (13412, L, D); 545s ***** error ... 545s libsvmwrite (tempname (), L, full (D)); 545s ***** error ... 545s libsvmwrite (tempname (), L, D, D); 545s 7 tests, 7 passed, 0 known failure, 0 skipped 545s [src/fcnnpredict.cc] 545s >>>>> /tmp/autopkgtest.23UlhO/build.7Lp/src/src/fcnnpredict.cc 545s ***** shared X, Y, MODEL 545s load fisheriris 545s X = meas; 545s Y = grp2idx (species); 545s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 545s ***** test 545s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 545s assert (numel (Y_pred), numel (Y)); 545s assert (isequal (size (Y_pred), size (Y)), true); 545s assert (columns (Y_scores), numel (unique (Y))); 545s assert (rows (Y_scores), numel (Y)); 545s ***** error ... 545s fcnnpredict (MODEL); 545s ***** error ... 545s [Q, W, E] = fcnnpredict (MODEL, X); 545s ***** error ... 545s fcnnpredict (1, X); 545s ***** error ... 545s fcnnpredict (struct ("L", {1, 2, 3}), X); 545s ***** error ... 545s fcnnpredict (struct ("L", 1), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", 1), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {1}), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 545s "Activations", [2]), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 545s "Activations", [2; 2]), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 545s "Activations", {{2, 2}}), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 545s "Activations", {{"sigmoid", "softmax"}}), X); 545s ***** error ... 545s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 545s "Activations", "sigmoid"), X); 545s ***** error ... 545s fcnnpredict (MODEL, complex (X)); 545s ***** error ... 545s fcnnpredict (MODEL, {1, 2, 3, 4}); 545s ***** error ... 545s fcnnpredict (MODEL, "asd"); 545s ***** error ... 545s fcnnpredict (MODEL, []); 545s ***** error ... 545s fcnnpredict (MODEL, X(:,[1:3])); 545s 20 tests, 20 passed, 0 known failure, 0 skipped 545s Done running the unit tests. 545s Summary: 11028 tests, 11025 passed, 1 known failures, 2 skipped 546s autopkgtest [07:50:50]: test command1: -----------------------] 546s autopkgtest [07:50:50]: test command1: - - - - - - - - - - results - - - - - - - - - - 546s command1 PASS 547s autopkgtest [07:50:51]: @@@@@@@@@@@@@@@@@@@@ summary 547s command1 PASS 552s nova [W] Using flock in prodstack6-arm64 552s Creating nova instance adt-plucky-arm64-octave-statistics-20250216-074144-juju-7f2275-prod-proposed-migration-environment-20-54cdb314-51cf-4298-832d-c856a09d6587 from image adt/ubuntu-plucky-arm64-server-20250216.img (UUID a098a761-c895-418e-827f-00d410a1ece9)... 552s nova [W] Timed out waiting for a540ab7a-5f45-4e94-87ba-233ff07b366c to get deleted.