0s autopkgtest [01:18:01]: starting date and time: 2025-02-16 01:18:01+0000 0s autopkgtest [01:18:01]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [01:18:01]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.51tnni0g/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-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-s390x-19.secgroup --name adt-plucky-s390x-octave-statistics-20250216-011801-juju-7f2275-prod-proposed-migration-environment-2-942dc211-f3d3-4dfb-97ea-492d61bd2d63 --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-s390x -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/ 115s autopkgtest [01:19:56]: testbed dpkg architecture: s390x 115s autopkgtest [01:19:56]: testbed apt version: 2.9.28 115s autopkgtest [01:19:56]: @@@@@@@@@@@@@@@@@@@@ test bed setup 116s autopkgtest [01:19:57]: testbed release detected to be: None 116s autopkgtest [01:19:57]: updating testbed package index (apt update) 117s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 117s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 117s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 117s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 117s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [13.1 kB] 117s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [823 kB] 117s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [73.1 kB] 117s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [3120 B] 117s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [164 kB] 117s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x Packages [760 B] 117s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [871 kB] 117s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3740 B] 117s Fetched 2062 kB in 1s (2121 kB/s) 118s Reading package lists... 119s Reading package lists... 119s Building dependency tree... 119s Reading state information... 119s Calculating upgrade... 119s The following packages were automatically installed and are no longer required: 119s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 119s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 119s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 119s linux-tools-6.11.0-8-generic 119s Use 'sudo apt autoremove' to remove them. 119s The following packages will be upgraded: 119s dash gcc-14-base libatomic1 libgcc-s1 libstdc++6 libtasn1-6 libxdmcp6 119s 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 119s Need to get 1155 kB of archives. 119s After this operation, 16.4 kB of additional disk space will be used. 119s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x dash s390x 0.5.12-12ubuntu1 [100 kB] 119s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x libatomic1 s390x 14.2.0-17ubuntu1 [9430 B] 119s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-base s390x 14.2.0-17ubuntu1 [53.5 kB] 119s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++6 s390x 14.2.0-17ubuntu1 [896 kB] 120s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-s1 s390x 14.2.0-17ubuntu1 [35.9 kB] 120s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x libtasn1-6 s390x 4.20.0-2 [48.6 kB] 120s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libxdmcp6 s390x 1:1.1.5-1 [11.0 kB] 120s Preconfiguring packages ... 120s Fetched 1155 kB in 1s (1753 kB/s) 120s (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 ... 80969 files and directories currently installed.) 120s Preparing to unpack .../dash_0.5.12-12ubuntu1_s390x.deb ... 120s Unpacking dash (0.5.12-12ubuntu1) over (0.5.12-9ubuntu1) ... 120s Setting up dash (0.5.12-12ubuntu1) ... 120s (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 ... 80969 files and directories currently installed.) 120s Preparing to unpack .../libatomic1_14.2.0-17ubuntu1_s390x.deb ... 120s Unpacking libatomic1:s390x (14.2.0-17ubuntu1) over (14.2.0-16ubuntu1) ... 120s Preparing to unpack .../gcc-14-base_14.2.0-17ubuntu1_s390x.deb ... 120s Unpacking gcc-14-base:s390x (14.2.0-17ubuntu1) over (14.2.0-16ubuntu1) ... 120s Setting up gcc-14-base:s390x (14.2.0-17ubuntu1) ... 120s (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 ... 80969 files and directories currently installed.) 120s Preparing to unpack .../libstdc++6_14.2.0-17ubuntu1_s390x.deb ... 120s Unpacking libstdc++6:s390x (14.2.0-17ubuntu1) over (14.2.0-16ubuntu1) ... 120s Setting up libstdc++6:s390x (14.2.0-17ubuntu1) ... 120s (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 ... 80969 files and directories currently installed.) 120s Preparing to unpack .../libgcc-s1_14.2.0-17ubuntu1_s390x.deb ... 120s Unpacking libgcc-s1:s390x (14.2.0-17ubuntu1) over (14.2.0-16ubuntu1) ... 120s Setting up libgcc-s1:s390x (14.2.0-17ubuntu1) ... 120s (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 ... 80969 files and directories currently installed.) 120s Preparing to unpack .../libtasn1-6_4.20.0-2_s390x.deb ... 120s Unpacking libtasn1-6:s390x (4.20.0-2) over (4.19.0-3build1) ... 120s Preparing to unpack .../libxdmcp6_1%3a1.1.5-1_s390x.deb ... 120s Unpacking libxdmcp6:s390x (1:1.1.5-1) over (1:1.1.3-0ubuntu6) ... 120s Setting up libxdmcp6:s390x (1:1.1.5-1) ... 120s Setting up libatomic1:s390x (14.2.0-17ubuntu1) ... 120s Setting up libtasn1-6:s390x (4.20.0-2) ... 120s Processing triggers for libc-bin (2.40-4ubuntu1) ... 120s Processing triggers for man-db (2.13.0-1) ... 121s Processing triggers for debianutils (5.21) ... 121s Reading package lists... 121s Building dependency tree... 121s Reading state information... 121s The following packages will be REMOVED: 121s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 121s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 121s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 121s linux-tools-6.11.0-8-generic* 121s 0 upgraded, 0 newly installed, 9 to remove and 6 not upgraded. 121s After this operation, 167 MB disk space will be freed. 121s (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 ... 80969 files and directories currently installed.) 121s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 121s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 121s Removing libpython3.12t64:s390x (3.12.9-1) ... 121s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 121s Removing libnsl2:s390x (1.3.0-3build3) ... 121s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 121s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 122s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 122s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 122s Processing triggers for libc-bin (2.40-4ubuntu1) ... 122s (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 ... 55869 files and directories currently installed.) 122s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 122s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 123s autopkgtest [01:20:04]: upgrading testbed (apt dist-upgrade and autopurge) 123s Reading package lists... 123s Building dependency tree... 123s Reading state information... 123s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 123s Starting 2 pkgProblemResolver with broken count: 0 123s Done 123s Entering ResolveByKeep 123s 123s The following packages will be upgraded: 123s iproute2 libc-bin libc-dev-bin libc6 libc6-dev locales 124s 6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 124s Need to get 10.7 MB of archives. 124s After this operation, 305 kB of additional disk space will be used. 124s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu1 [24.3 kB] 124s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu1 [1679 kB] 124s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu1 [4246 kB] 124s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu1 [2891 kB] 124s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu1 [672 kB] 124s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x iproute2 s390x 6.13.0-1ubuntu1 [1174 kB] 125s Preconfiguring packages ... 125s Fetched 10.7 MB in 1s (10.2 MB/s) 125s (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 ... 55867 files and directories currently installed.) 125s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu1_s390x.deb ... 125s Unpacking libc-dev-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 125s Preparing to unpack .../libc6-dev_2.41-1ubuntu1_s390x.deb ... 125s Unpacking libc6-dev:s390x (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 125s Preparing to unpack .../locales_2.41-1ubuntu1_all.deb ... 125s Unpacking locales (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 125s Preparing to unpack .../libc6_2.41-1ubuntu1_s390x.deb ... 125s Checking for services that may need to be restarted... 125s Checking init scripts... 125s Checking for services that may need to be restarted... 125s Checking init scripts... 125s Stopping some services possibly affected by the upgrade (will be restarted later): 125s cron: stopping...done. 125s 125s Unpacking libc6:s390x (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 125s Setting up libc6:s390x (2.41-1ubuntu1) ... 125s Checking for services that may need to be restarted... 125s Checking init scripts... 125s Restarting services possibly affected by the upgrade: 125s cron: restarting...done. 125s 125s Services restarted successfully. 125s (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 ... 55868 files and directories currently installed.) 125s Preparing to unpack .../libc-bin_2.41-1ubuntu1_s390x.deb ... 125s Unpacking libc-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 125s Setting up libc-bin (2.41-1ubuntu1) ... 125s (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 ... 55868 files and directories currently installed.) 125s Preparing to unpack .../iproute2_6.13.0-1ubuntu1_s390x.deb ... 125s Unpacking iproute2 (6.13.0-1ubuntu1) over (6.10.0-2ubuntu1) ... 126s Setting up iproute2 (6.13.0-1ubuntu1) ... 126s Setting up locales (2.41-1ubuntu1) ... 126s Installing new version of config file /etc/locale.alias ... 126s Generating locales (this might take a while)... 127s en_US.UTF-8... done 127s Generation complete. 127s Setting up libc-dev-bin (2.41-1ubuntu1) ... 127s Setting up libc6-dev:s390x (2.41-1ubuntu1) ... 127s Processing triggers for man-db (2.13.0-1) ... 128s Processing triggers for systemd (257.2-3ubuntu1) ... 128s Reading package lists... 129s Building dependency tree... 129s Reading state information... 129s Starting pkgProblemResolver with broken count: 0 129s Starting 2 pkgProblemResolver with broken count: 0 129s Done 129s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 129s autopkgtest [01:20:10]: rebooting testbed after setup commands that affected boot 147s autopkgtest [01:20:28]: testbed running kernel: Linux 6.12.0-15-generic #15-Ubuntu SMP Tue Feb 4 15:05:57 UTC 2025 150s autopkgtest [01:20:31]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 153s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (dsc) [2436 B] 153s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (tar) [1296 kB] 153s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.2-1 (diff) [10.9 kB] 153s gpgv: Signature made Thu Feb 6 05:39:34 2025 UTC 153s gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 153s gpgv: issuer "rafael@debian.org" 153s gpgv: Can't check signature: No public key 153s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.2-1.dsc: no acceptable signature found 153s autopkgtest [01:20:34]: testing package octave-statistics version 1.7.2-1 154s autopkgtest [01:20:35]: build not needed 154s autopkgtest [01:20:35]: test command1: preparing testbed 155s Reading package lists... 155s Building dependency tree... 155s Reading state information... 155s Starting pkgProblemResolver with broken count: 0 155s Starting 2 pkgProblemResolver with broken count: 0 155s Done 155s The following NEW packages will be installed: 155s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 155s cpp-14 cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit 155s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 155s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 155s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-s390x-linux-gnu 155s g++-s390x-linux-gnu gcc gcc-14 gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu 155s gettext gfortran gfortran-14 gfortran-14-s390x-linux-gnu 155s gfortran-s390x-linux-gnu gnuplot-data gnuplot-nox hdf5-helpers 155s intltool-debian krb5-multidev libaec-dev libaec0 libalgorithm-c3-perl 155s libaliased-perl libamd3 libaom3 libapp-cmd-perl libappstream5 155s libapt-pkg-perl libarchive-zip-perl libarpack2t64 libarray-intspan-perl 155s libasan8 libasound2-data libasound2t64 libavahi-client3 libavahi-common-data 155s libavahi-common3 libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 155s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 155s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 155s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 155s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 155s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 155s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 155s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 155s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 155s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 155s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 155s libdata-validate-domain-perl libdata-validate-ip-perl 155s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 155s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 155s libdevel-stacktrace-perl libdouble-conversion3 libdrm-radeon1 libduktape207 155s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 155s libencode-locale-perl liberror-perl libevent-2.1-7t64 155s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 155s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-single3 155s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 155s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 155s libfile-which-perl libflac12t64 libfltk-gl1.3t64 libfltk1.3t64 155s libfont-ttf-perl libfontconfig1 libfontenc1 libfreetype6 libgbm1 155s libgcc-14-dev libgd3 libgetopt-long-descriptive-perl libgfortran-14-dev 155s libgfortran5 libgl-dev libgl1 libgl1-mesa-dri libgl2ps1.4 libglapi-mesa 155s libglpk40 libglu1-mesa libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev 155s libgmpxx4ldbl libgnutls-dane0t64 libgnutls-openssl27t64 libgnutls28-dev 155s libgomp1 libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 155s libgraphite2-3 libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 155s libhdf5-cpp-310 libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 155s libhdf5-hl-cpp-310 libhdf5-hl-fortran-310 libheif-plugin-aomdec 155s libheif-plugin-libde265 libheif1 libhtml-form-perl 155s libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl 155s libhtml-tokeparser-simple-perl libhtml-tree-perl libhttp-cookies-perl 155s libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice6 155s libidn2-dev libimagequant0 libimport-into-perl libindirect-perl libinput-bin 155s libinput10 libio-html-perl libio-interactive-perl libio-socket-ssl-perl 155s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 155s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 155s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 155s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 155s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 155s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblist-compare-perl 155s liblist-moreutils-perl liblist-moreutils-xs-perl liblist-someutils-perl 155s liblist-utilsby-perl liblog-any-adapter-screen-perl liblog-any-perl 155s liblog-log4perl-perl libltdl7 liblua5.4-0 liblwp-mediatypes-perl 155s liblwp-protocol-https-perl libmailtools-perl libmarkdown2 libmd4c0 155s libmime-tools-perl libmldbm-perl libmodule-implementation-perl 155s libmodule-pluggable-perl libmodule-runtime-perl libmoo-perl 155s libmoox-aliases-perl libmouse-perl libmousex-nativetraits-perl 155s libmousex-strictconstructor-perl libmp3lame0 libmpc3 libmpg123-0t64 155s libmro-compat-perl libmtdev1t64 libnamespace-clean-perl libncurses-dev 155s libnet-domain-tld-perl libnet-http-perl libnet-ipv6addr-perl 155s libnet-netmask-perl libnet-smtp-ssl-perl libnet-ssleay-perl 155s libnetaddr-ip-perl libnghttp2-dev libnumber-compare-perl libobject-pad-perl 155s libogg0 libopengl0 libopus0 libp11-kit-dev libpackage-stash-perl 155s libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libparams-classify-perl 155s libparams-util-perl libparams-validate-perl libparse-debcontrol-perl 155s libparse-recdescent-perl libpath-iterator-rule-perl libpath-tiny-perl 155s libpcre2-16-0 libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 155s libpkgconf3 libpod-constants-perl libpod-parser-perl libpod-pom-perl 155s libportaudio2 libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 155s libqrupdate1 libqscintilla2-qt6-15 libqscintilla2-qt6-l10n 155s libqt6core5compat6 libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 155s libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 155s libqt6sql6 libqt6widgets6 libqt6xml6 libraqm0 libreadline-dev 155s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 155s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 155s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 155s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 155s libsoftware-license-perl libsoftware-licensemoreutils-perl 155s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 155s libstemmer0d libstrictures-perl libstring-copyright-perl 155s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 155s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 155s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 155s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 155s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 155s libtext-glob-perl libtext-levenshtein-damerau-perl 155s libtext-levenshteinxs-perl libtext-markdown-discount-perl 155s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 155s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 155s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 155s libtry-tiny-perl libts0t64 libubsan1 libumfpack6 libunbound8 155s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 155s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 155s libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 155s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 155s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 155s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 155s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 155s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 155s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 155s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 155s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 155s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 155s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 155s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 155s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 155s octave-common octave-dev octave-io octave-statistics 155s octave-statistics-common patchutils perl-openssl-defaults pkgconf 155s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 155s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 155s xtrans-dev xvfb zlib1g-dev 156s 0 upgraded, 471 newly installed, 0 to remove and 0 not upgraded. 156s Need to get 175 MB of archives. 156s After this operation, 594 MB of additional disk space will be used. 156s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libstemmer0d s390x 2.2.0-4build1 [174 kB] 156s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x libappstream5 s390x 1.0.4-1 [236 kB] 156s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x appstream s390x 1.0.4-1 [72.2 kB] 156s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x m4 s390x 1.4.19-5 [259 kB] 156s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x autoconf all 2.72-3 [382 kB] 156s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x autotools-dev all 20220109.1 [44.9 kB] 156s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x automake all 1:1.17-3 [572 kB] 156s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x autopoint all 0.23.1-1 [619 kB] 156s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libcapture-tiny-perl all 0.50-1 [20.7 kB] 156s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libparams-util-perl s390x 1.102-3build1 [21.3 kB] 156s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-install-perl all 0.929-1 [9764 B] 156s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-optlist-perl all 0.114-1 [9708 B] 156s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x libb-hooks-op-check-perl s390x 0.22-3build2 [9566 B] 156s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x libdynaloader-functions-perl all 0.004-1 [11.4 kB] 156s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-callchecker-perl s390x 0.009-1build1 [14.2 kB] 156s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libparams-classify-perl s390x 0.015-2build6 [20.6 kB] 156s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libmodule-runtime-perl all 0.016-2 [16.4 kB] 156s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x libtry-tiny-perl all 0.32-1 [21.2 kB] 156s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x libmodule-implementation-perl all 0.09-2 [12.0 kB] 156s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x libpackage-stash-perl all 0.40-1 [19.5 kB] 156s Get:21 http://ftpmaster.internal/ubuntu plucky/universe s390x libclass-load-perl all 0.25-2 [12.7 kB] 156s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x libio-stringy-perl all 2.113-2 [45.3 kB] 156s Get:23 http://ftpmaster.internal/ubuntu plucky/universe s390x libparams-validate-perl s390x 1.31-2build4 [54.9 kB] 156s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-exporter-perl all 0.990-1 [49.0 kB] 156s Get:25 http://ftpmaster.internal/ubuntu plucky/universe s390x libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 156s Get:26 http://ftpmaster.internal/ubuntu plucky/universe s390x libio-tiecombine-perl all 1.005-3 [9464 B] 156s Get:27 http://ftpmaster.internal/ubuntu plucky/universe s390x libmodule-pluggable-perl all 5.2-5 [19.5 kB] 156s Get:28 http://ftpmaster.internal/ubuntu plucky/universe s390x libstring-rewriteprefix-perl all 0.009-1 [6310 B] 156s Get:29 http://ftpmaster.internal/ubuntu plucky/universe s390x libapp-cmd-perl all 0.337-2 [58.3 kB] 156s Get:30 http://ftpmaster.internal/ubuntu plucky/universe s390x libboolean-perl all 0.46-3 [8430 B] 156s Get:31 http://ftpmaster.internal/ubuntu plucky/universe s390x libsub-uplevel-perl all 0.2800-3 [11.6 kB] 156s Get:32 http://ftpmaster.internal/ubuntu plucky/universe s390x libtest-exception-perl all 0.43-3 [13.4 kB] 156s Get:33 http://ftpmaster.internal/ubuntu plucky/universe s390x libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 156s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-which-perl all 1.27-2 [12.5 kB] 156s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-homedir-perl all 1.006-2 [37.0 kB] 156s Get:36 http://ftpmaster.internal/ubuntu plucky/universe s390x libclone-choose-perl all 0.010-2 [7738 B] 156s Get:37 http://ftpmaster.internal/ubuntu plucky/universe s390x libhash-merge-perl all 0.302-1 [13.0 kB] 156s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libjson-perl all 4.10000-1 [81.9 kB] 156s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libexporter-tiny-perl all 1.006002-1 [36.8 kB] 156s Get:40 http://ftpmaster.internal/ubuntu plucky/universe s390x liblist-moreutils-xs-perl s390x 0.430-4build1 [45.3 kB] 156s Get:41 http://ftpmaster.internal/ubuntu plucky/universe s390x liblist-moreutils-perl all 0.430-2 [38.2 kB] 156s Get:42 http://ftpmaster.internal/ubuntu plucky/universe s390x liblog-log4perl-perl all 1.57-1 [345 kB] 156s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x libmouse-perl s390x 2.5.11-1build1 [134 kB] 156s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 156s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x libmousex-strictconstructor-perl all 0.02-3 [4582 B] 156s Get:46 http://ftpmaster.internal/ubuntu plucky/universe s390x libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 156s Get:47 http://ftpmaster.internal/ubuntu plucky/main s390x libpath-tiny-perl all 0.146-1 [47.5 kB] 156s Get:48 http://ftpmaster.internal/ubuntu plucky/universe s390x libpod-pom-perl all 2.01-4 [61.3 kB] 156s Get:49 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-common-perl all 2024080801-1 [162 kB] 156s Get:50 http://ftpmaster.internal/ubuntu plucky/main s390x libyaml-tiny-perl all 1.76-1 [24.2 kB] 156s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-perl all 2.155-1 [356 kB] 156s Get:52 http://ftpmaster.internal/ubuntu plucky/universe s390x libyaml-pp-perl all 0.38.1-2 [107 kB] 156s Get:53 http://ftpmaster.internal/ubuntu plucky/universe s390x cme all 1.041-1 [65.4 kB] 156s Get:54 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 156s Get:55 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 156s Get:56 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-17ubuntu1 [9571 kB] 157s Get:57 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-17ubuntu1 [1030 B] 157s Get:58 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 157s Get:59 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 157s Get:60 http://ftpmaster.internal/ubuntu plucky/main s390x libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 157s Get:61 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 14.2.0-17ubuntu1 [50.7 kB] 157s Get:62 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 14.2.0-17ubuntu1 [151 kB] 157s Get:63 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 14.2.0-17ubuntu1 [30.9 kB] 157s Get:64 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 14.2.0-17ubuntu1 [2964 kB] 157s Get:65 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 14.2.0-17ubuntu1 [1184 kB] 157s Get:66 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-17ubuntu1 [1037 kB] 157s Get:67 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-17ubuntu1 [18.7 MB] 157s Get:68 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-17ubuntu1 [526 kB] 157s Get:69 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 157s Get:70 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 157s Get:71 http://ftpmaster.internal/ubuntu plucky/main s390x libtool all 2.5.4-3build1 [168 kB] 157s Get:72 http://ftpmaster.internal/ubuntu plucky/main s390x dh-autoreconf all 20 [16.1 kB] 157s Get:73 http://ftpmaster.internal/ubuntu plucky/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 157s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 157s Get:75 http://ftpmaster.internal/ubuntu plucky/main s390x dh-strip-nondeterminism all 1.14.1-2 [5064 B] 157s Get:76 http://ftpmaster.internal/ubuntu plucky/main s390x debugedit s390x 1:5.1-2 [50.1 kB] 157s Get:77 http://ftpmaster.internal/ubuntu plucky/main s390x dwz s390x 0.15-1build6 [122 kB] 157s Get:78 http://ftpmaster.internal/ubuntu plucky/main s390x gettext s390x 0.23.1-1 [1065 kB] 157s Get:79 http://ftpmaster.internal/ubuntu plucky/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 157s Get:80 http://ftpmaster.internal/ubuntu plucky/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 157s Get:81 http://ftpmaster.internal/ubuntu plucky/main s390x debhelper all 13.24.1ubuntu2 [895 kB] 157s Get:82 http://ftpmaster.internal/ubuntu plucky/universe s390x aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 157s Get:83 http://ftpmaster.internal/ubuntu plucky/universe s390x gnuplot-data all 6.0.0+dfsg1-1ubuntu3 [75.3 kB] 157s Get:84 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 157s Get:85 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 157s Get:86 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 157s Get:87 http://ftpmaster.internal/ubuntu plucky/universe s390x fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 158s Get:88 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-1.1ubuntu2 [37.4 kB] 158s Get:89 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-1.1ubuntu2 [150 kB] 158s Get:90 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 158s Get:91 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 158s Get:92 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 158s Get:93 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 158s Get:94 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 158s Get:95 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 158s Get:96 http://ftpmaster.internal/ubuntu plucky/main s390x libaom3 s390x 3.12.0-1 [1492 kB] 158s Get:97 http://ftpmaster.internal/ubuntu plucky/main s390x libheif-plugin-aomdec s390x 1.19.5-1build1 [11.6 kB] 158s Get:98 http://ftpmaster.internal/ubuntu plucky/main s390x libde265-0 s390x 1.0.15-1build4 [175 kB] 158s Get:99 http://ftpmaster.internal/ubuntu plucky/main s390x libheif-plugin-libde265 s390x 1.19.5-1build1 [9066 B] 158s Get:100 http://ftpmaster.internal/ubuntu plucky/main s390x libheif1 s390x 1.19.5-1build1 [410 kB] 158s Get:101 http://ftpmaster.internal/ubuntu plucky/main s390x libimagequant0 s390x 2.18.0-1build1 [43.3 kB] 158s Get:102 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 158s Get:103 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 158s Get:104 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 158s Get:105 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 158s Get:106 http://ftpmaster.internal/ubuntu plucky/main s390x libraqm0 s390x 0.10.2-1 [15.8 kB] 158s Get:107 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 158s Get:108 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 158s Get:109 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 158s Get:110 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 158s Get:111 http://ftpmaster.internal/ubuntu plucky/main s390x libxpm4 s390x 1:3.5.17-1build2 [41.2 kB] 158s Get:112 http://ftpmaster.internal/ubuntu plucky/main s390x libgd3 s390x 2.3.3-12ubuntu3 [141 kB] 158s Get:113 http://ftpmaster.internal/ubuntu plucky/main s390x liblua5.4-0 s390x 5.4.7-1 [174 kB] 158s Get:114 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-1.1ubuntu2 [191 kB] 158s Get:115 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 158s Get:116 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 158s Get:117 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 158s Get:118 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.1-1 [253 kB] 158s Get:119 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.1-1 [50.3 kB] 158s Get:120 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.1-1 [28.3 kB] 158s Get:121 http://ftpmaster.internal/ubuntu plucky/main s390x libwebpmux3 s390x 1.5.0-0.1 [25.8 kB] 158s Get:122 http://ftpmaster.internal/ubuntu plucky/universe s390x gnuplot-nox s390x 6.0.0+dfsg1-1ubuntu3 [1023 kB] 158s Get:123 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-octave-autopkgtest all 1.8.0 [10.1 kB] 158s Get:124 http://ftpmaster.internal/ubuntu plucky/main s390x libapt-pkg-perl s390x 0.1.40build8 [70.7 kB] 158s Get:125 http://ftpmaster.internal/ubuntu plucky/main s390x libarray-intspan-perl all 2.004-2 [25.0 kB] 158s Get:126 http://ftpmaster.internal/ubuntu plucky/main s390x libyaml-libyaml-perl s390x 0.903.0+ds-1 [32.8 kB] 158s Get:127 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 158s Get:128 http://ftpmaster.internal/ubuntu plucky/universe s390x libexporter-lite-perl all 0.09-2 [9748 B] 158s Get:129 http://ftpmaster.internal/ubuntu plucky/main s390x libencode-locale-perl all 1.05-3 [11.6 kB] 158s Get:130 http://ftpmaster.internal/ubuntu plucky/main s390x libtimedate-perl all 2.3300-2 [34.0 kB] 158s Get:131 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-date-perl all 6.06-1 [10.2 kB] 159s Get:132 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-listing-perl all 6.16-1 [11.3 kB] 159s Get:133 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tagset-perl all 3.24-1 [14.1 kB] 159s Get:134 http://ftpmaster.internal/ubuntu plucky/main s390x liburi-perl all 5.30-1 [94.4 kB] 159s Get:135 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-parser-perl s390x 3.83-1build1 [87.8 kB] 159s Get:136 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tree-perl all 5.07-3 [200 kB] 159s Get:137 http://ftpmaster.internal/ubuntu plucky/main s390x libclone-perl s390x 0.47-1 [10.7 kB] 159s Get:138 http://ftpmaster.internal/ubuntu plucky/main s390x libio-html-perl all 1.004-3 [15.9 kB] 159s Get:139 http://ftpmaster.internal/ubuntu plucky/main s390x liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 159s Get:140 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 159s Get:141 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-cookies-perl all 6.11-1 [18.2 kB] 159s Get:142 http://ftpmaster.internal/ubuntu plucky/main s390x libhttp-negotiate-perl all 6.01-2 [12.4 kB] 159s Get:143 http://ftpmaster.internal/ubuntu plucky/main s390x perl-openssl-defaults s390x 7build3 [6628 B] 159s Get:144 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-ssleay-perl s390x 1.94-2 [319 kB] 159s Get:145 http://ftpmaster.internal/ubuntu plucky/main s390x libio-socket-ssl-perl all 2.089-1 [200 kB] 159s Get:146 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-http-perl all 6.23-1 [22.3 kB] 159s Get:147 http://ftpmaster.internal/ubuntu plucky/main s390x liblwp-protocol-https-perl all 6.14-1 [9040 B] 159s Get:148 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-robotrules-perl all 6.02-1 [12.6 kB] 159s Get:149 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-perl all 6.77-1 [138 kB] 159s Get:150 http://ftpmaster.internal/ubuntu plucky/main s390x liberror-perl all 0.17029-2 [25.6 kB] 159s Get:151 http://ftpmaster.internal/ubuntu plucky/universe s390x libparse-debcontrol-perl all 2.005-6 [20.4 kB] 159s Get:152 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-copyright-perl all 0.012-2 [17.4 kB] 159s Get:153 http://ftpmaster.internal/ubuntu plucky/universe s390x libalgorithm-c3-perl all 0.11-2 [10.2 kB] 159s Get:154 http://ftpmaster.internal/ubuntu plucky/universe s390x libclass-c3-perl all 0.35-2 [18.4 kB] 159s Get:155 http://ftpmaster.internal/ubuntu plucky/universe s390x libmro-compat-perl all 0.15-2 [10.1 kB] 159s Get:156 http://ftpmaster.internal/ubuntu plucky/universe s390x libdata-section-perl all 0.200008-1 [11.6 kB] 159s Get:157 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-template-perl all 1.61-1 [48.5 kB] 159s Get:158 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-license-perl all 0.104006-1 [117 kB] 159s Get:159 http://ftpmaster.internal/ubuntu plucky/universe s390x libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 159s Get:160 http://ftpmaster.internal/ubuntu plucky/main s390x libsort-versions-perl all 1.62-3 [7378 B] 159s Get:161 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-reform-perl all 1.20-5 [35.4 kB] 159s Get:162 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-autoformat-perl all 1.750000-2 [29.8 kB] 159s Get:163 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 159s Get:164 http://ftpmaster.internal/ubuntu plucky/universe s390x libtoml-tiny-perl all 0.18-1 [21.6 kB] 159s Get:165 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-inspector-perl all 1.36-3 [15.4 kB] 159s Get:166 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-sharedir-perl all 1.118-3 [14.0 kB] 159s Get:167 http://ftpmaster.internal/ubuntu plucky/main s390x libindirect-perl s390x 0.39-2build5 [22.4 kB] 159s Get:168 http://ftpmaster.internal/ubuntu plucky/main s390x libxs-parse-keyword-perl s390x 0.48-2 [63.5 kB] 159s Get:169 http://ftpmaster.internal/ubuntu plucky/main s390x libxs-parse-sublike-perl s390x 0.36-1 [43.7 kB] 159s Get:170 http://ftpmaster.internal/ubuntu plucky/main s390x libobject-pad-perl s390x 0.819-1 [131 kB] 159s Get:171 http://ftpmaster.internal/ubuntu plucky/main s390x libsyntax-keyword-try-perl s390x 0.30-1 [24.8 kB] 159s Get:172 http://ftpmaster.internal/ubuntu plucky/main s390x libio-interactive-perl all 1.026-1 [10.8 kB] 159s Get:173 http://ftpmaster.internal/ubuntu plucky/main s390x liblog-any-perl all 1.717-1 [73.2 kB] 159s Get:174 http://ftpmaster.internal/ubuntu plucky/main s390x liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 159s Get:175 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 159s Get:176 http://ftpmaster.internal/ubuntu plucky/main s390x libvariable-magic-perl s390x 0.64-1build1 [36.4 kB] 159s Get:177 http://ftpmaster.internal/ubuntu plucky/main s390x libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 159s Get:178 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-identify-perl s390x 0.14-3build4 [10.0 kB] 159s Get:179 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-name-perl s390x 0.28-1 [10.8 kB] 159s Get:180 http://ftpmaster.internal/ubuntu plucky/main s390x libnamespace-clean-perl all 0.27-2 [14.0 kB] 159s Get:181 http://ftpmaster.internal/ubuntu plucky/main s390x libnumber-compare-perl all 0.03-3 [5974 B] 159s Get:182 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-glob-perl all 0.11-3 [6780 B] 159s Get:183 http://ftpmaster.internal/ubuntu plucky/main s390x libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 159s Get:184 http://ftpmaster.internal/ubuntu plucky/main s390x libpod-parser-perl all 1.67-1 [80.6 kB] 159s Get:185 http://ftpmaster.internal/ubuntu plucky/main s390x libpod-constants-perl all 0.19-2 [16.3 kB] 159s Get:186 http://ftpmaster.internal/ubuntu plucky/main s390x libset-intspan-perl all 1.19-3 [24.8 kB] 159s Get:187 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-copyright-perl all 0.003014-1 [20.5 kB] 159s Get:188 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-escape-perl all 2010.002-3 [16.1 kB] 159s Get:189 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 159s Get:190 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 159s Get:191 http://ftpmaster.internal/ubuntu plucky/main s390x libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 159s Get:192 http://ftpmaster.internal/ubuntu plucky/main s390x licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 159s Get:193 http://ftpmaster.internal/ubuntu plucky/main s390x diffstat s390x 1.67-1 [33.1 kB] 159s Get:194 http://ftpmaster.internal/ubuntu plucky/main s390x libberkeleydb-perl s390x 0.66-1 [115 kB] 159s Get:195 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-xsaccessor-perl s390x 1.19-4build5 [34.2 kB] 159s Get:196 http://ftpmaster.internal/ubuntu plucky/main s390x libconfig-tiny-perl all 2.30-1 [14.7 kB] 159s Get:197 http://ftpmaster.internal/ubuntu plucky/main s390x libconst-fast-perl all 0.014-2 [8034 B] 159s Get:198 http://ftpmaster.internal/ubuntu plucky/main s390x libcpanel-json-xs-perl s390x 4.39-1 [118 kB] 159s Get:199 http://ftpmaster.internal/ubuntu plucky/main s390x libaliased-perl all 0.34-3 [12.8 kB] 159s Get:200 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-data-inheritable-perl all 0.10-1 [8038 B] 159s Get:201 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 159s Get:202 http://ftpmaster.internal/ubuntu plucky/main s390x libexception-class-perl all 1.45-1 [28.6 kB] 160s Get:203 http://ftpmaster.internal/ubuntu plucky/main s390x libiterator-perl all 0.03+ds1-2 [18.8 kB] 160s Get:204 http://ftpmaster.internal/ubuntu plucky/main s390x libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 160s Get:205 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-dpath-perl all 0.60-1 [37.3 kB] 160s Get:206 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-domain-tld-perl all 1.75-4 [29.0 kB] 160s Get:207 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-domain-perl all 0.15-1 [10.4 kB] 160s Get:208 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 160s Get:209 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-netmask-perl all 2.0002-2 [24.8 kB] 160s Get:210 http://ftpmaster.internal/ubuntu plucky/main s390x libnetaddr-ip-perl s390x 4.079+dfsg-2build5 [80.6 kB] 160s Get:211 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-ip-perl all 0.31-1 [17.2 kB] 160s Get:212 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-validate-uri-perl all 0.07-3 [10.8 kB] 160s Get:213 http://ftpmaster.internal/ubuntu plucky/main s390x libdevel-size-perl s390x 0.84-1build1 [20.0 kB] 160s Get:214 http://ftpmaster.internal/ubuntu plucky/main s390x libemail-address-xs-perl s390x 1.05-1build5 [29.3 kB] 160s Get:215 http://ftpmaster.internal/ubuntu plucky/main s390x libipc-system-simple-perl all 1.30-2 [22.3 kB] 160s Get:216 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-basedir-perl all 0.09-2 [14.4 kB] 160s Get:217 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-find-rule-perl all 0.34-3 [24.4 kB] 160s Get:218 http://ftpmaster.internal/ubuntu plucky/main s390x libio-string-perl all 1.08-4 [11.1 kB] 160s Get:219 http://ftpmaster.internal/ubuntu plucky/main s390x libfont-ttf-perl all 1.06-2 [323 kB] 160s Get:220 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 160s Get:221 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 160s Get:222 http://ftpmaster.internal/ubuntu plucky/main s390x libipc-run3-perl all 0.049-1 [28.8 kB] 160s Get:223 http://ftpmaster.internal/ubuntu plucky/main s390x libjson-maybexs-perl all 1.004008-1 [11.1 kB] 160s Get:224 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-compare-perl all 0.55-2 [62.9 kB] 160s Get:225 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-someutils-perl all 0.59-1 [30.4 kB] 160s Get:226 http://ftpmaster.internal/ubuntu plucky/main s390x liblist-utilsby-perl all 0.12-2 [14.9 kB] 160s Get:227 http://ftpmaster.internal/ubuntu plucky/main s390x libmldbm-perl all 2.05-4 [16.0 kB] 160s Get:228 http://ftpmaster.internal/ubuntu plucky/main s390x libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 160s Get:229 http://ftpmaster.internal/ubuntu plucky/main s390x libimport-into-perl all 1.002005-2 [10.7 kB] 160s Get:230 http://ftpmaster.internal/ubuntu plucky/main s390x librole-tiny-perl all 2.002004-1 [16.3 kB] 160s Get:231 http://ftpmaster.internal/ubuntu plucky/main s390x libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 160s Get:232 http://ftpmaster.internal/ubuntu plucky/main s390x libmoo-perl all 2.005005-1 [47.4 kB] 160s Get:233 http://ftpmaster.internal/ubuntu plucky/main s390x libstrictures-perl all 2.000006-1 [16.3 kB] 160s Get:234 http://ftpmaster.internal/ubuntu plucky/main s390x libmoox-aliases-perl all 0.001006-2 [6796 B] 160s Get:235 http://ftpmaster.internal/ubuntu plucky/main s390x libperlio-gzip-perl s390x 0.20-1build5 [14.8 kB] 160s Get:236 http://ftpmaster.internal/ubuntu plucky/main s390x libperlio-utf8-strict-perl s390x 0.010-1build4 [11.2 kB] 160s Get:237 http://ftpmaster.internal/ubuntu plucky/main s390x libproc-processtable-perl s390x 0.636-1build4 [36.6 kB] 160s Get:238 http://ftpmaster.internal/ubuntu plucky/main s390x libregexp-wildcards-perl all 1.05-3 [12.9 kB] 160s Get:239 http://ftpmaster.internal/ubuntu plucky/main s390x libsereal-decoder-perl s390x 5.004+ds-1build4 [107 kB] 160s Get:240 http://ftpmaster.internal/ubuntu plucky/main s390x libsereal-encoder-perl s390x 5.004+ds-1build4 [112 kB] 160s Get:241 http://ftpmaster.internal/ubuntu plucky/main s390x libterm-readkey-perl s390x 2.38-2build5 [23.1 kB] 160s Get:242 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-levenshteinxs-perl s390x 0.03-5build5 [8350 B] 160s Get:243 http://ftpmaster.internal/ubuntu plucky/main s390x libmarkdown2 s390x 2.2.7-2ubuntu1 [40.3 kB] 160s Get:244 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-markdown-discount-perl s390x 0.18-1 [12.4 kB] 160s Get:245 http://ftpmaster.internal/ubuntu plucky/main s390x libdata-messagepack-perl s390x 1.02-1build5 [32.3 kB] 160s Get:246 http://ftpmaster.internal/ubuntu plucky/main s390x libtext-xslate-perl s390x 3.5.9-2build1 [163 kB] 160s Get:247 http://ftpmaster.internal/ubuntu plucky/main s390x libtime-duration-perl all 1.21-2 [12.3 kB] 160s Get:248 http://ftpmaster.internal/ubuntu plucky/main s390x libtime-moment-perl s390x 0.44-2build5 [75.5 kB] 160s Get:249 http://ftpmaster.internal/ubuntu plucky/main s390x libunicode-utf8-perl s390x 0.62-2build4 [18.8 kB] 160s Get:250 http://ftpmaster.internal/ubuntu plucky/main s390x libcgi-pm-perl all 4.67-1 [185 kB] 160s Get:251 http://ftpmaster.internal/ubuntu plucky/main s390x libhtml-form-perl all 6.12-1 [31.1 kB] 160s Get:252 http://ftpmaster.internal/ubuntu plucky/main s390x libwww-mechanize-perl all 2.18-1ubuntu1 [93.1 kB] 160s Get:253 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 160s Get:254 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-sax-base-perl all 1.09-3 [18.9 kB] 160s Get:255 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 160s Get:256 http://ftpmaster.internal/ubuntu plucky/main s390x libxml-libxml-perl s390x 2.0207+dfsg+really+2.0134-5build1 [312 kB] 160s Get:257 http://ftpmaster.internal/ubuntu plucky/main s390x lzip s390x 1.25-1 [89.5 kB] 160s Get:258 http://ftpmaster.internal/ubuntu plucky/main s390x lzop s390x 1.04-2build3 [84.3 kB] 160s Get:259 http://ftpmaster.internal/ubuntu plucky/main s390x patchutils s390x 0.4.2-1build3 [79.2 kB] 161s Get:260 http://ftpmaster.internal/ubuntu plucky/main s390x t1utils s390x 1.41-4build3 [65.6 kB] 161s Get:261 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 161s Get:262 http://ftpmaster.internal/ubuntu plucky/main s390x lintian all 2.121.1ubuntu1 [1073 kB] 161s Get:263 http://ftpmaster.internal/ubuntu plucky/universe s390x libconfig-model-dpkg-perl all 3.010 [176 kB] 161s Get:264 http://ftpmaster.internal/ubuntu plucky/main s390x libconvert-binhex-perl all 1.125-3 [27.1 kB] 161s Get:265 http://ftpmaster.internal/ubuntu plucky/main s390x libnet-smtp-ssl-perl all 1.04-2 [6218 B] 161s Get:266 http://ftpmaster.internal/ubuntu plucky/main s390x libmailtools-perl all 2.22-1 [77.1 kB] 161s Get:267 http://ftpmaster.internal/ubuntu plucky/main s390x libmime-tools-perl all 5.515-1 [187 kB] 161s Get:268 http://ftpmaster.internal/ubuntu plucky/main s390x libsuitesparseconfig7 s390x 1:7.8.3+dfsg-3 [13.2 kB] 161s Get:269 http://ftpmaster.internal/ubuntu plucky/universe s390x libamd3 s390x 1:7.8.3+dfsg-3 [35.1 kB] 161s Get:270 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 161s Get:271 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 14.2.0-17ubuntu1 [588 kB] 161s Get:272 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 161s Get:273 http://ftpmaster.internal/ubuntu plucky/universe s390x libarpack2t64 s390x 3.9.1-4 [110 kB] 161s Get:274 http://ftpmaster.internal/ubuntu plucky/universe s390x libccolamd3 s390x 1:7.8.3+dfsg-3 [32.7 kB] 161s Get:275 http://ftpmaster.internal/ubuntu plucky/universe s390x libcamd3 s390x 1:7.8.3+dfsg-3 [29.7 kB] 161s Get:276 http://ftpmaster.internal/ubuntu plucky/main s390x libcolamd3 s390x 1:7.8.3+dfsg-3 [23.4 kB] 161s Get:277 http://ftpmaster.internal/ubuntu plucky/universe s390x libcholmod5 s390x 1:7.8.3+dfsg-3 [920 kB] 161s Get:278 http://ftpmaster.internal/ubuntu plucky/universe s390x libcxsparse4 s390x 1:7.8.3+dfsg-3 [89.6 kB] 161s Get:279 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-double3 s390x 3.3.10-2fakesync1build1 [511 kB] 161s Get:280 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-single3 s390x 3.3.10-2fakesync1build1 [483 kB] 161s Get:281 http://ftpmaster.internal/ubuntu plucky/main s390x libxfixes3 s390x 1:6.0.0-2build1 [11.3 kB] 161s Get:282 http://ftpmaster.internal/ubuntu plucky/main s390x libxcursor1 s390x 1:1.2.3-1 [23.4 kB] 161s Get:283 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 161s Get:284 http://ftpmaster.internal/ubuntu plucky/main s390x libxinerama1 s390x 2:1.1.4-3build1 [6476 B] 161s Get:285 http://ftpmaster.internal/ubuntu plucky/universe s390x libfltk1.3t64 s390x 1.3.8-6.1build2 [645 kB] 161s Get:286 http://ftpmaster.internal/ubuntu plucky/main s390x libglvnd0 s390x 1.7.0-1build1 [110 kB] 161s Get:287 http://ftpmaster.internal/ubuntu plucky/main s390x libglapi-mesa s390x 24.3.4-3ubuntu1 [68.4 kB] 161s Get:288 http://ftpmaster.internal/ubuntu plucky/main s390x libx11-xcb1 s390x 2:1.8.10-2 [7954 B] 161s Get:289 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-dri3-0 s390x 1.17.0-2 [7616 B] 161s Get:290 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-glx0 s390x 1.17.0-2 [26.0 kB] 161s Get:291 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-present0 s390x 1.17.0-2 [6244 B] 161s Get:292 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xfixes0 s390x 1.17.0-2 [10.5 kB] 161s Get:293 http://ftpmaster.internal/ubuntu plucky/main s390x libxxf86vm1 s390x 1:1.1.4-1build4 [9630 B] 161s Get:294 http://ftpmaster.internal/ubuntu plucky/main s390x libdrm-radeon1 s390x 2.4.123-1 [22.4 kB] 161s Get:295 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-randr0 s390x 1.17.0-2 [19.2 kB] 161s Get:296 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-sync1 s390x 1.17.0-2 [9488 B] 161s Get:297 http://ftpmaster.internal/ubuntu plucky/main s390x libxshmfence1 s390x 1.3-1build5 [4772 B] 161s Get:298 http://ftpmaster.internal/ubuntu plucky/main s390x mesa-libgallium s390x 24.3.4-3ubuntu1 [7967 kB] 161s Get:299 http://ftpmaster.internal/ubuntu plucky/main s390x libwayland-server0 s390x 1.23.1-1 [36.8 kB] 161s Get:300 http://ftpmaster.internal/ubuntu plucky/main s390x libgbm1 s390x 24.3.4-3ubuntu1 [34.5 kB] 161s Get:301 http://ftpmaster.internal/ubuntu plucky/main s390x libvulkan1 s390x 1.4.304.0-1 [147 kB] 161s Get:302 http://ftpmaster.internal/ubuntu plucky/main s390x libgl1-mesa-dri s390x 24.3.4-3ubuntu1 [35.3 kB] 161s Get:303 http://ftpmaster.internal/ubuntu plucky/main s390x libglx-mesa0 s390x 24.3.4-3ubuntu1 [162 kB] 162s Get:304 http://ftpmaster.internal/ubuntu plucky/main s390x libglx0 s390x 1.7.0-1build1 [32.2 kB] 162s Get:305 http://ftpmaster.internal/ubuntu plucky/main s390x libgl1 s390x 1.7.0-1build1 [142 kB] 162s Get:306 http://ftpmaster.internal/ubuntu plucky/universe s390x libfltk-gl1.3t64 s390x 1.3.8-6.1build2 [43.7 kB] 162s Get:307 http://ftpmaster.internal/ubuntu plucky/universe s390x libgl2ps1.4 s390x 1.4.2+dfsg1-2build1 [44.1 kB] 162s Get:308 http://ftpmaster.internal/ubuntu plucky/main s390x libltdl7 s390x 2.5.4-3build1 [43.9 kB] 162s Get:309 http://ftpmaster.internal/ubuntu plucky/universe s390x libglpk40 s390x 5.0-1build2 [406 kB] 162s Get:310 http://ftpmaster.internal/ubuntu plucky/main s390x libopengl0 s390x 1.7.0-1build1 [48.0 kB] 162s Get:311 http://ftpmaster.internal/ubuntu plucky/main s390x libglu1-mesa s390x 9.0.2-1.1build1 [176 kB] 162s Get:312 http://ftpmaster.internal/ubuntu plucky/main s390x liblcms2-2 s390x 2.16-2 [175 kB] 162s Get:313 http://ftpmaster.internal/ubuntu plucky/universe s390x libjxl0.11 s390x 0.11.1-1 [1008 kB] 162s Get:314 http://ftpmaster.internal/ubuntu plucky/main s390x libwmflite-0.2-7 s390x 0.2.13-1.1build3 [72.1 kB] 162s Get:315 http://ftpmaster.internal/ubuntu plucky/universe s390x libgraphicsmagick-q16-3t64 s390x 1.4+really1.3.45-1build2 [1323 kB] 162s Get:316 http://ftpmaster.internal/ubuntu plucky/universe s390x libgraphicsmagick++-q16-12t64 s390x 1.4+really1.3.45-1build2 [113 kB] 162s Get:317 http://ftpmaster.internal/ubuntu plucky/universe s390x libaec0 s390x 1.1.3-1 [25.7 kB] 162s Get:318 http://ftpmaster.internal/ubuntu plucky/universe s390x libsz2 s390x 1.1.3-1 [5442 B] 162s Get:319 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-310 s390x 1.14.5+repack-3 [1477 kB] 162s Get:320 http://ftpmaster.internal/ubuntu plucky/main s390x libasound2-data all 1.2.13-1build1 [21.1 kB] 162s Get:321 http://ftpmaster.internal/ubuntu plucky/main s390x libasound2t64 s390x 1.2.13-1build1 [411 kB] 162s Get:322 http://ftpmaster.internal/ubuntu plucky/main s390x libopus0 s390x 1.5.2-2 [2928 kB] 162s Get:323 http://ftpmaster.internal/ubuntu plucky/main s390x libsamplerate0 s390x 0.2.2-4build1 [1344 kB] 162s Get:324 http://ftpmaster.internal/ubuntu plucky/main s390x libjack-jackd2-0 s390x 1.9.22~dfsg-4 [292 kB] 162s Get:325 http://ftpmaster.internal/ubuntu plucky/universe s390x libportaudio2 s390x 19.6.0-1.2build3 [71.6 kB] 162s Get:326 http://ftpmaster.internal/ubuntu plucky/universe s390x libqhull-r8.0 s390x 2020.2-6build1 [199 kB] 162s Get:327 http://ftpmaster.internal/ubuntu plucky/universe s390x libqrupdate1 s390x 1.1.5-1 [48.5 kB] 162s Get:328 http://ftpmaster.internal/ubuntu plucky/universe s390x libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 162s Get:329 http://ftpmaster.internal/ubuntu plucky/universe s390x libb2-1 s390x 0.98.1-1.1build1 [21.0 kB] 162s Get:330 http://ftpmaster.internal/ubuntu plucky/universe s390x libdouble-conversion3 s390x 3.3.0-1build1 [43.9 kB] 162s Get:331 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-16-0 s390x 10.42-4ubuntu3 [236 kB] 162s Get:332 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6core6t64 s390x 6.8.1+dfsg-0ubuntu4 [2154 kB] 163s Get:333 http://ftpmaster.internal/ubuntu plucky/main s390x libwayland-client0 s390x 1.23.1-1 [27.8 kB] 163s Get:334 http://ftpmaster.internal/ubuntu plucky/main s390x libegl-mesa0 s390x 24.3.4-3ubuntu1 [126 kB] 163s Get:335 http://ftpmaster.internal/ubuntu plucky/main s390x libegl1 s390x 1.7.0-1build1 [31.8 kB] 163s Get:336 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 163s Get:337 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 163s Get:338 http://ftpmaster.internal/ubuntu plucky/main s390x libmtdev1t64 s390x 1.1.7-1 [15.6 kB] 163s Get:339 http://ftpmaster.internal/ubuntu plucky/main s390x libwacom-common all 2.14.0-1 [103 kB] 163s Get:340 http://ftpmaster.internal/ubuntu plucky/main s390x libwacom9 s390x 2.14.0-1 [27.1 kB] 163s Get:341 http://ftpmaster.internal/ubuntu plucky/main s390x libinput-bin s390x 1.27.1-1 [23.3 kB] 163s Get:342 http://ftpmaster.internal/ubuntu plucky/main s390x libinput10 s390x 1.27.1-1 [139 kB] 163s Get:343 http://ftpmaster.internal/ubuntu plucky/universe s390x libmd4c0 s390x 0.5.2-2 [47.7 kB] 163s Get:344 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6dbus6 s390x 6.8.1+dfsg-0ubuntu4 [304 kB] 163s Get:345 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 163s Get:346 http://ftpmaster.internal/ubuntu plucky/universe s390x libts0t64 s390x 1.22-1.1build1 [66.8 kB] 163s Get:347 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-util1 s390x 0.4.1-1 [10.7 kB] 163s Get:348 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-image0 s390x 0.4.0-2build1 [12.0 kB] 163s Get:349 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render-util0 s390x 0.3.10-1 [10.3 kB] 163s Get:350 http://ftpmaster.internal/ubuntu plucky/universe s390x libxcb-cursor0 s390x 0.1.5-1 [11.3 kB] 163s Get:351 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-icccm4 s390x 0.4.2-1 [11.4 kB] 163s Get:352 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-keysyms1 s390x 0.4.1-1 [8908 B] 163s Get:353 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shape0 s390x 1.17.0-2 [6202 B] 163s Get:354 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xinput0 s390x 1.17.0-2 [35.8 kB] 163s Get:355 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-xkb1 s390x 1.17.0-2 [34.5 kB] 163s Get:356 http://ftpmaster.internal/ubuntu plucky/main s390x libxkbcommon-x11-0 s390x 1.7.0-2 [14.8 kB] 163s Get:357 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6gui6 s390x 6.8.1+dfsg-0ubuntu4 [3670 kB] 163s Get:358 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-common-data s390x 0.8-14ubuntu1 [30.5 kB] 163s Get:359 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-common3 s390x 0.8-14ubuntu1 [23.6 kB] 163s Get:360 http://ftpmaster.internal/ubuntu plucky/main s390x libavahi-client3 s390x 0.8-14ubuntu1 [26.8 kB] 163s Get:361 http://ftpmaster.internal/ubuntu plucky/main s390x libcups2t64 s390x 2.4.11-0ubuntu2 [282 kB] 163s Get:362 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6widgets6 s390x 6.8.1+dfsg-0ubuntu4 [3027 kB] 163s Get:363 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6printsupport6 s390x 6.8.1+dfsg-0ubuntu4 [235 kB] 163s Get:364 http://ftpmaster.internal/ubuntu plucky/universe s390x libqscintilla2-qt6-15 s390x 2.14.1+dfsg-1build4 [1357 kB] 163s Get:365 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6core5compat6 s390x 6.8.1-0ubuntu2 [161 kB] 163s Get:366 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6sql6 s390x 6.8.1+dfsg-0ubuntu4 [156 kB] 163s Get:367 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6help6 s390x 6.8.1-0ubuntu1 [215 kB] 163s Get:368 http://ftpmaster.internal/ubuntu plucky/main s390x libduktape207 s390x 2.7.0+tests-0ubuntu3 [150 kB] 163s Get:369 http://ftpmaster.internal/ubuntu plucky/main s390x libproxy1v5 s390x 0.5.9-1 [27.8 kB] 163s Get:370 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6network6 s390x 6.8.1+dfsg-0ubuntu4 [922 kB] 163s Get:371 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6opengl6 s390x 6.8.1+dfsg-0ubuntu4 [465 kB] 163s Get:372 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6openglwidgets6 s390x 6.8.1+dfsg-0ubuntu4 [43.7 kB] 163s Get:373 http://ftpmaster.internal/ubuntu plucky/universe s390x libqt6xml6 s390x 6.8.1+dfsg-0ubuntu4 [84.2 kB] 163s Get:374 http://ftpmaster.internal/ubuntu plucky/main s390x libogg0 s390x 1.3.5-3build1 [24.4 kB] 163s Get:375 http://ftpmaster.internal/ubuntu plucky/main s390x libflac12t64 s390x 1.4.3+ds-4 [161 kB] 163s Get:376 http://ftpmaster.internal/ubuntu plucky/main s390x libmp3lame0 s390x 3.100-6build1 [160 kB] 163s Get:377 http://ftpmaster.internal/ubuntu plucky/main s390x libmpg123-0t64 s390x 1.32.10-1 [179 kB] 163s Get:378 http://ftpmaster.internal/ubuntu plucky/main s390x libvorbis0a s390x 1.3.7-2 [112 kB] 163s Get:379 http://ftpmaster.internal/ubuntu plucky/main s390x libvorbisenc2 s390x 1.3.7-2 [80.6 kB] 163s Get:380 http://ftpmaster.internal/ubuntu plucky/main s390x libsndfile1 s390x 1.2.2-2 [238 kB] 163s Get:381 http://ftpmaster.internal/ubuntu plucky/universe s390x libspqr4 s390x 1:7.8.3+dfsg-3 [171 kB] 163s Get:382 http://ftpmaster.internal/ubuntu plucky/universe s390x libumfpack6 s390x 1:7.8.3+dfsg-3 [371 kB] 163s Get:383 http://ftpmaster.internal/ubuntu plucky/universe s390x libtext-unidecode-perl all 1.30-3 [105 kB] 163s Get:384 http://ftpmaster.internal/ubuntu plucky/universe s390x texinfo-lib s390x 7.1.1-1 [142 kB] 163s Get:385 http://ftpmaster.internal/ubuntu plucky/universe s390x tex-common all 6.18 [32.8 kB] 163s Get:386 http://ftpmaster.internal/ubuntu plucky/universe s390x texinfo all 7.1.1-1 [1272 kB] 163s Get:387 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-common all 9.4.0-1 [6087 kB] 164s Get:388 http://ftpmaster.internal/ubuntu plucky/universe s390x octave s390x 9.4.0-1 [10.1 MB] 164s Get:389 http://ftpmaster.internal/ubuntu plucky/main s390x libncurses-dev s390x 6.5+20250125-2 [407 kB] 164s Get:390 http://ftpmaster.internal/ubuntu plucky/main s390x libreadline-dev s390x 8.2-6 [187 kB] 164s Get:391 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-fortran-310 s390x 1.14.5+repack-3 [115 kB] 164s Get:392 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-310 s390x 1.14.5+repack-3 [61.0 kB] 164s Get:393 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-fortran-310 s390x 1.14.5+repack-3 [32.5 kB] 164s Get:394 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-cpp-310 s390x 1.14.5+repack-3 [117 kB] 164s Get:395 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-hl-cpp-310 s390x 1.14.5+repack-3 [11.7 kB] 164s Get:396 http://ftpmaster.internal/ubuntu plucky/main s390x zlib1g-dev s390x 1:1.3.dfsg+really1.3.1-1ubuntu1 [898 kB] 164s Get:397 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8-dev s390x 2.1.5-3ubuntu2 [281 kB] 164s Get:398 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8-dev s390x 8c-2ubuntu11 [1484 B] 164s Get:399 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-dev s390x 8c-2ubuntu11 [1484 B] 164s Get:400 http://ftpmaster.internal/ubuntu plucky/universe s390x libaec-dev s390x 1.1.3-1 [23.3 kB] 164s Get:401 http://ftpmaster.internal/ubuntu plucky/main s390x libbrotli-dev s390x 1.1.0-2build3 [395 kB] 164s Get:402 http://ftpmaster.internal/ubuntu plucky/main s390x libidn2-dev s390x 2.3.7-2build2 [122 kB] 164s Get:403 http://ftpmaster.internal/ubuntu plucky/main s390x comerr-dev s390x 2.1-1.47.2-1ubuntu1 [44.7 kB] 164s Get:404 http://ftpmaster.internal/ubuntu plucky/main s390x libgssrpc4t64 s390x 1.21.3-4ubuntu1 [59.1 kB] 164s Get:405 http://ftpmaster.internal/ubuntu plucky/main s390x libkadm5clnt-mit12 s390x 1.21.3-4ubuntu1 [40.5 kB] 165s Get:406 http://ftpmaster.internal/ubuntu plucky/main s390x libkdb5-10t64 s390x 1.21.3-4ubuntu1 [41.9 kB] 165s Get:407 http://ftpmaster.internal/ubuntu plucky/main s390x libkadm5srv-mit12 s390x 1.21.3-4ubuntu1 [55.6 kB] 165s Get:408 http://ftpmaster.internal/ubuntu plucky/main s390x krb5-multidev s390x 1.21.3-4ubuntu1 [125 kB] 165s Get:409 http://ftpmaster.internal/ubuntu plucky/main s390x libkrb5-dev s390x 1.21.3-4ubuntu1 [11.9 kB] 165s Get:410 http://ftpmaster.internal/ubuntu plucky/main s390x libldap-dev s390x 2.6.9+dfsg-1~exp2ubuntu1 [316 kB] 165s Get:411 http://ftpmaster.internal/ubuntu plucky/main s390x libpkgconf3 s390x 1.8.1-4 [31.2 kB] 165s Get:412 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf-bin s390x 1.8.1-4 [21.5 kB] 165s Get:413 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf s390x 1.8.1-4 [16.7 kB] 165s Get:414 http://ftpmaster.internal/ubuntu plucky/main s390x libnghttp2-dev s390x 1.64.0-1 [121 kB] 165s Get:415 http://ftpmaster.internal/ubuntu plucky/main s390x libpsl-dev s390x 0.21.2-1.1build1 [77.3 kB] 165s Get:416 http://ftpmaster.internal/ubuntu plucky/main s390x libgmpxx4ldbl s390x 2:6.3.0+dfsg-2ubuntu7 [10.1 kB] 165s Get:417 http://ftpmaster.internal/ubuntu plucky/main s390x libgmp-dev s390x 2:6.3.0+dfsg-2ubuntu7 [424 kB] 165s Get:418 http://ftpmaster.internal/ubuntu plucky/main s390x libevent-2.1-7t64 s390x 2.1.12-stable-10 [145 kB] 165s Get:419 http://ftpmaster.internal/ubuntu plucky/main s390x libunbound8 s390x 1.22.0-1ubuntu1 [462 kB] 165s Get:420 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls-dane0t64 s390x 3.8.9-2ubuntu1 [24.5 kB] 165s Get:421 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls-openssl27t64 s390x 3.8.9-2ubuntu1 [24.5 kB] 165s Get:422 http://ftpmaster.internal/ubuntu plucky/main s390x libp11-kit-dev s390x 0.25.5-2ubuntu1 [22.7 kB] 165s Get:423 http://ftpmaster.internal/ubuntu plucky/main s390x libtasn1-6-dev s390x 4.20.0-2 [94.8 kB] 165s Get:424 http://ftpmaster.internal/ubuntu plucky/main s390x nettle-dev s390x 3.10-1 [1197 kB] 165s Get:425 http://ftpmaster.internal/ubuntu plucky/main s390x libgnutls28-dev s390x 3.8.9-2ubuntu1 [1016 kB] 165s Get:426 http://ftpmaster.internal/ubuntu plucky/main s390x librtmp-dev s390x 2.4+20151223.gitfa8646d.1-2build7 [69.2 kB] 165s Get:427 http://ftpmaster.internal/ubuntu plucky/main s390x libssl-dev s390x 3.4.0-1ubuntu2 [2427 kB] 165s Get:428 http://ftpmaster.internal/ubuntu plucky/main s390x libssh2-1-dev s390x 1.11.1-1 [287 kB] 165s Get:429 http://ftpmaster.internal/ubuntu plucky/main s390x libzstd-dev s390x 1.5.6+dfsg-2 [408 kB] 165s Get:430 http://ftpmaster.internal/ubuntu plucky/main s390x libcurl4-openssl-dev s390x 8.12.0+git20250209.89ed161+ds-1ubuntu1 [513 kB] 165s Get:431 http://ftpmaster.internal/ubuntu plucky/universe s390x hdf5-helpers s390x 1.14.5+repack-3 [17.0 kB] 165s Get:432 http://ftpmaster.internal/ubuntu plucky/universe s390x libhdf5-dev s390x 1.14.5+repack-3 [3385 kB] 165s Get:433 http://ftpmaster.internal/ubuntu plucky/main s390x xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 165s Get:434 http://ftpmaster.internal/ubuntu plucky/main s390x x11proto-dev all 2024.1-1 [606 kB] 165s Get:435 http://ftpmaster.internal/ubuntu plucky/main s390x libxau-dev s390x 1:1.0.11-1 [9752 B] 165s Get:436 http://ftpmaster.internal/ubuntu plucky/main s390x libxdmcp-dev s390x 1:1.1.5-1 [26.9 kB] 165s Get:437 http://ftpmaster.internal/ubuntu plucky/main s390x xtrans-dev all 1.4.0-1 [68.9 kB] 165s Get:438 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb1-dev s390x 1.17.0-2 [88.9 kB] 165s Get:439 http://ftpmaster.internal/ubuntu plucky/main s390x libx11-dev s390x 2:1.8.10-2 [761 kB] 165s Get:440 http://ftpmaster.internal/ubuntu plucky/main s390x libglx-dev s390x 1.7.0-1build1 [14.2 kB] 165s Get:441 http://ftpmaster.internal/ubuntu plucky/main s390x libgl-dev s390x 1.7.0-1build1 [102 kB] 165s Get:442 http://ftpmaster.internal/ubuntu plucky/main s390x libblas-dev s390x 3.12.1-2 [254 kB] 165s Get:443 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack-dev s390x 3.12.1-2 [5967 kB] 166s Get:444 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-long3 s390x 3.3.10-2fakesync1build1 [533 kB] 166s Get:445 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-bin s390x 3.3.10-2fakesync1build1 [36.5 kB] 166s Get:446 http://ftpmaster.internal/ubuntu plucky/main s390x libfftw3-dev s390x 3.3.10-2fakesync1build1 [1329 kB] 166s Get:447 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran-14-dev s390x 14.2.0-17ubuntu1 [654 kB] 166s Get:448 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14-s390x-linux-gnu s390x 14.2.0-17ubuntu1 [10.3 MB] 166s Get:449 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14 s390x 14.2.0-17ubuntu1 [13.6 kB] 166s Get:450 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1012 B] 166s Get:451 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran s390x 4:14.2.0-1ubuntu1 [1160 B] 166s Get:452 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-17ubuntu1 [2611 kB] 166s Get:453 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-17ubuntu1 [11.0 MB] 166s Get:454 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-17ubuntu1 [21.8 kB] 166s Get:455 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 166s Get:456 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 166s Get:457 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-dev s390x 9.4.0-1 [460 kB] 166s Get:458 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-octave all 1.8.0 [19.7 kB] 166s Get:459 http://ftpmaster.internal/ubuntu plucky/main s390x libfontenc1 s390x 1:1.1.8-1build1 [14.8 kB] 166s Get:460 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 166s Get:461 http://ftpmaster.internal/ubuntu plucky/main s390x libxmu6 s390x 2:1.1.3-3build2 [53.0 kB] 166s Get:462 http://ftpmaster.internal/ubuntu plucky/main s390x libxaw7 s390x 2:1.0.16-1 [201 kB] 166s Get:463 http://ftpmaster.internal/ubuntu plucky/main s390x libxfont2 s390x 1:2.0.6-1build1 [101 kB] 166s Get:464 http://ftpmaster.internal/ubuntu plucky/main s390x libxkbfile1 s390x 1:1.1.0-1build4 [76.5 kB] 166s Get:465 http://ftpmaster.internal/ubuntu plucky/main s390x libxrandr2 s390x 2:1.5.4-1 [20.8 kB] 166s Get:466 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-io s390x 2.6.4-3build2 [227 kB] 166s Get:467 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-statistics-common all 1.7.2-1 [926 kB] 166s Get:468 http://ftpmaster.internal/ubuntu plucky/universe s390x octave-statistics s390x 1.7.2-1 [189 kB] 166s Get:469 http://ftpmaster.internal/ubuntu plucky/main s390x x11-xkb-utils s390x 7.7+9 [169 kB] 166s Get:470 http://ftpmaster.internal/ubuntu plucky/main s390x xserver-common all 2:21.1.14-2ubuntu1 [33.7 kB] 166s Get:471 http://ftpmaster.internal/ubuntu plucky/universe s390x xvfb s390x 2:21.1.14-2ubuntu1 [941 kB] 167s Fetched 175 MB in 11s (16.0 MB/s) 167s Selecting previously unselected package libstemmer0d:s390x. 167s (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 ... 55869 files and directories currently installed.) 167s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_s390x.deb ... 167s Unpacking libstemmer0d:s390x (2.2.0-4build1) ... 168s Selecting previously unselected package libappstream5:s390x. 168s Preparing to unpack .../001-libappstream5_1.0.4-1_s390x.deb ... 168s Unpacking libappstream5:s390x (1.0.4-1) ... 168s Selecting previously unselected package appstream. 168s Preparing to unpack .../002-appstream_1.0.4-1_s390x.deb ... 168s Unpacking appstream (1.0.4-1) ... 168s Selecting previously unselected package m4. 168s Preparing to unpack .../003-m4_1.4.19-5_s390x.deb ... 168s Unpacking m4 (1.4.19-5) ... 168s Selecting previously unselected package autoconf. 168s Preparing to unpack .../004-autoconf_2.72-3_all.deb ... 168s Unpacking autoconf (2.72-3) ... 168s Selecting previously unselected package autotools-dev. 168s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 168s Unpacking autotools-dev (20220109.1) ... 168s Selecting previously unselected package automake. 168s Preparing to unpack .../006-automake_1%3a1.17-3_all.deb ... 168s Unpacking automake (1:1.17-3) ... 168s Selecting previously unselected package autopoint. 168s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 168s Unpacking autopoint (0.23.1-1) ... 168s Selecting previously unselected package libcapture-tiny-perl. 168s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 168s Unpacking libcapture-tiny-perl (0.50-1) ... 168s Selecting previously unselected package libparams-util-perl. 168s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_s390x.deb ... 168s Unpacking libparams-util-perl (1.102-3build1) ... 168s Selecting previously unselected package libsub-install-perl. 168s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 168s Unpacking libsub-install-perl (0.929-1) ... 168s Selecting previously unselected package libdata-optlist-perl. 168s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 168s Unpacking libdata-optlist-perl (0.114-1) ... 168s Selecting previously unselected package libb-hooks-op-check-perl:s390x. 168s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_s390x.deb ... 168s Unpacking libb-hooks-op-check-perl:s390x (0.22-3build2) ... 168s Selecting previously unselected package libdynaloader-functions-perl. 168s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 168s Unpacking libdynaloader-functions-perl (0.004-1) ... 168s Selecting previously unselected package libdevel-callchecker-perl:s390x. 168s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_s390x.deb ... 168s Unpacking libdevel-callchecker-perl:s390x (0.009-1build1) ... 168s Selecting previously unselected package libparams-classify-perl:s390x. 168s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_s390x.deb ... 168s Unpacking libparams-classify-perl:s390x (0.015-2build6) ... 168s Selecting previously unselected package libmodule-runtime-perl. 168s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 168s Unpacking libmodule-runtime-perl (0.016-2) ... 168s Selecting previously unselected package libtry-tiny-perl. 168s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 168s Unpacking libtry-tiny-perl (0.32-1) ... 168s Selecting previously unselected package libmodule-implementation-perl. 168s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 168s Unpacking libmodule-implementation-perl (0.09-2) ... 168s Selecting previously unselected package libpackage-stash-perl. 168s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 168s Unpacking libpackage-stash-perl (0.40-1) ... 168s Selecting previously unselected package libclass-load-perl. 168s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 168s Unpacking libclass-load-perl (0.25-2) ... 168s Selecting previously unselected package libio-stringy-perl. 168s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 168s Unpacking libio-stringy-perl (2.113-2) ... 168s Selecting previously unselected package libparams-validate-perl:s390x. 168s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_s390x.deb ... 168s Unpacking libparams-validate-perl:s390x (1.31-2build4) ... 168s Selecting previously unselected package libsub-exporter-perl. 168s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 168s Unpacking libsub-exporter-perl (0.990-1) ... 168s Selecting previously unselected package libgetopt-long-descriptive-perl. 168s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 168s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 168s Selecting previously unselected package libio-tiecombine-perl. 168s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 168s Unpacking libio-tiecombine-perl (1.005-3) ... 168s Selecting previously unselected package libmodule-pluggable-perl. 168s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 168s Unpacking libmodule-pluggable-perl (5.2-5) ... 168s Selecting previously unselected package libstring-rewriteprefix-perl. 168s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 168s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 168s Selecting previously unselected package libapp-cmd-perl. 168s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 168s Unpacking libapp-cmd-perl (0.337-2) ... 168s Selecting previously unselected package libboolean-perl. 168s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 168s Unpacking libboolean-perl (0.46-3) ... 168s Selecting previously unselected package libsub-uplevel-perl. 168s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 168s Unpacking libsub-uplevel-perl (0.2800-3) ... 168s Selecting previously unselected package libtest-exception-perl. 168s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 168s Unpacking libtest-exception-perl (0.43-3) ... 168s Selecting previously unselected package libcarp-assert-more-perl. 168s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 168s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 168s Selecting previously unselected package libfile-which-perl. 168s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 168s Unpacking libfile-which-perl (1.27-2) ... 168s Selecting previously unselected package libfile-homedir-perl. 168s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 168s Unpacking libfile-homedir-perl (1.006-2) ... 168s Selecting previously unselected package libclone-choose-perl. 168s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 168s Unpacking libclone-choose-perl (0.010-2) ... 168s Selecting previously unselected package libhash-merge-perl. 168s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 168s Unpacking libhash-merge-perl (0.302-1) ... 168s Selecting previously unselected package libjson-perl. 168s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 168s Unpacking libjson-perl (4.10000-1) ... 168s Selecting previously unselected package libexporter-tiny-perl. 168s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 168s Unpacking libexporter-tiny-perl (1.006002-1) ... 168s Selecting previously unselected package liblist-moreutils-xs-perl. 168s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_s390x.deb ... 168s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 168s Selecting previously unselected package liblist-moreutils-perl. 168s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 168s Unpacking liblist-moreutils-perl (0.430-2) ... 168s Selecting previously unselected package liblog-log4perl-perl. 168s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 168s Unpacking liblog-log4perl-perl (1.57-1) ... 168s Selecting previously unselected package libmouse-perl:s390x. 168s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_s390x.deb ... 168s Unpacking libmouse-perl:s390x (2.5.11-1build1) ... 168s Selecting previously unselected package libmousex-nativetraits-perl. 168s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 168s Unpacking libmousex-nativetraits-perl (1.09-3) ... 168s Selecting previously unselected package libmousex-strictconstructor-perl. 168s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 168s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 168s Selecting previously unselected package libparse-recdescent-perl. 168s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 168s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 168s Selecting previously unselected package libpath-tiny-perl. 168s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 168s Unpacking libpath-tiny-perl (0.146-1) ... 168s Selecting previously unselected package libpod-pom-perl. 168s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 168s Unpacking libpod-pom-perl (2.01-4) ... 168s Selecting previously unselected package libregexp-common-perl. 168s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 168s Unpacking libregexp-common-perl (2024080801-1) ... 168s Selecting previously unselected package libyaml-tiny-perl. 168s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 168s Unpacking libyaml-tiny-perl (1.76-1) ... 168s Selecting previously unselected package libconfig-model-perl. 168s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 168s Unpacking libconfig-model-perl (2.155-1) ... 168s Selecting previously unselected package libyaml-pp-perl. 168s Preparing to unpack .../051-libyaml-pp-perl_0.38.1-2_all.deb ... 168s Unpacking libyaml-pp-perl (0.38.1-2) ... 168s Selecting previously unselected package cme. 168s Preparing to unpack .../052-cme_1.041-1_all.deb ... 168s Unpacking cme (1.041-1) ... 168s Selecting previously unselected package libisl23:s390x. 168s Preparing to unpack .../053-libisl23_0.27-1_s390x.deb ... 168s Unpacking libisl23:s390x (0.27-1) ... 168s Selecting previously unselected package libmpc3:s390x. 168s Preparing to unpack .../054-libmpc3_1.3.1-1build2_s390x.deb ... 168s Unpacking libmpc3:s390x (1.3.1-1build2) ... 168s Selecting previously unselected package cpp-14-s390x-linux-gnu. 168s Preparing to unpack .../055-cpp-14-s390x-linux-gnu_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking cpp-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package cpp-14. 168s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking cpp-14 (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package cpp-s390x-linux-gnu. 168s Preparing to unpack .../057-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 168s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 168s Selecting previously unselected package cpp. 168s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 168s Unpacking cpp (4:14.2.0-1ubuntu1) ... 168s Selecting previously unselected package libdebhelper-perl. 168s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 168s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 168s Selecting previously unselected package libcc1-0:s390x. 168s Preparing to unpack .../060-libcc1-0_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libcc1-0:s390x (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package libgomp1:s390x. 168s Preparing to unpack .../061-libgomp1_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libgomp1:s390x (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package libitm1:s390x. 168s Preparing to unpack .../062-libitm1_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libitm1:s390x (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package libasan8:s390x. 168s Preparing to unpack .../063-libasan8_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libasan8:s390x (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package libubsan1:s390x. 168s Preparing to unpack .../064-libubsan1_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libubsan1:s390x (14.2.0-17ubuntu1) ... 168s Selecting previously unselected package libgcc-14-dev:s390x. 168s Preparing to unpack .../065-libgcc-14-dev_14.2.0-17ubuntu1_s390x.deb ... 168s Unpacking libgcc-14-dev:s390x (14.2.0-17ubuntu1) ... 169s Selecting previously unselected package gcc-14-s390x-linux-gnu. 169s Preparing to unpack .../066-gcc-14-s390x-linux-gnu_14.2.0-17ubuntu1_s390x.deb ... 169s Unpacking gcc-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 169s Selecting previously unselected package gcc-14. 169s Preparing to unpack .../067-gcc-14_14.2.0-17ubuntu1_s390x.deb ... 169s Unpacking gcc-14 (14.2.0-17ubuntu1) ... 169s Selecting previously unselected package gcc-s390x-linux-gnu. 169s Preparing to unpack .../068-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 169s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 169s Selecting previously unselected package gcc. 169s Preparing to unpack .../069-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 169s Unpacking gcc (4:14.2.0-1ubuntu1) ... 169s Selecting previously unselected package libtool. 169s Preparing to unpack .../070-libtool_2.5.4-3build1_all.deb ... 169s Unpacking libtool (2.5.4-3build1) ... 169s Selecting previously unselected package dh-autoreconf. 169s Preparing to unpack .../071-dh-autoreconf_20_all.deb ... 169s Unpacking dh-autoreconf (20) ... 169s Selecting previously unselected package libarchive-zip-perl. 169s Preparing to unpack .../072-libarchive-zip-perl_1.68-1_all.deb ... 169s Unpacking libarchive-zip-perl (1.68-1) ... 169s Selecting previously unselected package libfile-stripnondeterminism-perl. 169s Preparing to unpack .../073-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 169s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 169s Selecting previously unselected package dh-strip-nondeterminism. 169s Preparing to unpack .../074-dh-strip-nondeterminism_1.14.1-2_all.deb ... 169s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 169s Selecting previously unselected package debugedit. 169s Preparing to unpack .../075-debugedit_1%3a5.1-2_s390x.deb ... 169s Unpacking debugedit (1:5.1-2) ... 169s Selecting previously unselected package dwz. 169s Preparing to unpack .../076-dwz_0.15-1build6_s390x.deb ... 169s Unpacking dwz (0.15-1build6) ... 169s Selecting previously unselected package gettext. 169s Preparing to unpack .../077-gettext_0.23.1-1_s390x.deb ... 169s Unpacking gettext (0.23.1-1) ... 169s Selecting previously unselected package intltool-debian. 169s Preparing to unpack .../078-intltool-debian_0.35.0+20060710.6_all.deb ... 169s Unpacking intltool-debian (0.35.0+20060710.6) ... 169s Selecting previously unselected package po-debconf. 169s Preparing to unpack .../079-po-debconf_1.0.21+nmu1_all.deb ... 169s Unpacking po-debconf (1.0.21+nmu1) ... 169s Selecting previously unselected package debhelper. 169s Preparing to unpack .../080-debhelper_13.24.1ubuntu2_all.deb ... 169s Unpacking debhelper (13.24.1ubuntu2) ... 169s Selecting previously unselected package aglfn. 169s Preparing to unpack .../081-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 169s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 169s Selecting previously unselected package gnuplot-data. 169s Preparing to unpack .../082-gnuplot-data_6.0.0+dfsg1-1ubuntu3_all.deb ... 169s Unpacking gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 169s Selecting previously unselected package libfreetype6:s390x. 169s Preparing to unpack .../083-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 169s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 169s Selecting previously unselected package fonts-dejavu-mono. 169s Preparing to unpack .../084-fonts-dejavu-mono_2.37-8_all.deb ... 169s Unpacking fonts-dejavu-mono (2.37-8) ... 169s Selecting previously unselected package fonts-dejavu-core. 169s Preparing to unpack .../085-fonts-dejavu-core_2.37-8_all.deb ... 169s Unpacking fonts-dejavu-core (2.37-8) ... 169s Selecting previously unselected package fonts-freefont-otf. 169s Preparing to unpack .../086-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 169s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 169s Selecting previously unselected package fontconfig-config. 169s Preparing to unpack .../087-fontconfig-config_2.15.0-1.1ubuntu2_s390x.deb ... 169s Unpacking fontconfig-config (2.15.0-1.1ubuntu2) ... 169s Selecting previously unselected package libfontconfig1:s390x. 169s Preparing to unpack .../088-libfontconfig1_2.15.0-1.1ubuntu2_s390x.deb ... 169s Unpacking libfontconfig1:s390x (2.15.0-1.1ubuntu2) ... 169s Selecting previously unselected package libpixman-1-0:s390x. 169s Preparing to unpack .../089-libpixman-1-0_0.44.0-3_s390x.deb ... 169s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 169s Selecting previously unselected package libxcb-render0:s390x. 169s Preparing to unpack .../090-libxcb-render0_1.17.0-2_s390x.deb ... 169s Unpacking libxcb-render0:s390x (1.17.0-2) ... 169s Selecting previously unselected package libxcb-shm0:s390x. 169s Preparing to unpack .../091-libxcb-shm0_1.17.0-2_s390x.deb ... 169s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 169s Selecting previously unselected package libxrender1:s390x. 169s Preparing to unpack .../092-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 169s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 169s Selecting previously unselected package libcairo2:s390x. 169s Preparing to unpack .../093-libcairo2_1.18.2-2_s390x.deb ... 169s Unpacking libcairo2:s390x (1.18.2-2) ... 169s Selecting previously unselected package libsharpyuv0:s390x. 169s Preparing to unpack .../094-libsharpyuv0_1.5.0-0.1_s390x.deb ... 169s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 169s Selecting previously unselected package libaom3:s390x. 169s Preparing to unpack .../095-libaom3_3.12.0-1_s390x.deb ... 169s Unpacking libaom3:s390x (3.12.0-1) ... 169s Selecting previously unselected package libheif-plugin-aomdec:s390x. 169s Preparing to unpack .../096-libheif-plugin-aomdec_1.19.5-1build1_s390x.deb ... 169s Unpacking libheif-plugin-aomdec:s390x (1.19.5-1build1) ... 169s Selecting previously unselected package libde265-0:s390x. 169s Preparing to unpack .../097-libde265-0_1.0.15-1build4_s390x.deb ... 169s Unpacking libde265-0:s390x (1.0.15-1build4) ... 169s Selecting previously unselected package libheif-plugin-libde265:s390x. 169s Preparing to unpack .../098-libheif-plugin-libde265_1.19.5-1build1_s390x.deb ... 169s Unpacking libheif-plugin-libde265:s390x (1.19.5-1build1) ... 169s Selecting previously unselected package libheif1:s390x. 169s Preparing to unpack .../099-libheif1_1.19.5-1build1_s390x.deb ... 169s Unpacking libheif1:s390x (1.19.5-1build1) ... 169s Selecting previously unselected package libimagequant0:s390x. 169s Preparing to unpack .../100-libimagequant0_2.18.0-1build1_s390x.deb ... 169s Unpacking libimagequant0:s390x (2.18.0-1build1) ... 169s Selecting previously unselected package libjpeg-turbo8:s390x. 169s Preparing to unpack .../101-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 169s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 169s Selecting previously unselected package libjpeg8:s390x. 169s Preparing to unpack .../102-libjpeg8_8c-2ubuntu11_s390x.deb ... 169s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 169s Selecting previously unselected package libgraphite2-3:s390x. 169s Preparing to unpack .../103-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 169s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 169s Selecting previously unselected package libharfbuzz0b:s390x. 169s Preparing to unpack .../104-libharfbuzz0b_10.2.0-1_s390x.deb ... 169s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 170s Selecting previously unselected package libraqm0:s390x. 170s Preparing to unpack .../105-libraqm0_0.10.2-1_s390x.deb ... 170s Unpacking libraqm0:s390x (0.10.2-1) ... 170s Selecting previously unselected package libdeflate0:s390x. 170s Preparing to unpack .../106-libdeflate0_1.23-1_s390x.deb ... 170s Unpacking libdeflate0:s390x (1.23-1) ... 170s Selecting previously unselected package libjbig0:s390x. 170s Preparing to unpack .../107-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 170s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 170s Selecting previously unselected package libwebp7:s390x. 170s Preparing to unpack .../108-libwebp7_1.5.0-0.1_s390x.deb ... 170s Unpacking libwebp7:s390x (1.5.0-0.1) ... 170s Selecting previously unselected package libtiff6:s390x. 170s Preparing to unpack .../109-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 170s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 170s Selecting previously unselected package libxpm4:s390x. 170s Preparing to unpack .../110-libxpm4_1%3a3.5.17-1build2_s390x.deb ... 170s Unpacking libxpm4:s390x (1:3.5.17-1build2) ... 170s Selecting previously unselected package libgd3:s390x. 170s Preparing to unpack .../111-libgd3_2.3.3-12ubuntu3_s390x.deb ... 170s Unpacking libgd3:s390x (2.3.3-12ubuntu3) ... 170s Selecting previously unselected package liblua5.4-0:s390x. 170s Preparing to unpack .../112-liblua5.4-0_5.4.7-1_s390x.deb ... 170s Unpacking liblua5.4-0:s390x (5.4.7-1) ... 170s Selecting previously unselected package fontconfig. 170s Preparing to unpack .../113-fontconfig_2.15.0-1.1ubuntu2_s390x.deb ... 170s Unpacking fontconfig (2.15.0-1.1ubuntu2) ... 170s Selecting previously unselected package libthai-data. 170s Preparing to unpack .../114-libthai-data_0.1.29-2build1_all.deb ... 170s Unpacking libthai-data (0.1.29-2build1) ... 170s Selecting previously unselected package libdatrie1:s390x. 170s Preparing to unpack .../115-libdatrie1_0.2.13-3build1_s390x.deb ... 170s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 170s Selecting previously unselected package libthai0:s390x. 170s Preparing to unpack .../116-libthai0_0.1.29-2build1_s390x.deb ... 170s Unpacking libthai0:s390x (0.1.29-2build1) ... 170s Selecting previously unselected package libpango-1.0-0:s390x. 170s Preparing to unpack .../117-libpango-1.0-0_1.56.1-1_s390x.deb ... 170s Unpacking libpango-1.0-0:s390x (1.56.1-1) ... 170s Selecting previously unselected package libpangoft2-1.0-0:s390x. 170s Preparing to unpack .../118-libpangoft2-1.0-0_1.56.1-1_s390x.deb ... 170s Unpacking libpangoft2-1.0-0:s390x (1.56.1-1) ... 170s Selecting previously unselected package libpangocairo-1.0-0:s390x. 170s Preparing to unpack .../119-libpangocairo-1.0-0_1.56.1-1_s390x.deb ... 170s Unpacking libpangocairo-1.0-0:s390x (1.56.1-1) ... 170s Selecting previously unselected package libwebpmux3:s390x. 170s Preparing to unpack .../120-libwebpmux3_1.5.0-0.1_s390x.deb ... 170s Unpacking libwebpmux3:s390x (1.5.0-0.1) ... 170s Selecting previously unselected package gnuplot-nox. 170s Preparing to unpack .../121-gnuplot-nox_6.0.0+dfsg1-1ubuntu3_s390x.deb ... 170s Unpacking gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 170s Selecting previously unselected package dh-octave-autopkgtest. 170s Preparing to unpack .../122-dh-octave-autopkgtest_1.8.0_all.deb ... 170s Unpacking dh-octave-autopkgtest (1.8.0) ... 170s Selecting previously unselected package libapt-pkg-perl. 170s Preparing to unpack .../123-libapt-pkg-perl_0.1.40build8_s390x.deb ... 170s Unpacking libapt-pkg-perl (0.1.40build8) ... 170s Selecting previously unselected package libarray-intspan-perl. 170s Preparing to unpack .../124-libarray-intspan-perl_2.004-2_all.deb ... 170s Unpacking libarray-intspan-perl (2.004-2) ... 170s Selecting previously unselected package libyaml-libyaml-perl. 170s Preparing to unpack .../125-libyaml-libyaml-perl_0.903.0+ds-1_s390x.deb ... 170s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 170s Selecting previously unselected package libconfig-model-backend-yaml-perl. 170s Preparing to unpack .../126-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 170s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 170s Selecting previously unselected package libexporter-lite-perl. 170s Preparing to unpack .../127-libexporter-lite-perl_0.09-2_all.deb ... 170s Unpacking libexporter-lite-perl (0.09-2) ... 170s Selecting previously unselected package libencode-locale-perl. 170s Preparing to unpack .../128-libencode-locale-perl_1.05-3_all.deb ... 170s Unpacking libencode-locale-perl (1.05-3) ... 170s Selecting previously unselected package libtimedate-perl. 170s Preparing to unpack .../129-libtimedate-perl_2.3300-2_all.deb ... 170s Unpacking libtimedate-perl (2.3300-2) ... 170s Selecting previously unselected package libhttp-date-perl. 170s Preparing to unpack .../130-libhttp-date-perl_6.06-1_all.deb ... 170s Unpacking libhttp-date-perl (6.06-1) ... 170s Selecting previously unselected package libfile-listing-perl. 170s Preparing to unpack .../131-libfile-listing-perl_6.16-1_all.deb ... 170s Unpacking libfile-listing-perl (6.16-1) ... 170s Selecting previously unselected package libhtml-tagset-perl. 170s Preparing to unpack .../132-libhtml-tagset-perl_3.24-1_all.deb ... 170s Unpacking libhtml-tagset-perl (3.24-1) ... 170s Selecting previously unselected package liburi-perl. 170s Preparing to unpack .../133-liburi-perl_5.30-1_all.deb ... 170s Unpacking liburi-perl (5.30-1) ... 170s Selecting previously unselected package libhtml-parser-perl:s390x. 170s Preparing to unpack .../134-libhtml-parser-perl_3.83-1build1_s390x.deb ... 170s Unpacking libhtml-parser-perl:s390x (3.83-1build1) ... 170s Selecting previously unselected package libhtml-tree-perl. 170s Preparing to unpack .../135-libhtml-tree-perl_5.07-3_all.deb ... 170s Unpacking libhtml-tree-perl (5.07-3) ... 170s Selecting previously unselected package libclone-perl:s390x. 170s Preparing to unpack .../136-libclone-perl_0.47-1_s390x.deb ... 170s Unpacking libclone-perl:s390x (0.47-1) ... 170s Selecting previously unselected package libio-html-perl. 170s Preparing to unpack .../137-libio-html-perl_1.004-3_all.deb ... 170s Unpacking libio-html-perl (1.004-3) ... 170s Selecting previously unselected package liblwp-mediatypes-perl. 170s Preparing to unpack .../138-liblwp-mediatypes-perl_6.04-2_all.deb ... 170s Unpacking liblwp-mediatypes-perl (6.04-2) ... 170s Selecting previously unselected package libhttp-message-perl. 170s Preparing to unpack .../139-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 170s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 170s Selecting previously unselected package libhttp-cookies-perl. 170s Preparing to unpack .../140-libhttp-cookies-perl_6.11-1_all.deb ... 170s Unpacking libhttp-cookies-perl (6.11-1) ... 170s Selecting previously unselected package libhttp-negotiate-perl. 170s Preparing to unpack .../141-libhttp-negotiate-perl_6.01-2_all.deb ... 170s Unpacking libhttp-negotiate-perl (6.01-2) ... 170s Selecting previously unselected package perl-openssl-defaults:s390x. 170s Preparing to unpack .../142-perl-openssl-defaults_7build3_s390x.deb ... 170s Unpacking perl-openssl-defaults:s390x (7build3) ... 170s Selecting previously unselected package libnet-ssleay-perl:s390x. 170s Preparing to unpack .../143-libnet-ssleay-perl_1.94-2_s390x.deb ... 170s Unpacking libnet-ssleay-perl:s390x (1.94-2) ... 170s Selecting previously unselected package libio-socket-ssl-perl. 170s Preparing to unpack .../144-libio-socket-ssl-perl_2.089-1_all.deb ... 170s Unpacking libio-socket-ssl-perl (2.089-1) ... 170s Selecting previously unselected package libnet-http-perl. 170s Preparing to unpack .../145-libnet-http-perl_6.23-1_all.deb ... 170s Unpacking libnet-http-perl (6.23-1) ... 170s Selecting previously unselected package liblwp-protocol-https-perl. 170s Preparing to unpack .../146-liblwp-protocol-https-perl_6.14-1_all.deb ... 170s Unpacking liblwp-protocol-https-perl (6.14-1) ... 170s Selecting previously unselected package libwww-robotrules-perl. 170s Preparing to unpack .../147-libwww-robotrules-perl_6.02-1_all.deb ... 170s Unpacking libwww-robotrules-perl (6.02-1) ... 170s Selecting previously unselected package libwww-perl. 170s Preparing to unpack .../148-libwww-perl_6.77-1_all.deb ... 170s Unpacking libwww-perl (6.77-1) ... 170s Selecting previously unselected package liberror-perl. 170s Preparing to unpack .../149-liberror-perl_0.17029-2_all.deb ... 170s Unpacking liberror-perl (0.17029-2) ... 170s Selecting previously unselected package libparse-debcontrol-perl. 170s Preparing to unpack .../150-libparse-debcontrol-perl_2.005-6_all.deb ... 170s Unpacking libparse-debcontrol-perl (2.005-6) ... 170s Selecting previously unselected package libsoftware-copyright-perl. 170s Preparing to unpack .../151-libsoftware-copyright-perl_0.012-2_all.deb ... 170s Unpacking libsoftware-copyright-perl (0.012-2) ... 170s Selecting previously unselected package libalgorithm-c3-perl. 170s Preparing to unpack .../152-libalgorithm-c3-perl_0.11-2_all.deb ... 170s Unpacking libalgorithm-c3-perl (0.11-2) ... 170s Selecting previously unselected package libclass-c3-perl. 170s Preparing to unpack .../153-libclass-c3-perl_0.35-2_all.deb ... 170s Unpacking libclass-c3-perl (0.35-2) ... 170s Selecting previously unselected package libmro-compat-perl. 170s Preparing to unpack .../154-libmro-compat-perl_0.15-2_all.deb ... 170s Unpacking libmro-compat-perl (0.15-2) ... 170s Selecting previously unselected package libdata-section-perl. 170s Preparing to unpack .../155-libdata-section-perl_0.200008-1_all.deb ... 170s Unpacking libdata-section-perl (0.200008-1) ... 170s Selecting previously unselected package libtext-template-perl. 170s Preparing to unpack .../156-libtext-template-perl_1.61-1_all.deb ... 170s Unpacking libtext-template-perl (1.61-1) ... 170s Selecting previously unselected package libsoftware-license-perl. 170s Preparing to unpack .../157-libsoftware-license-perl_0.104006-1_all.deb ... 170s Unpacking libsoftware-license-perl (0.104006-1) ... 170s Selecting previously unselected package libsoftware-licensemoreutils-perl. 170s Preparing to unpack .../158-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 170s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 170s Selecting previously unselected package libsort-versions-perl. 170s Preparing to unpack .../159-libsort-versions-perl_1.62-3_all.deb ... 170s Unpacking libsort-versions-perl (1.62-3) ... 170s Selecting previously unselected package libtext-reform-perl. 170s Preparing to unpack .../160-libtext-reform-perl_1.20-5_all.deb ... 170s Unpacking libtext-reform-perl (1.20-5) ... 170s Selecting previously unselected package libtext-autoformat-perl. 170s Preparing to unpack .../161-libtext-autoformat-perl_1.750000-2_all.deb ... 170s Unpacking libtext-autoformat-perl (1.750000-2) ... 170s Selecting previously unselected package libtext-levenshtein-damerau-perl. 170s Preparing to unpack .../162-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 170s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 170s Selecting previously unselected package libtoml-tiny-perl. 170s Preparing to unpack .../163-libtoml-tiny-perl_0.18-1_all.deb ... 170s Unpacking libtoml-tiny-perl (0.18-1) ... 170s Selecting previously unselected package libclass-inspector-perl. 170s Preparing to unpack .../164-libclass-inspector-perl_1.36-3_all.deb ... 170s Unpacking libclass-inspector-perl (1.36-3) ... 170s Selecting previously unselected package libfile-sharedir-perl. 170s Preparing to unpack .../165-libfile-sharedir-perl_1.118-3_all.deb ... 170s Unpacking libfile-sharedir-perl (1.118-3) ... 170s Selecting previously unselected package libindirect-perl. 170s Preparing to unpack .../166-libindirect-perl_0.39-2build5_s390x.deb ... 170s Unpacking libindirect-perl (0.39-2build5) ... 170s Selecting previously unselected package libxs-parse-keyword-perl. 170s Preparing to unpack .../167-libxs-parse-keyword-perl_0.48-2_s390x.deb ... 170s Unpacking libxs-parse-keyword-perl (0.48-2) ... 170s Selecting previously unselected package libxs-parse-sublike-perl:s390x. 170s Preparing to unpack .../168-libxs-parse-sublike-perl_0.36-1_s390x.deb ... 170s Unpacking libxs-parse-sublike-perl:s390x (0.36-1) ... 170s Selecting previously unselected package libobject-pad-perl. 170s Preparing to unpack .../169-libobject-pad-perl_0.819-1_s390x.deb ... 170s Unpacking libobject-pad-perl (0.819-1) ... 170s Selecting previously unselected package libsyntax-keyword-try-perl. 170s Preparing to unpack .../170-libsyntax-keyword-try-perl_0.30-1_s390x.deb ... 170s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 170s Selecting previously unselected package libio-interactive-perl. 170s Preparing to unpack .../171-libio-interactive-perl_1.026-1_all.deb ... 170s Unpacking libio-interactive-perl (1.026-1) ... 170s Selecting previously unselected package liblog-any-perl. 170s Preparing to unpack .../172-liblog-any-perl_1.717-1_all.deb ... 170s Unpacking liblog-any-perl (1.717-1) ... 170s Selecting previously unselected package liblog-any-adapter-screen-perl. 170s Preparing to unpack .../173-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 170s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 170s Selecting previously unselected package libsub-exporter-progressive-perl. 170s Preparing to unpack .../174-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 170s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 170s Selecting previously unselected package libvariable-magic-perl. 170s Preparing to unpack .../175-libvariable-magic-perl_0.64-1build1_s390x.deb ... 170s Unpacking libvariable-magic-perl (0.64-1build1) ... 170s Selecting previously unselected package libb-hooks-endofscope-perl. 170s Preparing to unpack .../176-libb-hooks-endofscope-perl_0.28-1_all.deb ... 170s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 170s Selecting previously unselected package libsub-identify-perl. 170s Preparing to unpack .../177-libsub-identify-perl_0.14-3build4_s390x.deb ... 170s Unpacking libsub-identify-perl (0.14-3build4) ... 170s Selecting previously unselected package libsub-name-perl:s390x. 170s Preparing to unpack .../178-libsub-name-perl_0.28-1_s390x.deb ... 170s Unpacking libsub-name-perl:s390x (0.28-1) ... 170s Selecting previously unselected package libnamespace-clean-perl. 170s Preparing to unpack .../179-libnamespace-clean-perl_0.27-2_all.deb ... 170s Unpacking libnamespace-clean-perl (0.27-2) ... 170s Selecting previously unselected package libnumber-compare-perl. 170s Preparing to unpack .../180-libnumber-compare-perl_0.03-3_all.deb ... 170s Unpacking libnumber-compare-perl (0.03-3) ... 170s Selecting previously unselected package libtext-glob-perl. 170s Preparing to unpack .../181-libtext-glob-perl_0.11-3_all.deb ... 170s Unpacking libtext-glob-perl (0.11-3) ... 170s Selecting previously unselected package libpath-iterator-rule-perl. 170s Preparing to unpack .../182-libpath-iterator-rule-perl_1.015-2_all.deb ... 170s Unpacking libpath-iterator-rule-perl (1.015-2) ... 170s Selecting previously unselected package libpod-parser-perl. 170s Preparing to unpack .../183-libpod-parser-perl_1.67-1_all.deb ... 170s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 170s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 170s Unpacking libpod-parser-perl (1.67-1) ... 170s Selecting previously unselected package libpod-constants-perl. 170s Preparing to unpack .../184-libpod-constants-perl_0.19-2_all.deb ... 170s Unpacking libpod-constants-perl (0.19-2) ... 170s Selecting previously unselected package libset-intspan-perl. 170s Preparing to unpack .../185-libset-intspan-perl_1.19-3_all.deb ... 170s Unpacking libset-intspan-perl (1.19-3) ... 170s Selecting previously unselected package libstring-copyright-perl. 170s Preparing to unpack .../186-libstring-copyright-perl_0.003014-1_all.deb ... 170s Unpacking libstring-copyright-perl (0.003014-1) ... 171s Selecting previously unselected package libstring-escape-perl. 171s Preparing to unpack .../187-libstring-escape-perl_2010.002-3_all.deb ... 171s Unpacking libstring-escape-perl (2010.002-3) ... 171s Selecting previously unselected package libregexp-pattern-license-perl. 171s Preparing to unpack .../188-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 171s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 171s Selecting previously unselected package libregexp-pattern-perl. 171s Preparing to unpack .../189-libregexp-pattern-perl_0.2.14-2_all.deb ... 171s Unpacking libregexp-pattern-perl (0.2.14-2) ... 171s Selecting previously unselected package libstring-license-perl. 171s Preparing to unpack .../190-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 171s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 171s Selecting previously unselected package licensecheck. 171s Preparing to unpack .../191-licensecheck_3.3.9-1ubuntu1_all.deb ... 171s Unpacking licensecheck (3.3.9-1ubuntu1) ... 171s Selecting previously unselected package diffstat. 171s Preparing to unpack .../192-diffstat_1.67-1_s390x.deb ... 171s Unpacking diffstat (1.67-1) ... 171s Selecting previously unselected package libberkeleydb-perl:s390x. 171s Preparing to unpack .../193-libberkeleydb-perl_0.66-1_s390x.deb ... 171s Unpacking libberkeleydb-perl:s390x (0.66-1) ... 171s Selecting previously unselected package libclass-xsaccessor-perl. 171s Preparing to unpack .../194-libclass-xsaccessor-perl_1.19-4build5_s390x.deb ... 171s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 171s Selecting previously unselected package libconfig-tiny-perl. 171s Preparing to unpack .../195-libconfig-tiny-perl_2.30-1_all.deb ... 171s Unpacking libconfig-tiny-perl (2.30-1) ... 171s Selecting previously unselected package libconst-fast-perl. 171s Preparing to unpack .../196-libconst-fast-perl_0.014-2_all.deb ... 171s Unpacking libconst-fast-perl (0.014-2) ... 171s Selecting previously unselected package libcpanel-json-xs-perl:s390x. 171s Preparing to unpack .../197-libcpanel-json-xs-perl_4.39-1_s390x.deb ... 171s Unpacking libcpanel-json-xs-perl:s390x (4.39-1) ... 171s Selecting previously unselected package libaliased-perl. 171s Preparing to unpack .../198-libaliased-perl_0.34-3_all.deb ... 171s Unpacking libaliased-perl (0.34-3) ... 171s Selecting previously unselected package libclass-data-inheritable-perl. 171s Preparing to unpack .../199-libclass-data-inheritable-perl_0.10-1_all.deb ... 171s Unpacking libclass-data-inheritable-perl (0.10-1) ... 171s Selecting previously unselected package libdevel-stacktrace-perl. 171s Preparing to unpack .../200-libdevel-stacktrace-perl_2.0500-1_all.deb ... 171s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 171s Selecting previously unselected package libexception-class-perl. 171s Preparing to unpack .../201-libexception-class-perl_1.45-1_all.deb ... 171s Unpacking libexception-class-perl (1.45-1) ... 171s Selecting previously unselected package libiterator-perl. 171s Preparing to unpack .../202-libiterator-perl_0.03+ds1-2_all.deb ... 171s Unpacking libiterator-perl (0.03+ds1-2) ... 171s Selecting previously unselected package libiterator-util-perl. 171s Preparing to unpack .../203-libiterator-util-perl_0.02+ds1-2_all.deb ... 171s Unpacking libiterator-util-perl (0.02+ds1-2) ... 171s Selecting previously unselected package libdata-dpath-perl. 171s Preparing to unpack .../204-libdata-dpath-perl_0.60-1_all.deb ... 171s Unpacking libdata-dpath-perl (0.60-1) ... 171s Selecting previously unselected package libnet-domain-tld-perl. 171s Preparing to unpack .../205-libnet-domain-tld-perl_1.75-4_all.deb ... 171s Unpacking libnet-domain-tld-perl (1.75-4) ... 171s Selecting previously unselected package libdata-validate-domain-perl. 171s Preparing to unpack .../206-libdata-validate-domain-perl_0.15-1_all.deb ... 171s Unpacking libdata-validate-domain-perl (0.15-1) ... 171s Selecting previously unselected package libnet-ipv6addr-perl. 171s Preparing to unpack .../207-libnet-ipv6addr-perl_1.02-1_all.deb ... 171s Unpacking libnet-ipv6addr-perl (1.02-1) ... 171s Selecting previously unselected package libnet-netmask-perl. 171s Preparing to unpack .../208-libnet-netmask-perl_2.0002-2_all.deb ... 171s Unpacking libnet-netmask-perl (2.0002-2) ... 171s Selecting previously unselected package libnetaddr-ip-perl. 171s Preparing to unpack .../209-libnetaddr-ip-perl_4.079+dfsg-2build5_s390x.deb ... 171s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 171s Selecting previously unselected package libdata-validate-ip-perl. 171s Preparing to unpack .../210-libdata-validate-ip-perl_0.31-1_all.deb ... 171s Unpacking libdata-validate-ip-perl (0.31-1) ... 171s Selecting previously unselected package libdata-validate-uri-perl. 171s Preparing to unpack .../211-libdata-validate-uri-perl_0.07-3_all.deb ... 171s Unpacking libdata-validate-uri-perl (0.07-3) ... 171s Selecting previously unselected package libdevel-size-perl. 171s Preparing to unpack .../212-libdevel-size-perl_0.84-1build1_s390x.deb ... 171s Unpacking libdevel-size-perl (0.84-1build1) ... 171s Selecting previously unselected package libemail-address-xs-perl. 171s Preparing to unpack .../213-libemail-address-xs-perl_1.05-1build5_s390x.deb ... 171s Unpacking libemail-address-xs-perl (1.05-1build5) ... 171s Selecting previously unselected package libipc-system-simple-perl. 171s Preparing to unpack .../214-libipc-system-simple-perl_1.30-2_all.deb ... 171s Unpacking libipc-system-simple-perl (1.30-2) ... 171s Selecting previously unselected package libfile-basedir-perl. 171s Preparing to unpack .../215-libfile-basedir-perl_0.09-2_all.deb ... 171s Unpacking libfile-basedir-perl (0.09-2) ... 171s Selecting previously unselected package libfile-find-rule-perl. 171s Preparing to unpack .../216-libfile-find-rule-perl_0.34-3_all.deb ... 171s Unpacking libfile-find-rule-perl (0.34-3) ... 171s Selecting previously unselected package libio-string-perl. 171s Preparing to unpack .../217-libio-string-perl_1.08-4_all.deb ... 171s Unpacking libio-string-perl (1.08-4) ... 171s Selecting previously unselected package libfont-ttf-perl. 171s Preparing to unpack .../218-libfont-ttf-perl_1.06-2_all.deb ... 171s Unpacking libfont-ttf-perl (1.06-2) ... 171s Selecting previously unselected package libhtml-html5-entities-perl. 171s Preparing to unpack .../219-libhtml-html5-entities-perl_0.004-3_all.deb ... 171s Unpacking libhtml-html5-entities-perl (0.004-3) ... 171s Selecting previously unselected package libhtml-tokeparser-simple-perl. 171s Preparing to unpack .../220-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 171s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 171s Selecting previously unselected package libipc-run3-perl. 171s Preparing to unpack .../221-libipc-run3-perl_0.049-1_all.deb ... 171s Unpacking libipc-run3-perl (0.049-1) ... 171s Selecting previously unselected package libjson-maybexs-perl. 171s Preparing to unpack .../222-libjson-maybexs-perl_1.004008-1_all.deb ... 171s Unpacking libjson-maybexs-perl (1.004008-1) ... 171s Selecting previously unselected package liblist-compare-perl. 171s Preparing to unpack .../223-liblist-compare-perl_0.55-2_all.deb ... 171s Unpacking liblist-compare-perl (0.55-2) ... 171s Selecting previously unselected package liblist-someutils-perl. 171s Preparing to unpack .../224-liblist-someutils-perl_0.59-1_all.deb ... 171s Unpacking liblist-someutils-perl (0.59-1) ... 171s Selecting previously unselected package liblist-utilsby-perl. 171s Preparing to unpack .../225-liblist-utilsby-perl_0.12-2_all.deb ... 171s Unpacking liblist-utilsby-perl (0.12-2) ... 171s Selecting previously unselected package libmldbm-perl. 171s Preparing to unpack .../226-libmldbm-perl_2.05-4_all.deb ... 171s Unpacking libmldbm-perl (2.05-4) ... 171s Selecting previously unselected package libclass-method-modifiers-perl. 171s Preparing to unpack .../227-libclass-method-modifiers-perl_2.15-1_all.deb ... 171s Unpacking libclass-method-modifiers-perl (2.15-1) ... 171s Selecting previously unselected package libimport-into-perl. 171s Preparing to unpack .../228-libimport-into-perl_1.002005-2_all.deb ... 171s Unpacking libimport-into-perl (1.002005-2) ... 171s Selecting previously unselected package librole-tiny-perl. 171s Preparing to unpack .../229-librole-tiny-perl_2.002004-1_all.deb ... 171s Unpacking librole-tiny-perl (2.002004-1) ... 171s Selecting previously unselected package libsub-quote-perl. 171s Preparing to unpack .../230-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 171s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 171s Selecting previously unselected package libmoo-perl. 171s Preparing to unpack .../231-libmoo-perl_2.005005-1_all.deb ... 171s Unpacking libmoo-perl (2.005005-1) ... 171s Selecting previously unselected package libstrictures-perl. 171s Preparing to unpack .../232-libstrictures-perl_2.000006-1_all.deb ... 171s Unpacking libstrictures-perl (2.000006-1) ... 171s Selecting previously unselected package libmoox-aliases-perl. 171s Preparing to unpack .../233-libmoox-aliases-perl_0.001006-2_all.deb ... 171s Unpacking libmoox-aliases-perl (0.001006-2) ... 171s Selecting previously unselected package libperlio-gzip-perl. 171s Preparing to unpack .../234-libperlio-gzip-perl_0.20-1build5_s390x.deb ... 171s Unpacking libperlio-gzip-perl (0.20-1build5) ... 171s Selecting previously unselected package libperlio-utf8-strict-perl. 171s Preparing to unpack .../235-libperlio-utf8-strict-perl_0.010-1build4_s390x.deb ... 171s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 171s Selecting previously unselected package libproc-processtable-perl:s390x. 171s Preparing to unpack .../236-libproc-processtable-perl_0.636-1build4_s390x.deb ... 171s Unpacking libproc-processtable-perl:s390x (0.636-1build4) ... 171s Selecting previously unselected package libregexp-wildcards-perl. 171s Preparing to unpack .../237-libregexp-wildcards-perl_1.05-3_all.deb ... 171s Unpacking libregexp-wildcards-perl (1.05-3) ... 171s Selecting previously unselected package libsereal-decoder-perl. 171s Preparing to unpack .../238-libsereal-decoder-perl_5.004+ds-1build4_s390x.deb ... 171s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 171s Selecting previously unselected package libsereal-encoder-perl. 171s Preparing to unpack .../239-libsereal-encoder-perl_5.004+ds-1build4_s390x.deb ... 171s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 171s Selecting previously unselected package libterm-readkey-perl. 171s Preparing to unpack .../240-libterm-readkey-perl_2.38-2build5_s390x.deb ... 171s Unpacking libterm-readkey-perl (2.38-2build5) ... 171s Selecting previously unselected package libtext-levenshteinxs-perl. 171s Preparing to unpack .../241-libtext-levenshteinxs-perl_0.03-5build5_s390x.deb ... 171s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 171s Selecting previously unselected package libmarkdown2:s390x. 171s Preparing to unpack .../242-libmarkdown2_2.2.7-2ubuntu1_s390x.deb ... 171s Unpacking libmarkdown2:s390x (2.2.7-2ubuntu1) ... 171s Selecting previously unselected package libtext-markdown-discount-perl. 171s Preparing to unpack .../243-libtext-markdown-discount-perl_0.18-1_s390x.deb ... 171s Unpacking libtext-markdown-discount-perl (0.18-1) ... 171s Selecting previously unselected package libdata-messagepack-perl. 171s Preparing to unpack .../244-libdata-messagepack-perl_1.02-1build5_s390x.deb ... 171s Unpacking libdata-messagepack-perl (1.02-1build5) ... 171s Selecting previously unselected package libtext-xslate-perl:s390x. 171s Preparing to unpack .../245-libtext-xslate-perl_3.5.9-2build1_s390x.deb ... 171s Unpacking libtext-xslate-perl:s390x (3.5.9-2build1) ... 171s Selecting previously unselected package libtime-duration-perl. 171s Preparing to unpack .../246-libtime-duration-perl_1.21-2_all.deb ... 171s Unpacking libtime-duration-perl (1.21-2) ... 171s Selecting previously unselected package libtime-moment-perl. 171s Preparing to unpack .../247-libtime-moment-perl_0.44-2build5_s390x.deb ... 171s Unpacking libtime-moment-perl (0.44-2build5) ... 171s Selecting previously unselected package libunicode-utf8-perl. 171s Preparing to unpack .../248-libunicode-utf8-perl_0.62-2build4_s390x.deb ... 171s Unpacking libunicode-utf8-perl (0.62-2build4) ... 171s Selecting previously unselected package libcgi-pm-perl. 171s Preparing to unpack .../249-libcgi-pm-perl_4.67-1_all.deb ... 171s Unpacking libcgi-pm-perl (4.67-1) ... 171s Selecting previously unselected package libhtml-form-perl. 171s Preparing to unpack .../250-libhtml-form-perl_6.12-1_all.deb ... 171s Unpacking libhtml-form-perl (6.12-1) ... 171s Selecting previously unselected package libwww-mechanize-perl. 171s Preparing to unpack .../251-libwww-mechanize-perl_2.18-1ubuntu1_all.deb ... 171s Unpacking libwww-mechanize-perl (2.18-1ubuntu1) ... 171s Selecting previously unselected package libxml-namespacesupport-perl. 171s Preparing to unpack .../252-libxml-namespacesupport-perl_1.12-2_all.deb ... 171s Unpacking libxml-namespacesupport-perl (1.12-2) ... 171s Selecting previously unselected package libxml-sax-base-perl. 171s Preparing to unpack .../253-libxml-sax-base-perl_1.09-3_all.deb ... 171s Unpacking libxml-sax-base-perl (1.09-3) ... 171s Selecting previously unselected package libxml-sax-perl. 171s Preparing to unpack .../254-libxml-sax-perl_1.02+dfsg-4_all.deb ... 171s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 171s Selecting previously unselected package libxml-libxml-perl. 171s Preparing to unpack .../255-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_s390x.deb ... 171s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 171s Selecting previously unselected package lzip. 171s Preparing to unpack .../256-lzip_1.25-1_s390x.deb ... 171s Unpacking lzip (1.25-1) ... 171s Selecting previously unselected package lzop. 171s Preparing to unpack .../257-lzop_1.04-2build3_s390x.deb ... 171s Unpacking lzop (1.04-2build3) ... 171s Selecting previously unselected package patchutils. 171s Preparing to unpack .../258-patchutils_0.4.2-1build3_s390x.deb ... 171s Unpacking patchutils (0.4.2-1build3) ... 171s Selecting previously unselected package t1utils. 171s Preparing to unpack .../259-t1utils_1.41-4build3_s390x.deb ... 171s Unpacking t1utils (1.41-4build3) ... 171s Selecting previously unselected package unzip. 171s Preparing to unpack .../260-unzip_6.0-28ubuntu6_s390x.deb ... 171s Unpacking unzip (6.0-28ubuntu6) ... 171s Selecting previously unselected package lintian. 171s Preparing to unpack .../261-lintian_2.121.1ubuntu1_all.deb ... 171s Unpacking lintian (2.121.1ubuntu1) ... 172s Selecting previously unselected package libconfig-model-dpkg-perl. 172s Preparing to unpack .../262-libconfig-model-dpkg-perl_3.010_all.deb ... 172s Unpacking libconfig-model-dpkg-perl (3.010) ... 172s Selecting previously unselected package libconvert-binhex-perl. 172s Preparing to unpack .../263-libconvert-binhex-perl_1.125-3_all.deb ... 172s Unpacking libconvert-binhex-perl (1.125-3) ... 172s Selecting previously unselected package libnet-smtp-ssl-perl. 172s Preparing to unpack .../264-libnet-smtp-ssl-perl_1.04-2_all.deb ... 172s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 172s Selecting previously unselected package libmailtools-perl. 172s Preparing to unpack .../265-libmailtools-perl_2.22-1_all.deb ... 172s Unpacking libmailtools-perl (2.22-1) ... 172s Selecting previously unselected package libmime-tools-perl. 172s Preparing to unpack .../266-libmime-tools-perl_5.515-1_all.deb ... 172s Unpacking libmime-tools-perl (5.515-1) ... 172s Selecting previously unselected package libsuitesparseconfig7:s390x. 172s Preparing to unpack .../267-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libsuitesparseconfig7:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libamd3:s390x. 172s Preparing to unpack .../268-libamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libamd3:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libblas3:s390x. 172s Preparing to unpack .../269-libblas3_3.12.1-2_s390x.deb ... 172s Unpacking libblas3:s390x (3.12.1-2) ... 172s Selecting previously unselected package libgfortran5:s390x. 172s Preparing to unpack .../270-libgfortran5_14.2.0-17ubuntu1_s390x.deb ... 172s Unpacking libgfortran5:s390x (14.2.0-17ubuntu1) ... 172s Selecting previously unselected package liblapack3:s390x. 172s Preparing to unpack .../271-liblapack3_3.12.1-2_s390x.deb ... 172s Unpacking liblapack3:s390x (3.12.1-2) ... 172s Selecting previously unselected package libarpack2t64:s390x. 172s Preparing to unpack .../272-libarpack2t64_3.9.1-4_s390x.deb ... 172s Unpacking libarpack2t64:s390x (3.9.1-4) ... 172s Selecting previously unselected package libccolamd3:s390x. 172s Preparing to unpack .../273-libccolamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libccolamd3:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libcamd3:s390x. 172s Preparing to unpack .../274-libcamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libcamd3:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libcolamd3:s390x. 172s Preparing to unpack .../275-libcolamd3_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libcolamd3:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libcholmod5:s390x. 172s Preparing to unpack .../276-libcholmod5_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libcholmod5:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libcxsparse4:s390x. 172s Preparing to unpack .../277-libcxsparse4_1%3a7.8.3+dfsg-3_s390x.deb ... 172s Unpacking libcxsparse4:s390x (1:7.8.3+dfsg-3) ... 172s Selecting previously unselected package libfftw3-double3:s390x. 172s Preparing to unpack .../278-libfftw3-double3_3.3.10-2fakesync1build1_s390x.deb ... 172s Unpacking libfftw3-double3:s390x (3.3.10-2fakesync1build1) ... 172s Selecting previously unselected package libfftw3-single3:s390x. 172s Preparing to unpack .../279-libfftw3-single3_3.3.10-2fakesync1build1_s390x.deb ... 172s Unpacking libfftw3-single3:s390x (3.3.10-2fakesync1build1) ... 172s Selecting previously unselected package libxfixes3:s390x. 172s Preparing to unpack .../280-libxfixes3_1%3a6.0.0-2build1_s390x.deb ... 172s Unpacking libxfixes3:s390x (1:6.0.0-2build1) ... 172s Selecting previously unselected package libxcursor1:s390x. 172s Preparing to unpack .../281-libxcursor1_1%3a1.2.3-1_s390x.deb ... 172s Unpacking libxcursor1:s390x (1:1.2.3-1) ... 172s Selecting previously unselected package libxft2:s390x. 172s Preparing to unpack .../282-libxft2_2.3.6-1build1_s390x.deb ... 172s Unpacking libxft2:s390x (2.3.6-1build1) ... 172s Selecting previously unselected package libxinerama1:s390x. 172s Preparing to unpack .../283-libxinerama1_2%3a1.1.4-3build1_s390x.deb ... 172s Unpacking libxinerama1:s390x (2:1.1.4-3build1) ... 172s Selecting previously unselected package libfltk1.3t64:s390x. 172s Preparing to unpack .../284-libfltk1.3t64_1.3.8-6.1build2_s390x.deb ... 172s Unpacking libfltk1.3t64:s390x (1.3.8-6.1build2) ... 172s Selecting previously unselected package libglvnd0:s390x. 172s Preparing to unpack .../285-libglvnd0_1.7.0-1build1_s390x.deb ... 172s Unpacking libglvnd0:s390x (1.7.0-1build1) ... 172s Selecting previously unselected package libglapi-mesa:s390x. 172s Preparing to unpack .../286-libglapi-mesa_24.3.4-3ubuntu1_s390x.deb ... 172s Unpacking libglapi-mesa:s390x (24.3.4-3ubuntu1) ... 172s Selecting previously unselected package libx11-xcb1:s390x. 172s Preparing to unpack .../287-libx11-xcb1_2%3a1.8.10-2_s390x.deb ... 172s Unpacking libx11-xcb1:s390x (2:1.8.10-2) ... 172s Selecting previously unselected package libxcb-dri3-0:s390x. 172s Preparing to unpack .../288-libxcb-dri3-0_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-dri3-0:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxcb-glx0:s390x. 172s Preparing to unpack .../289-libxcb-glx0_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-glx0:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxcb-present0:s390x. 172s Preparing to unpack .../290-libxcb-present0_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-present0:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxcb-xfixes0:s390x. 172s Preparing to unpack .../291-libxcb-xfixes0_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-xfixes0:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxxf86vm1:s390x. 172s Preparing to unpack .../292-libxxf86vm1_1%3a1.1.4-1build4_s390x.deb ... 172s Unpacking libxxf86vm1:s390x (1:1.1.4-1build4) ... 172s Selecting previously unselected package libdrm-radeon1:s390x. 172s Preparing to unpack .../293-libdrm-radeon1_2.4.123-1_s390x.deb ... 172s Unpacking libdrm-radeon1:s390x (2.4.123-1) ... 172s Selecting previously unselected package libxcb-randr0:s390x. 172s Preparing to unpack .../294-libxcb-randr0_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-randr0:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxcb-sync1:s390x. 172s Preparing to unpack .../295-libxcb-sync1_1.17.0-2_s390x.deb ... 172s Unpacking libxcb-sync1:s390x (1.17.0-2) ... 172s Selecting previously unselected package libxshmfence1:s390x. 172s Preparing to unpack .../296-libxshmfence1_1.3-1build5_s390x.deb ... 172s Unpacking libxshmfence1:s390x (1.3-1build5) ... 172s Selecting previously unselected package mesa-libgallium:s390x. 172s Preparing to unpack .../297-mesa-libgallium_24.3.4-3ubuntu1_s390x.deb ... 172s Unpacking mesa-libgallium:s390x (24.3.4-3ubuntu1) ... 172s Selecting previously unselected package libwayland-server0:s390x. 172s Preparing to unpack .../298-libwayland-server0_1.23.1-1_s390x.deb ... 172s Unpacking libwayland-server0:s390x (1.23.1-1) ... 172s Selecting previously unselected package libgbm1:s390x. 172s Preparing to unpack .../299-libgbm1_24.3.4-3ubuntu1_s390x.deb ... 172s Unpacking libgbm1:s390x (24.3.4-3ubuntu1) ... 172s Selecting previously unselected package libvulkan1:s390x. 172s Preparing to unpack .../300-libvulkan1_1.4.304.0-1_s390x.deb ... 172s Unpacking libvulkan1:s390x (1.4.304.0-1) ... 172s Selecting previously unselected package libgl1-mesa-dri:s390x. 172s Preparing to unpack .../301-libgl1-mesa-dri_24.3.4-3ubuntu1_s390x.deb ... 172s Unpacking libgl1-mesa-dri:s390x (24.3.4-3ubuntu1) ... 172s Selecting previously unselected package libglx-mesa0:s390x. 172s Preparing to unpack .../302-libglx-mesa0_24.3.4-3ubuntu1_s390x.deb ... 172s Unpacking libglx-mesa0:s390x (24.3.4-3ubuntu1) ... 172s Selecting previously unselected package libglx0:s390x. 172s Preparing to unpack .../303-libglx0_1.7.0-1build1_s390x.deb ... 172s Unpacking libglx0:s390x (1.7.0-1build1) ... 172s Selecting previously unselected package libgl1:s390x. 172s Preparing to unpack .../304-libgl1_1.7.0-1build1_s390x.deb ... 172s Unpacking libgl1:s390x (1.7.0-1build1) ... 172s Selecting previously unselected package libfltk-gl1.3t64:s390x. 172s Preparing to unpack .../305-libfltk-gl1.3t64_1.3.8-6.1build2_s390x.deb ... 172s Unpacking libfltk-gl1.3t64:s390x (1.3.8-6.1build2) ... 172s Selecting previously unselected package libgl2ps1.4. 172s Preparing to unpack .../306-libgl2ps1.4_1.4.2+dfsg1-2build1_s390x.deb ... 172s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 172s Selecting previously unselected package libltdl7:s390x. 172s Preparing to unpack .../307-libltdl7_2.5.4-3build1_s390x.deb ... 172s Unpacking libltdl7:s390x (2.5.4-3build1) ... 172s Selecting previously unselected package libglpk40:s390x. 172s Preparing to unpack .../308-libglpk40_5.0-1build2_s390x.deb ... 172s Unpacking libglpk40:s390x (5.0-1build2) ... 172s Selecting previously unselected package libopengl0:s390x. 172s Preparing to unpack .../309-libopengl0_1.7.0-1build1_s390x.deb ... 172s Unpacking libopengl0:s390x (1.7.0-1build1) ... 172s Selecting previously unselected package libglu1-mesa:s390x. 172s Preparing to unpack .../310-libglu1-mesa_9.0.2-1.1build1_s390x.deb ... 172s Unpacking libglu1-mesa:s390x (9.0.2-1.1build1) ... 172s Selecting previously unselected package liblcms2-2:s390x. 172s Preparing to unpack .../311-liblcms2-2_2.16-2_s390x.deb ... 172s Unpacking liblcms2-2:s390x (2.16-2) ... 172s Selecting previously unselected package libjxl0.11:s390x. 172s Preparing to unpack .../312-libjxl0.11_0.11.1-1_s390x.deb ... 172s Unpacking libjxl0.11:s390x (0.11.1-1) ... 172s Selecting previously unselected package libwmflite-0.2-7:s390x. 172s Preparing to unpack .../313-libwmflite-0.2-7_0.2.13-1.1build3_s390x.deb ... 172s Unpacking libwmflite-0.2-7:s390x (0.2.13-1.1build3) ... 172s Selecting previously unselected package libgraphicsmagick-q16-3t64. 172s Preparing to unpack .../314-libgraphicsmagick-q16-3t64_1.4+really1.3.45-1build2_s390x.deb ... 172s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 173s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 173s Preparing to unpack .../315-libgraphicsmagick++-q16-12t64_1.4+really1.3.45-1build2_s390x.deb ... 173s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 173s Selecting previously unselected package libaec0:s390x. 173s Preparing to unpack .../316-libaec0_1.1.3-1_s390x.deb ... 173s Unpacking libaec0:s390x (1.1.3-1) ... 173s Selecting previously unselected package libsz2:s390x. 173s Preparing to unpack .../317-libsz2_1.1.3-1_s390x.deb ... 173s Unpacking libsz2:s390x (1.1.3-1) ... 173s Selecting previously unselected package libhdf5-310:s390x. 173s Preparing to unpack .../318-libhdf5-310_1.14.5+repack-3_s390x.deb ... 173s Unpacking libhdf5-310:s390x (1.14.5+repack-3) ... 173s Selecting previously unselected package libasound2-data. 173s Preparing to unpack .../319-libasound2-data_1.2.13-1build1_all.deb ... 173s Unpacking libasound2-data (1.2.13-1build1) ... 173s Selecting previously unselected package libasound2t64:s390x. 173s Preparing to unpack .../320-libasound2t64_1.2.13-1build1_s390x.deb ... 173s Unpacking libasound2t64:s390x (1.2.13-1build1) ... 173s Selecting previously unselected package libopus0:s390x. 173s Preparing to unpack .../321-libopus0_1.5.2-2_s390x.deb ... 173s Unpacking libopus0:s390x (1.5.2-2) ... 173s Selecting previously unselected package libsamplerate0:s390x. 173s Preparing to unpack .../322-libsamplerate0_0.2.2-4build1_s390x.deb ... 173s Unpacking libsamplerate0:s390x (0.2.2-4build1) ... 173s Selecting previously unselected package libjack-jackd2-0:s390x. 173s Preparing to unpack .../323-libjack-jackd2-0_1.9.22~dfsg-4_s390x.deb ... 173s Unpacking libjack-jackd2-0:s390x (1.9.22~dfsg-4) ... 173s Selecting previously unselected package libportaudio2:s390x. 173s Preparing to unpack .../324-libportaudio2_19.6.0-1.2build3_s390x.deb ... 173s Unpacking libportaudio2:s390x (19.6.0-1.2build3) ... 173s Selecting previously unselected package libqhull-r8.0:s390x. 173s Preparing to unpack .../325-libqhull-r8.0_2020.2-6build1_s390x.deb ... 173s Unpacking libqhull-r8.0:s390x (2020.2-6build1) ... 173s Selecting previously unselected package libqrupdate1:s390x. 173s Preparing to unpack .../326-libqrupdate1_1.1.5-1_s390x.deb ... 173s Unpacking libqrupdate1:s390x (1.1.5-1) ... 173s Selecting previously unselected package libqscintilla2-qt6-l10n. 173s Preparing to unpack .../327-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 173s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 173s Selecting previously unselected package libb2-1:s390x. 173s Preparing to unpack .../328-libb2-1_0.98.1-1.1build1_s390x.deb ... 173s Unpacking libb2-1:s390x (0.98.1-1.1build1) ... 173s Selecting previously unselected package libdouble-conversion3:s390x. 173s Preparing to unpack .../329-libdouble-conversion3_3.3.0-1build1_s390x.deb ... 173s Unpacking libdouble-conversion3:s390x (3.3.0-1build1) ... 173s Selecting previously unselected package libpcre2-16-0:s390x. 173s Preparing to unpack .../330-libpcre2-16-0_10.42-4ubuntu3_s390x.deb ... 173s Unpacking libpcre2-16-0:s390x (10.42-4ubuntu3) ... 173s Selecting previously unselected package libqt6core6t64:s390x. 173s Preparing to unpack .../331-libqt6core6t64_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6core6t64:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libwayland-client0:s390x. 173s Preparing to unpack .../332-libwayland-client0_1.23.1-1_s390x.deb ... 173s Unpacking libwayland-client0:s390x (1.23.1-1) ... 173s Selecting previously unselected package libegl-mesa0:s390x. 173s Preparing to unpack .../333-libegl-mesa0_24.3.4-3ubuntu1_s390x.deb ... 173s Unpacking libegl-mesa0:s390x (24.3.4-3ubuntu1) ... 173s Selecting previously unselected package libegl1:s390x. 173s Preparing to unpack .../334-libegl1_1.7.0-1build1_s390x.deb ... 173s Unpacking libegl1:s390x (1.7.0-1build1) ... 173s Selecting previously unselected package x11-common. 173s Preparing to unpack .../335-x11-common_1%3a7.7+23ubuntu3_all.deb ... 173s Unpacking x11-common (1:7.7+23ubuntu3) ... 173s Selecting previously unselected package libice6:s390x. 173s Preparing to unpack .../336-libice6_2%3a1.1.1-1_s390x.deb ... 173s Unpacking libice6:s390x (2:1.1.1-1) ... 173s Selecting previously unselected package libmtdev1t64:s390x. 173s Preparing to unpack .../337-libmtdev1t64_1.1.7-1_s390x.deb ... 173s Unpacking libmtdev1t64:s390x (1.1.7-1) ... 173s Selecting previously unselected package libwacom-common. 173s Preparing to unpack .../338-libwacom-common_2.14.0-1_all.deb ... 173s Unpacking libwacom-common (2.14.0-1) ... 173s Selecting previously unselected package libwacom9:s390x. 173s Preparing to unpack .../339-libwacom9_2.14.0-1_s390x.deb ... 173s Unpacking libwacom9:s390x (2.14.0-1) ... 173s Selecting previously unselected package libinput-bin. 173s Preparing to unpack .../340-libinput-bin_1.27.1-1_s390x.deb ... 173s Unpacking libinput-bin (1.27.1-1) ... 173s Selecting previously unselected package libinput10:s390x. 173s Preparing to unpack .../341-libinput10_1.27.1-1_s390x.deb ... 173s Unpacking libinput10:s390x (1.27.1-1) ... 173s Selecting previously unselected package libmd4c0:s390x. 173s Preparing to unpack .../342-libmd4c0_0.5.2-2_s390x.deb ... 173s Unpacking libmd4c0:s390x (0.5.2-2) ... 173s Selecting previously unselected package libqt6dbus6:s390x. 173s Preparing to unpack .../343-libqt6dbus6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6dbus6:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libsm6:s390x. 173s Preparing to unpack .../344-libsm6_2%3a1.2.4-1_s390x.deb ... 173s Unpacking libsm6:s390x (2:1.2.4-1) ... 173s Selecting previously unselected package libts0t64:s390x. 173s Preparing to unpack .../345-libts0t64_1.22-1.1build1_s390x.deb ... 173s Unpacking libts0t64:s390x (1.22-1.1build1) ... 173s Selecting previously unselected package libxcb-util1:s390x. 173s Preparing to unpack .../346-libxcb-util1_0.4.1-1_s390x.deb ... 173s Unpacking libxcb-util1:s390x (0.4.1-1) ... 173s Selecting previously unselected package libxcb-image0:s390x. 173s Preparing to unpack .../347-libxcb-image0_0.4.0-2build1_s390x.deb ... 173s Unpacking libxcb-image0:s390x (0.4.0-2build1) ... 173s Selecting previously unselected package libxcb-render-util0:s390x. 173s Preparing to unpack .../348-libxcb-render-util0_0.3.10-1_s390x.deb ... 173s Unpacking libxcb-render-util0:s390x (0.3.10-1) ... 173s Selecting previously unselected package libxcb-cursor0:s390x. 173s Preparing to unpack .../349-libxcb-cursor0_0.1.5-1_s390x.deb ... 173s Unpacking libxcb-cursor0:s390x (0.1.5-1) ... 173s Selecting previously unselected package libxcb-icccm4:s390x. 173s Preparing to unpack .../350-libxcb-icccm4_0.4.2-1_s390x.deb ... 173s Unpacking libxcb-icccm4:s390x (0.4.2-1) ... 173s Selecting previously unselected package libxcb-keysyms1:s390x. 173s Preparing to unpack .../351-libxcb-keysyms1_0.4.1-1_s390x.deb ... 173s Unpacking libxcb-keysyms1:s390x (0.4.1-1) ... 173s Selecting previously unselected package libxcb-shape0:s390x. 173s Preparing to unpack .../352-libxcb-shape0_1.17.0-2_s390x.deb ... 173s Unpacking libxcb-shape0:s390x (1.17.0-2) ... 173s Selecting previously unselected package libxcb-xinput0:s390x. 173s Preparing to unpack .../353-libxcb-xinput0_1.17.0-2_s390x.deb ... 173s Unpacking libxcb-xinput0:s390x (1.17.0-2) ... 173s Selecting previously unselected package libxcb-xkb1:s390x. 173s Preparing to unpack .../354-libxcb-xkb1_1.17.0-2_s390x.deb ... 173s Unpacking libxcb-xkb1:s390x (1.17.0-2) ... 173s Selecting previously unselected package libxkbcommon-x11-0:s390x. 173s Preparing to unpack .../355-libxkbcommon-x11-0_1.7.0-2_s390x.deb ... 173s Unpacking libxkbcommon-x11-0:s390x (1.7.0-2) ... 173s Selecting previously unselected package libqt6gui6:s390x. 173s Preparing to unpack .../356-libqt6gui6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6gui6:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libavahi-common-data:s390x. 173s Preparing to unpack .../357-libavahi-common-data_0.8-14ubuntu1_s390x.deb ... 173s Unpacking libavahi-common-data:s390x (0.8-14ubuntu1) ... 173s Selecting previously unselected package libavahi-common3:s390x. 173s Preparing to unpack .../358-libavahi-common3_0.8-14ubuntu1_s390x.deb ... 173s Unpacking libavahi-common3:s390x (0.8-14ubuntu1) ... 173s Selecting previously unselected package libavahi-client3:s390x. 173s Preparing to unpack .../359-libavahi-client3_0.8-14ubuntu1_s390x.deb ... 173s Unpacking libavahi-client3:s390x (0.8-14ubuntu1) ... 173s Selecting previously unselected package libcups2t64:s390x. 173s Preparing to unpack .../360-libcups2t64_2.4.11-0ubuntu2_s390x.deb ... 173s Unpacking libcups2t64:s390x (2.4.11-0ubuntu2) ... 173s Selecting previously unselected package libqt6widgets6:s390x. 173s Preparing to unpack .../361-libqt6widgets6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6widgets6:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libqt6printsupport6:s390x. 173s Preparing to unpack .../362-libqt6printsupport6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6printsupport6:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libqscintilla2-qt6-15:s390x. 173s Preparing to unpack .../363-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_s390x.deb ... 173s Unpacking libqscintilla2-qt6-15:s390x (2.14.1+dfsg-1build4) ... 173s Selecting previously unselected package libqt6core5compat6:s390x. 173s Preparing to unpack .../364-libqt6core5compat6_6.8.1-0ubuntu2_s390x.deb ... 173s Unpacking libqt6core5compat6:s390x (6.8.1-0ubuntu2) ... 173s Selecting previously unselected package libqt6sql6:s390x. 173s Preparing to unpack .../365-libqt6sql6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6sql6:s390x (6.8.1+dfsg-0ubuntu4) ... 173s Selecting previously unselected package libqt6help6:s390x. 173s Preparing to unpack .../366-libqt6help6_6.8.1-0ubuntu1_s390x.deb ... 173s Unpacking libqt6help6:s390x (6.8.1-0ubuntu1) ... 173s Selecting previously unselected package libduktape207:s390x. 173s Preparing to unpack .../367-libduktape207_2.7.0+tests-0ubuntu3_s390x.deb ... 173s Unpacking libduktape207:s390x (2.7.0+tests-0ubuntu3) ... 173s Selecting previously unselected package libproxy1v5:s390x. 173s Preparing to unpack .../368-libproxy1v5_0.5.9-1_s390x.deb ... 173s Unpacking libproxy1v5:s390x (0.5.9-1) ... 173s Selecting previously unselected package libqt6network6:s390x. 173s Preparing to unpack .../369-libqt6network6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 173s Unpacking libqt6network6:s390x (6.8.1+dfsg-0ubuntu4) ... 174s Selecting previously unselected package libqt6opengl6:s390x. 174s Preparing to unpack .../370-libqt6opengl6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 174s Unpacking libqt6opengl6:s390x (6.8.1+dfsg-0ubuntu4) ... 174s Selecting previously unselected package libqt6openglwidgets6:s390x. 174s Preparing to unpack .../371-libqt6openglwidgets6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 174s Unpacking libqt6openglwidgets6:s390x (6.8.1+dfsg-0ubuntu4) ... 174s Selecting previously unselected package libqt6xml6:s390x. 174s Preparing to unpack .../372-libqt6xml6_6.8.1+dfsg-0ubuntu4_s390x.deb ... 174s Unpacking libqt6xml6:s390x (6.8.1+dfsg-0ubuntu4) ... 174s Selecting previously unselected package libogg0:s390x. 174s Preparing to unpack .../373-libogg0_1.3.5-3build1_s390x.deb ... 174s Unpacking libogg0:s390x (1.3.5-3build1) ... 174s Selecting previously unselected package libflac12t64:s390x. 174s Preparing to unpack .../374-libflac12t64_1.4.3+ds-4_s390x.deb ... 174s Unpacking libflac12t64:s390x (1.4.3+ds-4) ... 174s Selecting previously unselected package libmp3lame0:s390x. 174s Preparing to unpack .../375-libmp3lame0_3.100-6build1_s390x.deb ... 174s Unpacking libmp3lame0:s390x (3.100-6build1) ... 174s Selecting previously unselected package libmpg123-0t64:s390x. 174s Preparing to unpack .../376-libmpg123-0t64_1.32.10-1_s390x.deb ... 174s Unpacking libmpg123-0t64:s390x (1.32.10-1) ... 174s Selecting previously unselected package libvorbis0a:s390x. 174s Preparing to unpack .../377-libvorbis0a_1.3.7-2_s390x.deb ... 174s Unpacking libvorbis0a:s390x (1.3.7-2) ... 174s Selecting previously unselected package libvorbisenc2:s390x. 174s Preparing to unpack .../378-libvorbisenc2_1.3.7-2_s390x.deb ... 174s Unpacking libvorbisenc2:s390x (1.3.7-2) ... 174s Selecting previously unselected package libsndfile1:s390x. 174s Preparing to unpack .../379-libsndfile1_1.2.2-2_s390x.deb ... 174s Unpacking libsndfile1:s390x (1.2.2-2) ... 174s Selecting previously unselected package libspqr4:s390x. 174s Preparing to unpack .../380-libspqr4_1%3a7.8.3+dfsg-3_s390x.deb ... 174s Unpacking libspqr4:s390x (1:7.8.3+dfsg-3) ... 174s Selecting previously unselected package libumfpack6:s390x. 174s Preparing to unpack .../381-libumfpack6_1%3a7.8.3+dfsg-3_s390x.deb ... 174s Unpacking libumfpack6:s390x (1:7.8.3+dfsg-3) ... 174s Selecting previously unselected package libtext-unidecode-perl. 174s Preparing to unpack .../382-libtext-unidecode-perl_1.30-3_all.deb ... 174s Unpacking libtext-unidecode-perl (1.30-3) ... 174s Selecting previously unselected package texinfo-lib. 174s Preparing to unpack .../383-texinfo-lib_7.1.1-1_s390x.deb ... 174s Unpacking texinfo-lib (7.1.1-1) ... 174s Selecting previously unselected package tex-common. 174s Preparing to unpack .../384-tex-common_6.18_all.deb ... 174s Unpacking tex-common (6.18) ... 174s Selecting previously unselected package texinfo. 174s Preparing to unpack .../385-texinfo_7.1.1-1_all.deb ... 174s Unpacking texinfo (7.1.1-1) ... 174s Selecting previously unselected package octave-common. 174s Preparing to unpack .../386-octave-common_9.4.0-1_all.deb ... 174s Unpacking octave-common (9.4.0-1) ... 174s Selecting previously unselected package octave. 174s Preparing to unpack .../387-octave_9.4.0-1_s390x.deb ... 174s Unpacking octave (9.4.0-1) ... 174s Selecting previously unselected package libncurses-dev:s390x. 174s Preparing to unpack .../388-libncurses-dev_6.5+20250125-2_s390x.deb ... 174s Unpacking libncurses-dev:s390x (6.5+20250125-2) ... 174s Selecting previously unselected package libreadline-dev:s390x. 174s Preparing to unpack .../389-libreadline-dev_8.2-6_s390x.deb ... 174s Unpacking libreadline-dev:s390x (8.2-6) ... 174s Selecting previously unselected package libhdf5-fortran-310:s390x. 174s Preparing to unpack .../390-libhdf5-fortran-310_1.14.5+repack-3_s390x.deb ... 174s Unpacking libhdf5-fortran-310:s390x (1.14.5+repack-3) ... 174s Selecting previously unselected package libhdf5-hl-310:s390x. 174s Preparing to unpack .../391-libhdf5-hl-310_1.14.5+repack-3_s390x.deb ... 174s Unpacking libhdf5-hl-310:s390x (1.14.5+repack-3) ... 174s Selecting previously unselected package libhdf5-hl-fortran-310:s390x. 174s Preparing to unpack .../392-libhdf5-hl-fortran-310_1.14.5+repack-3_s390x.deb ... 174s Unpacking libhdf5-hl-fortran-310:s390x (1.14.5+repack-3) ... 174s Selecting previously unselected package libhdf5-cpp-310:s390x. 174s Preparing to unpack .../393-libhdf5-cpp-310_1.14.5+repack-3_s390x.deb ... 174s Unpacking libhdf5-cpp-310:s390x (1.14.5+repack-3) ... 174s Selecting previously unselected package libhdf5-hl-cpp-310:s390x. 174s Preparing to unpack .../394-libhdf5-hl-cpp-310_1.14.5+repack-3_s390x.deb ... 174s Unpacking libhdf5-hl-cpp-310:s390x (1.14.5+repack-3) ... 174s Selecting previously unselected package zlib1g-dev:s390x. 174s Preparing to unpack .../395-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_s390x.deb ... 174s Unpacking zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 174s Selecting previously unselected package libjpeg-turbo8-dev:s390x. 174s Preparing to unpack .../396-libjpeg-turbo8-dev_2.1.5-3ubuntu2_s390x.deb ... 174s Unpacking libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 174s Selecting previously unselected package libjpeg8-dev:s390x. 174s Preparing to unpack .../397-libjpeg8-dev_8c-2ubuntu11_s390x.deb ... 174s Unpacking libjpeg8-dev:s390x (8c-2ubuntu11) ... 174s Selecting previously unselected package libjpeg-dev:s390x. 174s Preparing to unpack .../398-libjpeg-dev_8c-2ubuntu11_s390x.deb ... 174s Unpacking libjpeg-dev:s390x (8c-2ubuntu11) ... 174s Selecting previously unselected package libaec-dev:s390x. 174s Preparing to unpack .../399-libaec-dev_1.1.3-1_s390x.deb ... 174s Unpacking libaec-dev:s390x (1.1.3-1) ... 174s Selecting previously unselected package libbrotli-dev:s390x. 174s Preparing to unpack .../400-libbrotli-dev_1.1.0-2build3_s390x.deb ... 174s Unpacking libbrotli-dev:s390x (1.1.0-2build3) ... 174s Selecting previously unselected package libidn2-dev:s390x. 174s Preparing to unpack .../401-libidn2-dev_2.3.7-2build2_s390x.deb ... 174s Unpacking libidn2-dev:s390x (2.3.7-2build2) ... 174s Selecting previously unselected package comerr-dev:s390x. 174s Preparing to unpack .../402-comerr-dev_2.1-1.47.2-1ubuntu1_s390x.deb ... 174s Unpacking comerr-dev:s390x (2.1-1.47.2-1ubuntu1) ... 174s Selecting previously unselected package libgssrpc4t64:s390x. 174s Preparing to unpack .../403-libgssrpc4t64_1.21.3-4ubuntu1_s390x.deb ... 174s Unpacking libgssrpc4t64:s390x (1.21.3-4ubuntu1) ... 174s Selecting previously unselected package libkadm5clnt-mit12:s390x. 174s Preparing to unpack .../404-libkadm5clnt-mit12_1.21.3-4ubuntu1_s390x.deb ... 174s Unpacking libkadm5clnt-mit12:s390x (1.21.3-4ubuntu1) ... 174s Selecting previously unselected package libkdb5-10t64:s390x. 174s Preparing to unpack .../405-libkdb5-10t64_1.21.3-4ubuntu1_s390x.deb ... 174s Unpacking libkdb5-10t64:s390x (1.21.3-4ubuntu1) ... 174s Selecting previously unselected package libkadm5srv-mit12:s390x. 174s Preparing to unpack .../406-libkadm5srv-mit12_1.21.3-4ubuntu1_s390x.deb ... 174s Unpacking libkadm5srv-mit12:s390x (1.21.3-4ubuntu1) ... 174s Selecting previously unselected package krb5-multidev:s390x. 174s Preparing to unpack .../407-krb5-multidev_1.21.3-4ubuntu1_s390x.deb ... 174s Unpacking krb5-multidev:s390x (1.21.3-4ubuntu1) ... 175s Selecting previously unselected package libkrb5-dev:s390x. 175s Preparing to unpack .../408-libkrb5-dev_1.21.3-4ubuntu1_s390x.deb ... 175s Unpacking libkrb5-dev:s390x (1.21.3-4ubuntu1) ... 175s Selecting previously unselected package libldap-dev:s390x. 175s Preparing to unpack .../409-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_s390x.deb ... 175s Unpacking libldap-dev:s390x (2.6.9+dfsg-1~exp2ubuntu1) ... 175s Selecting previously unselected package libpkgconf3:s390x. 175s Preparing to unpack .../410-libpkgconf3_1.8.1-4_s390x.deb ... 175s Unpacking libpkgconf3:s390x (1.8.1-4) ... 175s Selecting previously unselected package pkgconf-bin. 175s Preparing to unpack .../411-pkgconf-bin_1.8.1-4_s390x.deb ... 175s Unpacking pkgconf-bin (1.8.1-4) ... 175s Selecting previously unselected package pkgconf:s390x. 175s Preparing to unpack .../412-pkgconf_1.8.1-4_s390x.deb ... 175s Unpacking pkgconf:s390x (1.8.1-4) ... 175s Selecting previously unselected package libnghttp2-dev:s390x. 175s Preparing to unpack .../413-libnghttp2-dev_1.64.0-1_s390x.deb ... 175s Unpacking libnghttp2-dev:s390x (1.64.0-1) ... 175s Selecting previously unselected package libpsl-dev:s390x. 175s Preparing to unpack .../414-libpsl-dev_0.21.2-1.1build1_s390x.deb ... 175s Unpacking libpsl-dev:s390x (0.21.2-1.1build1) ... 175s Selecting previously unselected package libgmpxx4ldbl:s390x. 175s Preparing to unpack .../415-libgmpxx4ldbl_2%3a6.3.0+dfsg-2ubuntu7_s390x.deb ... 175s Unpacking libgmpxx4ldbl:s390x (2:6.3.0+dfsg-2ubuntu7) ... 175s Selecting previously unselected package libgmp-dev:s390x. 175s Preparing to unpack .../416-libgmp-dev_2%3a6.3.0+dfsg-2ubuntu7_s390x.deb ... 175s Unpacking libgmp-dev:s390x (2:6.3.0+dfsg-2ubuntu7) ... 175s Selecting previously unselected package libevent-2.1-7t64:s390x. 175s Preparing to unpack .../417-libevent-2.1-7t64_2.1.12-stable-10_s390x.deb ... 175s Unpacking libevent-2.1-7t64:s390x (2.1.12-stable-10) ... 175s Selecting previously unselected package libunbound8:s390x. 175s Preparing to unpack .../418-libunbound8_1.22.0-1ubuntu1_s390x.deb ... 175s Unpacking libunbound8:s390x (1.22.0-1ubuntu1) ... 175s Selecting previously unselected package libgnutls-dane0t64:s390x. 175s Preparing to unpack .../419-libgnutls-dane0t64_3.8.9-2ubuntu1_s390x.deb ... 175s Unpacking libgnutls-dane0t64:s390x (3.8.9-2ubuntu1) ... 175s Selecting previously unselected package libgnutls-openssl27t64:s390x. 175s Preparing to unpack .../420-libgnutls-openssl27t64_3.8.9-2ubuntu1_s390x.deb ... 175s Unpacking libgnutls-openssl27t64:s390x (3.8.9-2ubuntu1) ... 175s Selecting previously unselected package libp11-kit-dev:s390x. 175s Preparing to unpack .../421-libp11-kit-dev_0.25.5-2ubuntu1_s390x.deb ... 175s Unpacking libp11-kit-dev:s390x (0.25.5-2ubuntu1) ... 175s Selecting previously unselected package libtasn1-6-dev:s390x. 175s Preparing to unpack .../422-libtasn1-6-dev_4.20.0-2_s390x.deb ... 175s Unpacking libtasn1-6-dev:s390x (4.20.0-2) ... 175s Selecting previously unselected package nettle-dev:s390x. 175s Preparing to unpack .../423-nettle-dev_3.10-1_s390x.deb ... 175s Unpacking nettle-dev:s390x (3.10-1) ... 175s Selecting previously unselected package libgnutls28-dev:s390x. 175s Preparing to unpack .../424-libgnutls28-dev_3.8.9-2ubuntu1_s390x.deb ... 175s Unpacking libgnutls28-dev:s390x (3.8.9-2ubuntu1) ... 175s Selecting previously unselected package librtmp-dev:s390x. 175s Preparing to unpack .../425-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_s390x.deb ... 175s Unpacking librtmp-dev:s390x (2.4+20151223.gitfa8646d.1-2build7) ... 175s Selecting previously unselected package libssl-dev:s390x. 175s Preparing to unpack .../426-libssl-dev_3.4.0-1ubuntu2_s390x.deb ... 175s Unpacking libssl-dev:s390x (3.4.0-1ubuntu2) ... 175s Selecting previously unselected package libssh2-1-dev:s390x. 175s Preparing to unpack .../427-libssh2-1-dev_1.11.1-1_s390x.deb ... 175s Unpacking libssh2-1-dev:s390x (1.11.1-1) ... 175s Selecting previously unselected package libzstd-dev:s390x. 175s Preparing to unpack .../428-libzstd-dev_1.5.6+dfsg-2_s390x.deb ... 175s Unpacking libzstd-dev:s390x (1.5.6+dfsg-2) ... 175s Selecting previously unselected package libcurl4-openssl-dev:s390x. 175s Preparing to unpack .../429-libcurl4-openssl-dev_8.12.0+git20250209.89ed161+ds-1ubuntu1_s390x.deb ... 175s Unpacking libcurl4-openssl-dev:s390x (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 175s Selecting previously unselected package hdf5-helpers. 175s Preparing to unpack .../430-hdf5-helpers_1.14.5+repack-3_s390x.deb ... 175s Unpacking hdf5-helpers (1.14.5+repack-3) ... 175s Selecting previously unselected package libhdf5-dev. 175s Preparing to unpack .../431-libhdf5-dev_1.14.5+repack-3_s390x.deb ... 175s Unpacking libhdf5-dev (1.14.5+repack-3) ... 175s Selecting previously unselected package xorg-sgml-doctools. 175s Preparing to unpack .../432-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 175s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 175s Selecting previously unselected package x11proto-dev. 175s Preparing to unpack .../433-x11proto-dev_2024.1-1_all.deb ... 175s Unpacking x11proto-dev (2024.1-1) ... 175s Selecting previously unselected package libxau-dev:s390x. 175s Preparing to unpack .../434-libxau-dev_1%3a1.0.11-1_s390x.deb ... 175s Unpacking libxau-dev:s390x (1:1.0.11-1) ... 175s Selecting previously unselected package libxdmcp-dev:s390x. 175s Preparing to unpack .../435-libxdmcp-dev_1%3a1.1.5-1_s390x.deb ... 175s Unpacking libxdmcp-dev:s390x (1:1.1.5-1) ... 175s Selecting previously unselected package xtrans-dev. 175s Preparing to unpack .../436-xtrans-dev_1.4.0-1_all.deb ... 175s Unpacking xtrans-dev (1.4.0-1) ... 175s Selecting previously unselected package libxcb1-dev:s390x. 175s Preparing to unpack .../437-libxcb1-dev_1.17.0-2_s390x.deb ... 175s Unpacking libxcb1-dev:s390x (1.17.0-2) ... 175s Selecting previously unselected package libx11-dev:s390x. 175s Preparing to unpack .../438-libx11-dev_2%3a1.8.10-2_s390x.deb ... 175s Unpacking libx11-dev:s390x (2:1.8.10-2) ... 175s Selecting previously unselected package libglx-dev:s390x. 175s Preparing to unpack .../439-libglx-dev_1.7.0-1build1_s390x.deb ... 175s Unpacking libglx-dev:s390x (1.7.0-1build1) ... 175s Selecting previously unselected package libgl-dev:s390x. 175s Preparing to unpack .../440-libgl-dev_1.7.0-1build1_s390x.deb ... 175s Unpacking libgl-dev:s390x (1.7.0-1build1) ... 175s Selecting previously unselected package libblas-dev:s390x. 175s Preparing to unpack .../441-libblas-dev_3.12.1-2_s390x.deb ... 175s Unpacking libblas-dev:s390x (3.12.1-2) ... 175s Selecting previously unselected package liblapack-dev:s390x. 175s Preparing to unpack .../442-liblapack-dev_3.12.1-2_s390x.deb ... 175s Unpacking liblapack-dev:s390x (3.12.1-2) ... 175s Selecting previously unselected package libfftw3-long3:s390x. 175s Preparing to unpack .../443-libfftw3-long3_3.3.10-2fakesync1build1_s390x.deb ... 175s Unpacking libfftw3-long3:s390x (3.3.10-2fakesync1build1) ... 175s Selecting previously unselected package libfftw3-bin. 175s Preparing to unpack .../444-libfftw3-bin_3.3.10-2fakesync1build1_s390x.deb ... 175s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 175s Selecting previously unselected package libfftw3-dev:s390x. 175s Preparing to unpack .../445-libfftw3-dev_3.3.10-2fakesync1build1_s390x.deb ... 175s Unpacking libfftw3-dev:s390x (3.3.10-2fakesync1build1) ... 175s Selecting previously unselected package libgfortran-14-dev:s390x. 175s Preparing to unpack .../446-libgfortran-14-dev_14.2.0-17ubuntu1_s390x.deb ... 175s Unpacking libgfortran-14-dev:s390x (14.2.0-17ubuntu1) ... 175s Selecting previously unselected package gfortran-14-s390x-linux-gnu. 175s Preparing to unpack .../447-gfortran-14-s390x-linux-gnu_14.2.0-17ubuntu1_s390x.deb ... 175s Unpacking gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 176s Selecting previously unselected package gfortran-14. 176s Preparing to unpack .../448-gfortran-14_14.2.0-17ubuntu1_s390x.deb ... 176s Unpacking gfortran-14 (14.2.0-17ubuntu1) ... 176s Selecting previously unselected package gfortran-s390x-linux-gnu. 176s Preparing to unpack .../449-gfortran-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 176s Unpacking gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 176s Selecting previously unselected package gfortran. 176s Preparing to unpack .../450-gfortran_4%3a14.2.0-1ubuntu1_s390x.deb ... 176s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 176s Selecting previously unselected package libstdc++-14-dev:s390x. 176s Preparing to unpack .../451-libstdc++-14-dev_14.2.0-17ubuntu1_s390x.deb ... 176s Unpacking libstdc++-14-dev:s390x (14.2.0-17ubuntu1) ... 176s Selecting previously unselected package g++-14-s390x-linux-gnu. 176s Preparing to unpack .../452-g++-14-s390x-linux-gnu_14.2.0-17ubuntu1_s390x.deb ... 176s Unpacking g++-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 176s Selecting previously unselected package g++-14. 176s Preparing to unpack .../453-g++-14_14.2.0-17ubuntu1_s390x.deb ... 176s Unpacking g++-14 (14.2.0-17ubuntu1) ... 176s Selecting previously unselected package g++-s390x-linux-gnu. 176s Preparing to unpack .../454-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 176s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 176s Selecting previously unselected package g++. 176s Preparing to unpack .../455-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 176s Unpacking g++ (4:14.2.0-1ubuntu1) ... 176s Selecting previously unselected package octave-dev. 176s Preparing to unpack .../456-octave-dev_9.4.0-1_s390x.deb ... 176s Unpacking octave-dev (9.4.0-1) ... 176s Selecting previously unselected package dh-octave. 176s Preparing to unpack .../457-dh-octave_1.8.0_all.deb ... 176s Unpacking dh-octave (1.8.0) ... 176s Selecting previously unselected package libfontenc1:s390x. 176s Preparing to unpack .../458-libfontenc1_1%3a1.1.8-1build1_s390x.deb ... 176s Unpacking libfontenc1:s390x (1:1.1.8-1build1) ... 176s Selecting previously unselected package libxt6t64:s390x. 176s Preparing to unpack .../459-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 176s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 176s Selecting previously unselected package libxmu6:s390x. 176s Preparing to unpack .../460-libxmu6_2%3a1.1.3-3build2_s390x.deb ... 176s Unpacking libxmu6:s390x (2:1.1.3-3build2) ... 176s Selecting previously unselected package libxaw7:s390x. 176s Preparing to unpack .../461-libxaw7_2%3a1.0.16-1_s390x.deb ... 176s Unpacking libxaw7:s390x (2:1.0.16-1) ... 176s Selecting previously unselected package libxfont2:s390x. 176s Preparing to unpack .../462-libxfont2_1%3a2.0.6-1build1_s390x.deb ... 176s Unpacking libxfont2:s390x (1:2.0.6-1build1) ... 176s Selecting previously unselected package libxkbfile1:s390x. 176s Preparing to unpack .../463-libxkbfile1_1%3a1.1.0-1build4_s390x.deb ... 176s Unpacking libxkbfile1:s390x (1:1.1.0-1build4) ... 176s Selecting previously unselected package libxrandr2:s390x. 176s Preparing to unpack .../464-libxrandr2_2%3a1.5.4-1_s390x.deb ... 176s Unpacking libxrandr2:s390x (2:1.5.4-1) ... 176s Selecting previously unselected package octave-io. 176s Preparing to unpack .../465-octave-io_2.6.4-3build2_s390x.deb ... 176s Unpacking octave-io (2.6.4-3build2) ... 176s Selecting previously unselected package octave-statistics-common. 176s Preparing to unpack .../466-octave-statistics-common_1.7.2-1_all.deb ... 176s Unpacking octave-statistics-common (1.7.2-1) ... 176s Selecting previously unselected package octave-statistics. 176s Preparing to unpack .../467-octave-statistics_1.7.2-1_s390x.deb ... 176s Unpacking octave-statistics (1.7.2-1) ... 176s Selecting previously unselected package x11-xkb-utils. 176s Preparing to unpack .../468-x11-xkb-utils_7.7+9_s390x.deb ... 176s Unpacking x11-xkb-utils (7.7+9) ... 176s Selecting previously unselected package xserver-common. 176s Preparing to unpack .../469-xserver-common_2%3a21.1.14-2ubuntu1_all.deb ... 176s Unpacking xserver-common (2:21.1.14-2ubuntu1) ... 176s Selecting previously unselected package xvfb. 176s Preparing to unpack .../470-xvfb_2%3a21.1.14-2ubuntu1_s390x.deb ... 176s Unpacking xvfb (2:21.1.14-2ubuntu1) ... 176s Setting up libapt-pkg-perl (0.1.40build8) ... 176s Setting up libmodule-pluggable-perl (5.2-5) ... 176s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 176s Setting up libstring-escape-perl (2010.002-3) ... 176s Setting up libgnutls-openssl27t64:s390x (3.8.9-2ubuntu1) ... 176s Setting up libxcb-dri3-0:s390x (1.17.0-2) ... 176s Setting up liblcms2-2:s390x (2.16-2) ... 176s Setting up libberkeleydb-perl:s390x (0.66-1) ... 176s Setting up libpixman-1-0:s390x (0.44.0-3) ... 176s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 176s Setting up libwayland-server0:s390x (1.23.1-1) ... 176s Setting up libaom3:s390x (3.12.0-1) ... 176s Setting up libx11-xcb1:s390x (2:1.8.10-2) ... 176s Setting up libfile-which-perl (1.27-2) ... 176s Setting up libdouble-conversion3:s390x (3.3.0-1build1) ... 176s Setting up libncurses-dev:s390x (6.5+20250125-2) ... 176s Setting up libunicode-utf8-perl (0.62-2build4) ... 176s Setting up libset-intspan-perl (1.19-3) ... 176s Setting up libxcb-xfixes0:s390x (1.17.0-2) ... 176s Setting up libogg0:s390x (1.3.5-3build1) ... 176s Setting up libmouse-perl:s390x (2.5.11-1build1) ... 176s Setting up libzstd-dev:s390x (1.5.6+dfsg-2) ... 176s Setting up libpod-pom-perl (2.01-4) ... 176s Setting up libxpm4:s390x (1:3.5.17-1build2) ... 176s Setting up hdf5-helpers (1.14.5+repack-3) ... 176s Setting up libwmflite-0.2-7:s390x (0.2.13-1.1build3) ... 176s Setting up libregexp-pattern-perl (0.2.14-2) ... 176s Setting up libdata-messagepack-perl (1.02-1build5) ... 176s Setting up libclass-inspector-perl (1.36-3) ... 176s Setting up libxcb-xinput0:s390x (1.17.0-2) ... 176s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 176s Setting up libdynaloader-functions-perl (0.004-1) ... 176s Setting up libdatrie1:s390x (0.2.13-3build1) ... 176s Setting up libtext-glob-perl (0.11-3) ... 176s Setting up libclass-method-modifiers-perl (2.15-1) ... 176s Setting up liblist-compare-perl (0.55-2) ... 176s Setting up libxcb-render0:s390x (1.17.0-2) ... 176s Setting up libclone-perl:s390x (0.47-1) ... 176s Setting up libarchive-zip-perl (1.68-1) ... 176s Setting up libsub-identify-perl (0.14-3build4) ... 176s Setting up libdrm-radeon1:s390x (2.4.123-1) ... 176s Setting up libcpanel-json-xs-perl:s390x (4.39-1) ... 176s Setting up libglvnd0:s390x (1.7.0-1build1) ... 176s Setting up libio-stringy-perl (2.113-2) ... 176s Setting up libhtml-tagset-perl (3.24-1) ... 176s Setting up libts0t64:s390x (1.22-1.1build1) ... 176s Setting up liblog-any-perl (1.717-1) ... 176s Setting up libyaml-pp-perl (0.38.1-2) ... 176s Setting up libxcb-glx0:s390x (1.17.0-2) ... 176s Setting up libdevel-size-perl (0.84-1build1) ... 176s Setting up unzip (6.0-28ubuntu6) ... 176s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 176s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 176s Setting up libconvert-binhex-perl (1.125-3) ... 176s Setting up liblwp-mediatypes-perl (6.04-2) ... 176s Setting up libyaml-libyaml-perl (0.903.0+ds-1) ... 176s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 176s Setting up libio-interactive-perl (1.026-1) ... 176s Setting up libxcb-keysyms1:s390x (0.4.1-1) ... 176s Setting up libxcb-shape0:s390x (1.17.0-2) ... 176s Setting up x11-common (1:7.7+23ubuntu3) ... 177s Setting up libtry-tiny-perl (0.32-1) ... 177s Setting up libdeflate0:s390x (1.23-1) ... 177s Setting up perl-openssl-defaults:s390x (7build3) ... 177s Setting up libmldbm-perl (2.05-4) ... 177s Setting up libxml-namespacesupport-perl (1.12-2) ... 177s Setting up m4 (1.4.19-5) ... 177s Setting up libevent-2.1-7t64:s390x (2.1.12-stable-10) ... 177s Setting up libclone-choose-perl (0.010-2) ... 177s Setting up libqhull-r8.0:s390x (2020.2-6build1) ... 177s Setting up libxcb-render-util0:s390x (0.3.10-1) ... 177s Setting up libtime-moment-perl (0.44-2build5) ... 177s Setting up libencode-locale-perl (1.05-3) ... 177s Setting up libxcb-shm0:s390x (1.17.0-2) ... 177s Setting up libxcb-icccm4:s390x (0.4.2-1) ... 177s Setting up texinfo-lib (7.1.1-1) ... 177s Setting up libreadline-dev:s390x (8.2-6) ... 177s Setting up libmpg123-0t64:s390x (1.32.10-1) ... 177s Setting up libgomp1:s390x (14.2.0-17ubuntu1) ... 177s Setting up libconfig-tiny-perl (2.30-1) ... 177s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 177s Setting up liblist-utilsby-perl (0.12-2) ... 177s Setting up libyaml-tiny-perl (1.76-1) ... 177s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 177s Setting up octave-common (9.4.0-1) ... 177s Setting up libregexp-common-perl (2024080801-1) ... 177s Setting up libpcre2-16-0:s390x (10.42-4ubuntu3) ... 177s Setting up libaec0:s390x (1.1.3-1) ... 177s Setting up libnet-netmask-perl (2.0002-2) ... 177s Setting up libopengl0:s390x (1.7.0-1build1) ... 177s Setting up libsub-install-perl (0.929-1) ... 177s Setting up libxcb-util1:s390x (0.4.1-1) ... 177s Setting up libpsl-dev:s390x (0.21.2-1.1build1) ... 177s Setting up libxxf86vm1:s390x (1:1.1.4-1build4) ... 177s Setting up libindirect-perl (0.39-2build5) ... 177s Setting up libxcb-xkb1:s390x (1.17.0-2) ... 177s Setting up libxcb-image0:s390x (0.4.0-2build1) ... 177s Setting up libnumber-compare-perl (0.03-3) ... 177s Setting up libxcb-present0:s390x (1.17.0-2) ... 177s Setting up liberror-perl (0.17029-2) ... 177s Setting up libasound2-data (1.2.13-1build1) ... 177s Setting up patchutils (0.4.2-1build3) ... 177s Setting up tex-common (6.18) ... 177s update-language: texlive-base not installed and configured, doing nothing! 177s Setting up libjson-maybexs-perl (1.004008-1) ... 177s Setting up libxml-sax-base-perl (1.09-3) ... 177s Setting up libio-string-perl (1.08-4) ... 177s Setting up libboolean-perl (0.46-3) ... 177s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 177s Setting up xtrans-dev (1.4.0-1) ... 177s Setting up libfontenc1:s390x (1:1.1.8-1build1) ... 177s Setting up autotools-dev (20220109.1) ... 177s Setting up libblas3:s390x (3.12.1-2) ... 177s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 177s Setting up libclass-data-inheritable-perl (0.10-1) ... 177s Setting up libunbound8:s390x (1.22.0-1ubuntu1) ... 177s Setting up libpkgconf3:s390x (1.8.1-4) ... 177s Setting up libgmpxx4ldbl:s390x (2:6.3.0+dfsg-2ubuntu7) ... 177s Setting up libalgorithm-c3-perl (0.11-2) ... 177s Setting up libasound2t64:s390x (1.2.13-1build1) ... 177s Setting up liblog-log4perl-perl (1.57-1) ... 177s Setting up libtext-reform-perl (1.20-5) ... 177s Setting up libgnutls-dane0t64:s390x (3.8.9-2ubuntu1) ... 177s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 177s Setting up libfile-find-rule-perl (0.34-3) ... 177s Setting up libxfixes3:s390x (1:6.0.0-2build1) ... 177s Setting up libxcb-sync1:s390x (1.17.0-2) ... 177s Setting up libipc-system-simple-perl (1.30-2) ... 177s Setting up libio-tiecombine-perl (1.005-3) ... 177s Setting up libnet-domain-tld-perl (1.75-4) ... 177s Setting up libgssrpc4t64:s390x (1.21.3-4ubuntu1) ... 177s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 177s Setting up libldap-dev:s390x (2.6.9+dfsg-1~exp2ubuntu1) ... 177s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 177s Setting up libxcb-cursor0:s390x (0.1.5-1) ... 177s Setting up lzip (1.25-1) ... 177s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 177s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 177s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 177s Setting up libavahi-common-data:s390x (0.8-14ubuntu1) ... 177s Setting up libopus0:s390x (1.5.2-2) ... 177s Setting up t1utils (1.41-4build3) ... 177s Setting up libxinerama1:s390x (2:1.1.4-3build1) ... 177s Setting up diffstat (1.67-1) ... 177s Setting up libimagequant0:s390x (2.18.0-1build1) ... 177s Setting up comerr-dev:s390x (2.1-1.47.2-1ubuntu1) ... 177s Setting up libxkbcommon-x11-0:s390x (1.7.0-2) ... 177s Setting up fonts-dejavu-mono (2.37-8) ... 177s Setting up libssl-dev:s390x (3.4.0-1ubuntu2) ... 177s Setting up libmpc3:s390x (1.3.1-1build2) ... 177s Setting up libvorbis0a:s390x (1.3.7-2) ... 177s Setting up libvariable-magic-perl (0.64-1build1) ... 177s Setting up libio-html-perl (1.004-3) ... 177s Setting up libxrandr2:s390x (2:1.5.4-1) ... 177s Setting up libtext-template-perl (1.61-1) ... 177s Setting up libpod-parser-perl (1.67-1) ... 177s Setting up autopoint (0.23.1-1) ... 177s Setting up libb-hooks-op-check-perl:s390x (0.22-3build2) ... 177s Setting up fonts-dejavu-core (2.37-8) ... 177s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 177s Setting up pkgconf-bin (1.8.1-4) ... 177s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 177s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 177s Setting up libltdl7:s390x (2.5.4-3build1) ... 177s Setting up libidn2-dev:s390x (2.3.7-2build2) ... 177s Setting up libfftw3-double3:s390x (3.3.10-2fakesync1build1) ... 177s Setting up libglapi-mesa:s390x (24.3.4-3ubuntu1) ... 177s Setting up libparams-util-perl (1.102-3build1) ... 177s Setting up libgfortran5:s390x (14.2.0-17ubuntu1) ... 177s Setting up libvulkan1:s390x (1.4.304.0-1) ... 177s Setting up libtime-duration-perl (1.21-2) ... 177s Setting up autoconf (2.72-3) ... 177s Setting up libtext-xslate-perl:s390x (3.5.9-2build1) ... 177s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 177s Setting up libwebp7:s390x (1.5.0-0.1) ... 177s Setting up libarray-intspan-perl (2.004-2) ... 177s Setting up libcapture-tiny-perl (0.50-1) ... 177s Setting up libtimedate-perl (2.3300-2) ... 177s Setting up libexporter-lite-perl (0.09-2) ... 177s Setting up libubsan1:s390x (14.2.0-17ubuntu1) ... 177s Setting up libsub-name-perl:s390x (0.28-1) ... 177s Setting up zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 177s Setting up dwz (0.15-1build6) ... 177s Setting up libdata-validate-domain-perl (0.15-1) ... 177s Setting up libproc-processtable-perl:s390x (0.636-1build4) ... 177s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 177s Setting up libmtdev1t64:s390x (1.1.7-1) ... 177s Setting up libduktape207:s390x (2.7.0+tests-0ubuntu3) ... 177s Setting up libxshmfence1:s390x (1.3-1build5) ... 177s Setting up libxcb-randr0:s390x (1.17.0-2) ... 177s Setting up libpath-tiny-perl (0.146-1) ... 177s Setting up libasan8:s390x (14.2.0-17ubuntu1) ... 177s Setting up lzop (1.04-2build3) ... 177s Setting up libjson-perl (4.10000-1) ... 177s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 177s Setting up librole-tiny-perl (2.002004-1) ... 177s Setting up debugedit (1:5.1-2) ... 177s Setting up libipc-run3-perl (0.049-1) ... 177s Setting up libmd4c0:s390x (0.5.2-2) ... 177s Setting up libregexp-wildcards-perl (1.05-3) ... 177s Setting up libmousex-strictconstructor-perl (0.02-3) ... 177s Setting up libfile-sharedir-perl (1.118-3) ... 177s Setting up libsub-uplevel-perl (0.2800-3) ... 177s Setting up libsuitesparseconfig7:s390x (1:7.8.3+dfsg-3) ... 177s Setting up liblua5.4-0:s390x (5.4.7-1) ... 177s Setting up libaliased-perl (0.34-3) ... 177s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 177s Setting up libthai-data (0.1.29-2build1) ... 177s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 177s Setting up libstrictures-perl (2.000006-1) ... 177s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 177s Setting up libdevel-stacktrace-perl (2.0500-1) ... 177s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 177s Setting up libtext-autoformat-perl (1.750000-2) ... 177s Setting up libglu1-mesa:s390x (9.0.2-1.1build1) ... 177s Setting up libflac12t64:s390x (1.4.3+ds-4) ... 177s Setting up libtoml-tiny-perl (0.18-1) ... 177s Setting up libstemmer0d:s390x (2.2.0-4build1) ... 177s Setting up libxkbfile1:s390x (1:1.1.0-1build4) ... 177s Setting up libsort-versions-perl (1.62-3) ... 177s Setting up libexporter-tiny-perl (1.006002-1) ... 177s Setting up libterm-readkey-perl (2.38-2build5) ... 177s Setting up libisl23:s390x (0.27-1) ... 177s Setting up libtext-unidecode-perl (1.30-3) ... 177s Setting up libde265-0:s390x (1.0.15-1build4) ... 177s Setting up libfont-ttf-perl (1.06-2) ... 177s Setting up libfile-homedir-perl (1.006-2) ... 177s Setting up libsamplerate0:s390x (0.2.2-4build1) ... 177s Setting up libtasn1-6-dev:s390x (4.20.0-2) ... 177s Setting up libwebpmux3:s390x (1.5.0-0.1) ... 177s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 177s Setting up libperlio-gzip-perl (0.20-1build5) ... 177s Setting up libjxl0.11:s390x (0.11.1-1) ... 177s Setting up libxfont2:s390x (1:2.0.6-1build1) ... 177s Setting up libhtml-html5-entities-perl (0.004-3) ... 177s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 177s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 177s Setting up libmarkdown2:s390x (2.2.7-2ubuntu1) ... 177s Setting up libcc1-0:s390x (14.2.0-17ubuntu1) ... 177s Setting up liburi-perl (5.30-1) ... 177s Setting up libnet-ipv6addr-perl (1.02-1) ... 177s Setting up libbrotli-dev:s390x (1.1.0-2build3) ... 177s Setting up libp11-kit-dev:s390x (0.25.5-2ubuntu1) ... 177s Setting up libmp3lame0:s390x (3.100-6build1) ... 177s Setting up libblas-dev:s390x (3.12.1-2) ... 177s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so to provide /usr/lib/s390x-linux-gnu/libblas.so (libblas.so-s390x-linux-gnu) in auto mode 177s Setting up libsz2:s390x (1.1.3-1) ... 177s Setting up libitm1:s390x (14.2.0-17ubuntu1) ... 177s Setting up libvorbisenc2:s390x (1.3.7-2) ... 177s Setting up libkadm5clnt-mit12:s390x (1.21.3-4ubuntu1) ... 177s Setting up libdata-validate-ip-perl (0.31-1) ... 177s Setting up libwacom-common (2.14.0-1) ... 177s Setting up libmousex-nativetraits-perl (1.09-3) ... 177s Setting up libemail-address-xs-perl (1.05-1build5) ... 177s Setting up libwayland-client0:s390x (1.23.1-1) ... 177s Setting up libnet-ssleay-perl:s390x (1.94-2) ... 177s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 177s Setting up automake (1:1.17-3) ... 177s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 177s Setting up libb2-1:s390x (0.98.1-1.1build1) ... 177s Setting up x11proto-dev (2024.1-1) ... 177s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 177s Setting up gnuplot-data (6.0.0+dfsg1-1ubuntu3) ... 177s Setting up libice6:s390x (2:1.1.1-1) ... 177s Setting up libqt6core6t64:s390x (6.8.1+dfsg-0ubuntu4) ... 177s Setting up libhttp-date-perl (6.06-1) ... 177s Setting up mesa-libgallium:s390x (24.3.4-3ubuntu1) ... 177s Setting up libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 177s Setting up liblapack3:s390x (3.12.1-2) ... 177s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 177s Setting up libproxy1v5:s390x (0.5.9-1) ... 177s Setting up libfile-basedir-perl (0.09-2) ... 177s Setting up gettext (0.23.1-1) ... 177s Setting up libarpack2t64:s390x (3.9.1-4) ... 177s Setting up libfftw3-single3:s390x (3.3.10-2fakesync1build1) ... 177s Setting up libgmp-dev:s390x (2:6.3.0+dfsg-2ubuntu7) ... 177s Setting up libamd3:s390x (1:7.8.3+dfsg-3) ... 177s Setting up libfile-listing-perl (6.16-1) ... 177s Setting up libxau-dev:s390x (1:1.0.11-1) ... 177s Setting up nettle-dev:s390x (3.10-1) ... 177s Setting up libkdb5-10t64:s390x (1.21.3-4ubuntu1) ... 177s Setting up libgbm1:s390x (24.3.4-3ubuntu1) ... 177s Setting up libcolamd3:s390x (1:7.8.3+dfsg-3) ... 177s Setting up libwacom9:s390x (2.14.0-1) ... 177s Setting up fontconfig-config (2.15.0-1.1ubuntu2) ... 177s Setting up liblist-moreutils-perl (0.430-2) ... 177s Setting up libxcursor1:s390x (1:1.2.3-1) ... 177s Setting up libpod-constants-perl (0.19-2) ... 177s Setting up libgl1-mesa-dri:s390x (24.3.4-3ubuntu1) ... 177s Setting up libhash-merge-perl (0.302-1) ... 177s Setting up libsoftware-copyright-perl (0.012-2) ... 177s Setting up libaec-dev:s390x (1.1.3-1) ... 177s Setting up libavahi-common3:s390x (0.8-14ubuntu1) ... 177s Setting up libcxsparse4:s390x (1:7.8.3+dfsg-3) ... 177s Setting up libfftw3-long3:s390x (3.3.10-2fakesync1build1) ... 177s Setting up libnet-http-perl (6.23-1) ... 177s Setting up libpath-iterator-rule-perl (1.015-2) ... 177s Setting up libtext-markdown-discount-perl (0.18-1) ... 177s Setting up libappstream5:s390x (1.0.4-1) ... 177s Setting up libexception-class-perl (1.45-1) ... 177s Setting up libclass-c3-perl (0.35-2) ... 177s Setting up libqrupdate1:s390x (1.1.5-1) ... 177s Setting up libdevel-callchecker-perl:s390x (0.009-1build1) ... 177s Setting up libxml-sax-perl (1.02+dfsg-4) ... 177s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 177s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 177s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 177s Setting up libcamd3:s390x (1:7.8.3+dfsg-3) ... 177s Setting up pkgconf:s390x (1.8.1-4) ... 177s Setting up libinput-bin (1.27.1-1) ... 177s Setting up libxs-parse-sublike-perl:s390x (0.36-1) ... 177s Setting up intltool-debian (0.35.0+20060710.6) ... 177s Setting up libthai0:s390x (0.1.29-2build1) ... 177s Setting up libxdmcp-dev:s390x (1:1.1.5-1) ... 177s Setting up libegl-mesa0:s390x (24.3.4-3ubuntu1) ... 177s Setting up libdata-validate-uri-perl (0.07-3) ... 177s Setting up libxs-parse-keyword-perl (0.48-2) ... 177s Setting up libtest-exception-perl (0.43-3) ... 177s Setting up appstream (1.0.4-1) ... 177s ✔ Metadata cache was updated successfully. 177s Setting up libqt6xml6:s390x (6.8.1+dfsg-0ubuntu4) ... 177s Setting up libglpk40:s390x (5.0-1build2) ... 177s Setting up libqt6sql6:s390x (6.8.1+dfsg-0ubuntu4) ... 177s Setting up libstring-copyright-perl (0.003014-1) ... 177s Setting up libraqm0:s390x (0.10.2-1) ... 177s Setting up liblapack-dev:s390x (3.12.1-2) ... 177s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so to provide /usr/lib/s390x-linux-gnu/liblapack.so (liblapack.so-s390x-linux-gnu) in auto mode 177s Setting up libdata-optlist-perl (0.114-1) ... 177s Setting up libssh2-1-dev:s390x (1.11.1-1) ... 177s Setting up cpp-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 177s Setting up cpp-14 (14.2.0-17ubuntu1) ... 177s Setting up libccolamd3:s390x (1:7.8.3+dfsg-3) ... 177s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 177s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 177s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 177s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 177s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 177s Setting up dh-strip-nondeterminism (1.14.1-2) ... 177s Setting up libwww-robotrules-perl (6.02-1) ... 177s Setting up libsyntax-keyword-try-perl (0.30-1) ... 177s Setting up libjack-jackd2-0:s390x (1.9.22~dfsg-4) ... 177s Setting up libhdf5-310:s390x (1.14.5+repack-3) ... 177s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 177s Setting up libhtml-parser-perl:s390x (3.83-1build1) ... 177s Setting up libkadm5srv-mit12:s390x (1.21.3-4ubuntu1) ... 177s Setting up libegl1:s390x (1.7.0-1build1) ... 177s Setting up libqt6core5compat6:s390x (6.8.1-0ubuntu2) ... 177s Setting up libfontconfig1:s390x (2.15.0-1.1ubuntu2) ... 177s Setting up libsndfile1:s390x (1.2.2-2) ... 177s Setting up libmro-compat-perl (0.15-2) ... 177s Setting up libgcc-14-dev:s390x (14.2.0-17ubuntu1) ... 177s Setting up libjpeg8-dev:s390x (8c-2ubuntu11) ... 177s Setting up libhdf5-fortran-310:s390x (1.14.5+repack-3) ... 177s Setting up libstdc++-14-dev:s390x (14.2.0-17ubuntu1) ... 177s Setting up libsm6:s390x (2:1.2.4-1) ... 177s Setting up libavahi-client3:s390x (0.8-14ubuntu1) ... 177s Setting up libio-socket-ssl-perl (2.089-1) ... 177s Setting up libsub-exporter-perl (0.990-1) ... 177s Setting up libqt6dbus6:s390x (6.8.1+dfsg-0ubuntu4) ... 177s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 177s Setting up libhtml-form-perl (6.12-1) ... 177s Setting up krb5-multidev:s390x (1.21.3-4ubuntu1) ... 177s Setting up libhdf5-cpp-310:s390x (1.14.5+repack-3) ... 177s Setting up libgfortran-14-dev:s390x (14.2.0-17ubuntu1) ... 177s Setting up libiterator-perl (0.03+ds1-2) ... 177s Setting up libgnutls28-dev:s390x (3.8.9-2ubuntu1) ... 177s Setting up libinput10:s390x (1.27.1-1) ... 177s Setting up libnghttp2-dev:s390x (1.64.0-1) ... 177s Setting up libhdf5-hl-310:s390x (1.14.5+repack-3) ... 177s Setting up libportaudio2:s390x (19.6.0-1.2build3) ... 177s Setting up libhttp-negotiate-perl (6.01-2) ... 177s Setting up fontconfig (2.15.0-1.1ubuntu2) ... 179s Regenerating fonts cache... done. 179s Setting up libcarp-assert-more-perl (2.8.0-1) ... 179s Setting up libcholmod5:s390x (1:7.8.3+dfsg-3) ... 179s Setting up libxft2:s390x (2.3.6-1build1) ... 180s Setting up libglx-mesa0:s390x (24.3.4-3ubuntu1) ... 180s Setting up libxcb1-dev:s390x (1.17.0-2) ... 180s Setting up libiterator-util-perl (0.02+ds1-2) ... 180s Setting up libglx0:s390x (1.7.0-1build1) ... 180s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 180s Setting up libhttp-cookies-perl (6.11-1) ... 180s Setting up libspqr4:s390x (1:7.8.3+dfsg-3) ... 180s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 180s Setting up po-debconf (1.0.21+nmu1) ... 180s Setting up libhtml-tree-perl (5.07-3) ... 180s Setting up libparams-classify-perl:s390x (0.015-2build6) ... 180s Setting up libpango-1.0-0:s390x (1.56.1-1) ... 180s Setting up libcgi-pm-perl (4.67-1) ... 180s Setting up libjpeg-dev:s390x (8c-2ubuntu11) ... 180s Setting up libx11-dev:s390x (2:1.8.10-2) ... 180s Setting up libcairo2:s390x (1.18.2-2) ... 180s Setting up libobject-pad-perl (0.819-1) ... 180s Setting up libkrb5-dev:s390x (1.21.3-4ubuntu1) ... 180s Setting up gcc-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 180s Setting up libgl1:s390x (1.7.0-1build1) ... 180s Setting up libqt6gui6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 180s Setting up libnet-smtp-ssl-perl (1.04-2) ... 180s Setting up libmodule-runtime-perl (0.016-2) ... 180s Setting up libmailtools-perl (2.22-1) ... 180s Setting up libconfig-model-perl (2.155-1) ... 180s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 180s Setting up librtmp-dev:s390x (2.4+20151223.gitfa8646d.1-2build7) ... 180s Setting up g++-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 180s Setting up texinfo (7.1.1-1) ... 180s Setting up libumfpack6:s390x (1:7.8.3+dfsg-3) ... 180s Setting up libconst-fast-perl (0.014-2) ... 180s Setting up libqt6network6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up cpp (4:14.2.0-1ubuntu1) ... 180s Setting up libdata-section-perl (0.200008-1) ... 180s Setting up libglx-dev:s390x (1.7.0-1build1) ... 180s Setting up libpangoft2-1.0-0:s390x (1.56.1-1) ... 180s Setting up libdata-dpath-perl (0.60-1) ... 180s Setting up libfltk1.3t64:s390x (1.3.8-6.1build2) ... 180s Setting up libfftw3-dev:s390x (3.3.10-2fakesync1build1) ... 180s Setting up libcups2t64:s390x (2.4.11-0ubuntu2) ... 180s Setting up libgl-dev:s390x (1.7.0-1build1) ... 180s Setting up libstring-rewriteprefix-perl (0.009-1) ... 180s Setting up libpangocairo-1.0-0:s390x (1.56.1-1) ... 180s Setting up libhdf5-hl-cpp-310:s390x (1.14.5+repack-3) ... 180s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 180s Setting up libhdf5-hl-fortran-310:s390x (1.14.5+repack-3) ... 180s Setting up libxmu6:s390x (2:1.1.3-3build2) ... 180s Setting up libmodule-implementation-perl (0.09-2) ... 180s Setting up libpackage-stash-perl (0.40-1) ... 180s Setting up libimport-into-perl (1.002005-2) ... 180s Setting up libmoo-perl (2.005005-1) ... 180s Setting up gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu1) ... 180s Setting up libqt6opengl6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up liblist-someutils-perl (0.59-1) ... 180s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 180s Setting up libxaw7:s390x (2:1.0.16-1) ... 180s Setting up libmime-tools-perl (5.515-1) ... 180s Setting up libsoftware-license-perl (0.104006-1) ... 180s Setting up libclass-load-perl (0.25-2) ... 180s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 180s Setting up gcc-14 (14.2.0-17ubuntu1) ... 180s Setting up libqt6widgets6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up libfltk-gl1.3t64:s390x (1.3.8-6.1build2) ... 180s Setting up libcurl4-openssl-dev:s390x (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 180s Setting up libhdf5-dev (1.14.5+repack-3) ... 180s update-alternatives: using /usr/lib/s390x-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/s390x-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 180s Setting up g++-14 (14.2.0-17ubuntu1) ... 180s Setting up libmoox-aliases-perl (0.001006-2) ... 180s Setting up gfortran-14 (14.2.0-17ubuntu1) ... 180s Setting up libparams-validate-perl:s390x (1.31-2build4) ... 180s Setting up libqt6openglwidgets6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up libb-hooks-endofscope-perl (0.28-1) ... 180s Setting up libqt6printsupport6:s390x (6.8.1+dfsg-0ubuntu4) ... 180s Setting up gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 180s Setting up libtool (2.5.4-3build1) ... 180s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 180s Setting up x11-xkb-utils (7.7+9) ... 180s Setting up libqt6help6:s390x (6.8.1-0ubuntu1) ... 180s Setting up libqscintilla2-qt6-15:s390x (2.14.1+dfsg-1build4) ... 180s Setting up gcc (4:14.2.0-1ubuntu1) ... 180s Setting up dh-autoreconf (20) ... 180s Setting up libnamespace-clean-perl (0.27-2) ... 180s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 180s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 180s Setting up g++ (4:14.2.0-1ubuntu1) ... 180s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 180s Setting up xserver-common (2:21.1.14-2ubuntu1) ... 180s Setting up licensecheck (3.3.9-1ubuntu1) ... 180s Setting up libapp-cmd-perl (0.337-2) ... 180s Setting up xvfb (2:21.1.14-2ubuntu1) ... 180s Setting up debhelper (13.24.1ubuntu2) ... 180s Setting up gfortran (4:14.2.0-1ubuntu1) ... 180s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 180s 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 180s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 180s 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 180s Setting up cme (1.041-1) ... 180s Setting up libheif-plugin-aomdec:s390x (1.19.5-1build1) ... 180s Setting up libwww-perl (6.77-1) ... 180s Setting up libheif1:s390x (1.19.5-1build1) ... 180s Setting up libparse-debcontrol-perl (2.005-6) ... 180s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 180s Setting up libwww-mechanize-perl (2.18-1ubuntu1) ... 180s Setting up libgd3:s390x (2.3.3-12ubuntu3) ... 180s Setting up gnuplot-nox (6.0.0+dfsg1-1ubuntu3) ... 180s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 180s Setting up liblwp-protocol-https-perl (6.14-1) ... 180s Setting up libheif-plugin-libde265:s390x (1.19.5-1build1) ... 180s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45-1build2) ... 180s Setting up lintian (2.121.1ubuntu1) ... 180s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45-1build2) ... 180s Setting up libconfig-model-dpkg-perl (3.010) ... 180s Setting up dh-octave-autopkgtest (1.8.0) ... 180s Setting up octave (9.4.0-1) ... 180s Setting up octave-dev (9.4.0-1) ... 180s Setting up octave-io (2.6.4-3build2) ... 180s Setting up octave-statistics-common (1.7.2-1) ... 180s Setting up octave-statistics (1.7.2-1) ... 180s Setting up dh-octave (1.8.0) ... 180s Processing triggers for libc-bin (2.41-1ubuntu1) ... 180s Processing triggers for man-db (2.13.0-1) ... 180s Processing triggers for udev (257.2-3ubuntu1) ... 180s Processing triggers for install-info (7.1.1-1) ... 181s autopkgtest [01:21:02]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 181s autopkgtest [01:21:02]: test command1: [----------------------- 182s Checking package... 182s Run the unit tests... 182s Checking m files ... 182s [inst/regress_gp.m] 182s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/regress_gp.m 182s ***** demo 182s ## Linear fitting of 1D Data 182s rand ("seed", 125); 182s X = 2 * rand (5, 1) - 1; 182s randn ("seed", 25); 182s Y = 2 * X - 1 + 0.3 * randn (5, 1); 182s 182s ## Points for interpolation/extrapolation 182s Xfit = linspace (-2, 2, 10)'; 182s 182s ## Fit regression model 182s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 182s 182s ## Plot fitted data 182s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 182s title ("Gaussian process regression with linear kernel"); 182s ***** demo 182s ## Linear fitting of 2D Data 182s rand ("seed", 135); 182s X = 2 * rand (4, 2) - 1; 182s randn ("seed", 35); 182s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 182s 182s ## Mesh for interpolation/extrapolation 182s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 182s Xfit = [x1(:), x2(:)]; 182s 182s ## Fit regression model 182s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 182s Ypred = reshape (Ypred, 10, 10); 182s YintU = reshape (Yint(:,1), 10, 10); 182s YintL = reshape (Yint(:,2), 10, 10); 182s 182s ## Plot fitted data 182s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 182s hold on; 182s h = mesh (x1, x2, Ypred, zeros (10, 10)); 182s set (h, "facecolor", "none", "edgecolor", "yellow"); 182s h = mesh (x1, x2, YintU, ones (10, 10)); 182s set (h, "facecolor", "none", "edgecolor", "cyan"); 182s h = mesh (x1, x2, YintL, ones (10, 10)); 182s set (h, "facecolor", "none", "edgecolor", "cyan"); 182s hold off 182s axis tight 182s view (75, 25) 182s title ("Gaussian process regression with linear kernel"); 182s ***** demo 182s ## Projection over basis function with linear kernel 182s pp = [2, 2, 0.3, 1]; 182s n = 10; 182s rand ("seed", 145); 182s X = 2 * rand (n, 1) - 1; 182s randn ("seed", 45); 182s Y = polyval (pp, X) + 0.3 * randn (n, 1); 182s 182s ## Powers 182s px = [sqrt(abs(X)), X, X.^2, X.^3]; 182s 182s ## Points for interpolation/extrapolation 182s Xfit = linspace (-1, 1, 100)'; 182s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 182s 182s ## Define a prior covariance assuming that the sqrt component is not present 182s Sp = 100 * eye (size (px, 2) + 1); 182s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 182s 182s ## Fit regression model 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 182s 182s ## Plot fitted data 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("Linear kernel over basis function with prior covariance"); 182s ***** demo 182s ## Projection over basis function with linear kernel 182s pp = [2, 2, 0.3, 1]; 182s n = 10; 182s rand ("seed", 145); 182s X = 2 * rand (n, 1) - 1; 182s randn ("seed", 45); 182s Y = polyval (pp, X) + 0.3 * randn (n, 1); 182s 182s ## Powers 182s px = [sqrt(abs(X)), X, X.^2, X.^3]; 182s 182s ## Points for interpolation/extrapolation 182s Xfit = linspace (-1, 1, 100)'; 182s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 182s 182s ## Fit regression model without any assumption on prior covariance 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 182s 182s ## Plot fitted data 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("Linear kernel over basis function without prior covariance"); 182s ***** demo 182s ## Projection over basis function with rbf kernel 182s pp = [2, 2, 0.3, 1]; 182s n = 10; 182s rand ("seed", 145); 182s X = 2 * rand (n, 1) - 1; 182s randn ("seed", 45); 182s Y = polyval (pp, X) + 0.3 * randn (n, 1); 182s 182s ## Powers 182s px = [sqrt(abs(X)), X, X.^2, X.^3]; 182s 182s ## Points for interpolation/extrapolation 182s Xfit = linspace (-1, 1, 100)'; 182s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 182s 182s ## Fit regression model with RBF kernel (standard parameters) 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 182s 182s ## Plot fitted data 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("RBF kernel over basis function with standard parameters"); 182s text (-0.5, 4, "theta = 5\n g = 0.01"); 182s ***** demo 182s ## Projection over basis function with rbf kernel 182s pp = [2, 2, 0.3, 1]; 182s n = 10; 182s rand ("seed", 145); 182s X = 2 * rand (n, 1) - 1; 182s randn ("seed", 45); 182s Y = polyval (pp, X) + 0.3 * randn (n, 1); 182s 182s ## Powers 182s px = [sqrt(abs(X)), X, X.^2, X.^3]; 182s 182s ## Points for interpolation/extrapolation 182s Xfit = linspace (-1, 1, 100)'; 182s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 182s 182s ## Fit regression model with RBF kernel with different parameters 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 182s 182s ## Plot fitted data 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("GP regression with RBF kernel and non default parameters"); 182s text (-0.5, 4, "theta = 10\n g = 0.01"); 182s 182s ## Fit regression model with RBF kernel with different parameters 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 182s 182s ## Plot fitted data 182s figure 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("GP regression with RBF kernel and non default parameters"); 182s text (-0.5, 4, "theta = 50\n g = 0.01"); 182s 182s ## Fit regression model with RBF kernel with different parameters 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 182s 182s ## Plot fitted data 182s figure 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("GP regression with RBF kernel and non default parameters"); 182s text (-0.5, 4, "theta = 50\n g = 0.001"); 182s 182s ## Fit regression model with RBF kernel with different parameters 182s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 182s 182s ## Plot fitted data 182s figure 182s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 182s Xfit, polyval (pp, Xfit), "g-;True;"); 182s axis tight 182s axis manual 182s hold on 182s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 182s hold off 182s title ("GP regression with RBF kernel and non default parameters"); 182s text (-0.5, 4, "theta = 50\n g = 0.05"); 182s ***** demo 182s ## RBF fitting on noiseless 1D Data 182s x = [0:2*pi/7:2*pi]'; 182s y = 5 * sin (x); 182s 182s ## Predictive grid of 500 equally spaced locations 182s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 182s 182s ## Fit regression model with RBF kernel 182s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 182s 182s ## Plot fitted data 182s r = mvnrnd (Yfit, diag (Ysd)', 50); 182s plot (xi, r', "c-"); 182s hold on 182s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 182s plot (x, y, ".k;Predictor points;", "markersize", 20) 182s plot (xi, 5 * sin (xi), "-y;True Function;"); 182s xlim ([-0.5,2*pi+0.5]); 182s ylim ([-10,10]); 182s hold off 182s title ("GP regression with RBF kernel on noiseless 1D data"); 182s text (0, -7, "theta = 5\n g = 0.01"); 182s ***** demo 182s ## RBF fitting on noisy 1D Data 182s x = [0:2*pi/7:2*pi]'; 182s x = [x; x]; 182s y = 5 * sin (x) + randn (size (x)); 182s 182s ## Predictive grid of 500 equally spaced locations 182s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 182s 182s ## Fit regression model with RBF kernel 182s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 182s 182s ## Plot fitted data 182s r = mvnrnd (Yfit, diag (Ysd)', 50); 182s plot (xi, r', "c-"); 182s hold on 182s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 182s plot (x, y, ".k;Predictor points;", "markersize", 20) 182s plot (xi, 5 * sin (xi), "-y;True Function;"); 182s xlim ([-0.5,2*pi+0.5]); 182s ylim ([-10,10]); 182s hold off 182s title ("GP regression with RBF kernel on noisy 1D data"); 182s text (0, -7, "theta = 5\n g = 0.01"); 182s ***** error regress_gp (ones (20, 2)) 182s ***** error regress_gp (ones (20, 2), ones (20, 1)) 182s ***** error ... 182s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 182s ***** error ... 182s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 182s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 183s ***** error ... 183s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 183s 22 tests, 22 passed, 0 known failure, 0 skipped 183s [inst/nansum.m] 183s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/nansum.m 183s ***** assert (nansum ([2 4 NaN 7]), 13) 183s ***** assert (nansum ([2 4 NaN Inf]), Inf) 183s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 183s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 183s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 183s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 183s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 183s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 183s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 183s 9 tests, 9 passed, 0 known failure, 0 skipped 183s [inst/mhsample.m] 183s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/mhsample.m 183s ***** demo 183s ## Define function to sample 183s d = 2; 183s mu = [-1; 2]; 183s rand ("seed", 5) # for reproducibility 183s Sigma = rand (d); 183s Sigma = (Sigma + Sigma'); 183s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 183s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 183s ## Inputs 183s start = ones (1, 2); 183s nsamples = 500; 183s sym = true; 183s K = 500; 183s m = 10; 183s rand ("seed", 8) # for reproducibility 183s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 183s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 183s "symmetric", sym, "burnin", K, "thin", m); 183s figure; 183s hold on; 183s plot (smpl(:, 1), smpl(:, 2), 'x'); 183s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 183s z = reshape (pdf ([x(:), y(:)]), size(x)); 183s mesh (x, y, z, "facecolor", "None"); 183s ## Using sample points to find the volume of half a sphere with radius of .5 183s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 183s int = mean (f (smpl) ./ pdf (smpl)); 183s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 183s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 183s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 183s printf ("Monte Carlo integral error estimate %f\n", errest); 183s printf ("The actual error %f\n", trueerr); 183s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 183s ***** demo 183s ## Integrate truncated normal distribution to find normilization constant 183s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 183s nsamples = 1e3; 183s rand ("seed", 5) # for reproducibility 183s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 183s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 183s "symmetric", true, "thin", 4); 183s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 183s x = linspace (-3, 3, 1000); 183s area(x, f(x)); 183s xlabel ('x'); 183s ylabel ('f(x)'); 183s int = mean (f (smpl) ./ pdf (smpl)); 183s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 183s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 183s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 183s printf ("Monte Carlo integral error estimate %f\n", errest); 183s printf ("The actual error %f\n", trueerr); 183s ***** test 183s nchain = 1e4; 183s start = rand (nchain, 1); 183s nsamples = 1e3; 183s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 183s proppdf = @(x, y) 1/3; 183s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 183s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 183s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 183s "burnin", 0); 183s assert (mean (mean (smpl, 1), 3), 1, .01); 183s assert (mean (var (smpl, 1), 3), 1, .01) 186s ***** error mhsample (); 186s ***** error mhsample (1); 186s ***** error mhsample (1, 1); 186s ***** error mhsample (1, 1, "pdf", @(x)x); 186s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 186s 6 tests, 6 passed, 0 known failure, 0 skipped 186s [inst/kruskalwallis.m] 186s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/kruskalwallis.m 186s ***** demo 186s x = meshgrid (1:6); 186s x = x + normrnd (0, 1, 6, 6); 186s kruskalwallis (x, [], 'off'); 186s ***** demo 186s x = meshgrid (1:6); 186s x = x + normrnd (0, 1, 6, 6); 186s [p, atab] = kruskalwallis(x); 186s ***** demo 186s x = ones (30, 4) .* [-2, 0, 1, 5]; 186s x = x + normrnd (0, 2, 30, 4); 186s group = {"A", "B", "C", "D"}; 186s kruskalwallis (x, group); 186s ***** test 186s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 186s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 186s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 186s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 186s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 186s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 186s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 186s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 186s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 186s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 186s group = [1:10] .* ones (10,10); 186s group = group(:); 186s [p, tbl] = kruskalwallis (data, group, "off"); 186s assert (p, 0.048229, 1e-6); 186s assert (tbl{2,5}, 17.03124, 1e-5); 186s assert (tbl{2,3}, 9, 0); 186s assert (tbl{4,2}, 82655.5, 1e-16); 186s data = reshape (data, 10, 10); 186s [p, tbl, stats] = kruskalwallis (data, [], "off"); 186s assert (p, 0.048229, 1e-6); 186s assert (tbl{2,5}, 17.03124, 1e-5); 186s assert (tbl{2,3}, 9, 0); 186s assert (tbl{4,2}, 82655.5, 1e-16); 186s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 186s N = 10 * ones (1, 10); 186s assert (stats.meanranks, means, 1e-6); 186s assert (length (stats.gnames), 10, 0); 186s assert (stats.n, N, 0); 186s 1 test, 1 passed, 0 known failure, 0 skipped 186s [inst/sampsizepwr.m] 186s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/sampsizepwr.m 186s ***** demo 186s ## Compute the mean closest to 100 that can be determined to be 186s ## significantly different from 100 using a t-test with a sample size 186s ## of 60 and a power of 0.8. 186s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 186s disp (mu1); 186s ***** demo 186s ## Compute the sample sizes required to distinguish mu0 = 100 from 186s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 186s ## smaller sample sizes of 1.5 and a power of 0.6. 186s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 186s ***** demo 186s ## Compute the sample size N required to distinguish p=.26 from p=.2 186s ## with a binomial test. The result is approximate, so make a plot to 186s ## see if any smaller N values also have the required power of 0.6. 186s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 186s nn = 1:250; 186s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 186s Nexact = min (nn(pwr >= 0.6)); 186s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 186s grid on 186s ***** demo 186s ## The company must test 52 bottles to detect the difference between a mean 186s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 186s ## to visualize how the sample size affects the power of the test. 186s 186s nout = sampsizepwr('t',[100 5],102,0.80); 186s nn = 1:100; 186s pwrout = sampsizepwr('t',[100 5],102,[],nn); 186s 186s figure; 186s plot (nn, pwrout, "b-", nout, 0.8, "ro") 186s title ("Power versus Sample Size") 186s xlabel ("Sample Size") 186s ylabel ("Power") 186s ***** error ... 186s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("z", 100, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("t", 100, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("t2", 60, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 186s ***** error ... 186s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("var", 0, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("var", -5, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("p", 0, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", -1, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", 0, [], 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 186s ***** error ... 186s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 5], [], [], 60); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 5], 110, [], []); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 186s ***** error ... 186s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 186s ***** error ... 186s out = sampsizepwr ("var", 5, -1, [], 60); 186s ***** error ... 187s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 187s ***** error ... 187s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 187s ***** error ... 187s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 187s ***** error ... 187s out = sampsizepwr ("z", [100, 5], 110, 1.2); 187s ***** error ... 187s out = sampsizepwr ("z", [100, 5], 110, 0); 187s ***** error ... 187s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 187s ***** error ... 187s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 187s ***** error ... 187s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 187s ***** error ... 187s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 187s ***** error ... 187s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 187s ***** warning ... 187s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 187s ***** warning ... 187s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 187s ***** test 187s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 187s assert (mu1, 103.67704316, 1e-8); 187s ***** test 187s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 187s assert (N1, 9); 187s assert (N2, 14); 187s ***** test 187s nn = 1:250; 187s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 187s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 187s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 187s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 187s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 187s ***** test 187s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 187s assert (nout, 52); 187s ***** test 187s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 187s assert (power, 0.5797373588621888, 1e-14); 187s ***** test 187s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 187s assert (nout, 18); 187s ***** test 187s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 187s assert (p1out, 25.65317979360237, 1e-14); 188s ***** test 188s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 188s assert (pwr, 0.716504004686586, 1e-14); 188s ***** test 188s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 188s assert (n, 11); 188s ***** test 188s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 188s assert ([n1, n2], [8, 16]); 188s 68 tests, 68 passed, 0 known failure, 0 skipped 188s [inst/optimalleaforder.m] 188s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/optimalleaforder.m 188s ***** demo 188s randn ("seed", 5) # for reproducibility 188s X = randn (10, 2); 188s D = pdist (X); 188s tree = linkage(D, 'average'); 188s optimalleaforder (tree, D, 'Transformation', 'linear') 188s ***** error optimalleaforder () 189s ***** error optimalleaforder (1) 189s ***** error optimalleaforder (ones (2, 2), 1) 189s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 189s ***** error optimalleaforder ([1 2 1], [1 2 3]) 189s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 189s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 189s 7 tests, 7 passed, 0 known failure, 0 skipped 189s [inst/anova2.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/anova2.m 189s ***** demo 189s 189s # Factorial (Crossed) Two-way ANOVA with Interaction 189s 189s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 189s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 189s 189s [p, atab, stats] = anova2(popcorn, 3, "on"); 189s ***** demo 189s 189s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 189s 189s data = [54, 43, 78, 111; 189s 23, 34, 37, 41; 189s 45, 65, 99, 78; 189s 31, 33, 36, 35; 189s 15, 25, 30, 26]; 189s 189s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 189s ***** demo 189s 189s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 189s 189s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 189s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 189s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 189s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 189s 189s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 189s ***** test 189s ## Test for anova2 ("interaction") 189s ## comparison with results from Matlab for column effect 189s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 189s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 189s [p, atab, stats] = anova2 (popcorn, 3, "off"); 189s assert (p(1), 7.678957383294716e-07, 1e-14); 189s assert (p(2), 0.0001003738963050171, 1e-14); 189s assert (p(3), 0.7462153966366274, 1e-14); 189s assert (atab{2,5}, 56.700, 1e-14); 189s assert (atab{2,3}, 2, 0); 189s assert (atab{4,2}, 0.08333333333333348, 1e-14); 189s assert (atab{5,4}, 0.1388888888888889, 1e-14); 189s assert (atab{5,2}, 1.666666666666667, 1e-14); 189s assert (atab{6,2}, 22); 189s assert (stats.source, "anova2"); 189s assert (stats.colmeans, [6.25, 4.75, 4]); 189s assert (stats.inter, 1, 0); 189s assert (stats.pval, 0.7462153966366274, 1e-14); 189s assert (stats.df, 12); 189s ***** test 189s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 189s data = [54, 43, 78, 111; 189s 23, 34, 37, 41; 189s 45, 65, 99, 78; 189s 31, 33, 36, 35; 189s 15, 25, 30, 26]; 189s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 189s assert (atab{2,2}, 2174.95, 1e-10); 189s assert (atab{3,2}, 8371.7, 1e-10); 189s assert (atab{4,2}, 2404.3, 1e-10); 189s assert (atab{5,2}, 12950.95, 1e-10); 189s assert (atab{2,4}, 724.983333333333, 1e-10); 189s assert (atab{3,4}, 2092.925, 1e-10); 189s assert (atab{4,4}, 200.358333333333, 1e-10); 189s assert (atab{2,5}, 3.61843363972882, 1e-10); 189s assert (atab{3,5}, 10.445909412303, 1e-10); 189s assert (atab{2,6}, 0.087266112738617, 1e-10); 189s assert (atab{3,6}, 0.000698397753556, 1e-10); 189s ***** test 189s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 189s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 189s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 189s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 189s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 189s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 189s assert (atab{2,2}, 745.360306290833, 1e-10); 189s assert (atab{3,2}, 278.01854140125, 1e-10); 189s assert (atab{4,2}, 180.180377467501, 1e-10); 189s assert (atab{5,2}, 1203.55922515958, 1e-10); 189s assert (atab{2,4}, 372.680153145417, 1e-10); 189s assert (atab{3,4}, 92.67284713375, 1e-10); 189s assert (atab{4,4}, 10.0100209704167, 1e-10); 189s assert (atab{2,5}, 4.02146005730833, 1e-10); 189s assert (atab{3,5}, 9.25800729165627, 1e-10); 189s assert (atab{2,6}, 0.141597630656771, 1e-10); 189s assert (atab{3,6}, 0.000636643812875719, 1e-10); 189s 3 tests, 3 passed, 0 known failure, 0 skipped 189s [inst/geomean.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/geomean.m 189s ***** test 189s x = [0:10]; 189s y = [x;x+5;x+10]; 189s assert (geomean (x), 0); 189s m = [0 9.462942809849169 14.65658770861967]; 189s assert (geomean (y, 2), m', 4e-14); 189s assert (geomean (y, "all"), 0); 189s y(2,4) = NaN; 189s m(2) = 9.623207231679554; 189s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 189s assert (geomean (y', "omitnan"), m, 4e-14); 189s z = y + 20; 189s assert (geomean (z, "all"), NaN); 189s assert (geomean (z, "all", "includenan"), NaN); 189s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 189s m = [24.79790781765634 NaN 34.85638839503932]; 189s assert (geomean (z'), m, 4e-14); 189s assert (geomean (z', "includenan"), m, 4e-14); 189s m(2) = 30.02181156156319; 189s assert (geomean (z', "omitnan"), m, 4e-14); 189s assert (geomean (z, 2, "omitnan"), m', 4e-14); 189s ***** test 189s x = repmat ([1:20;6:25], [5 2 6 3]); 189s assert (size (geomean (x, [3 2])), [10 1 1 3]); 189s assert (size (geomean (x, [1 2])), [1 1 6 3]); 189s assert (size (geomean (x, [1 2 4])), [1 1 6]); 189s assert (size (geomean (x, [1 4 3])), [1 40]); 189s assert (size (geomean (x, [1 2 3 4])), [1 1]); 189s ***** test 189s x = repmat ([1:20;6:25], [5 2 6 3]); 189s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 189s assert (geomean (x, [3 2]), m, 4e-13); 189s x(2,5,6,3) = NaN; 189s m(2,3) = NaN; 189s assert (geomean (x, [3 2]), m, 4e-13); 189s m(2,3) = 14.3292729579901; 189s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 189s ***** error geomean ("char") 189s ***** error geomean ([1 -1 3]) 189s ***** error ... 189s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 189s ***** error ... 189s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 189s ***** error ... 189s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 189s 8 tests, 8 passed, 0 known failure, 0 skipped 189s [inst/trimmean.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/trimmean.m 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s out = trimmean (x, 10, [1, 2]); 189s assert (out(1,1,1), 10.3889, 1e-4); 189s assert (out(1,1,2), 29.6111, 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s out = trimmean (x, 10, 1); 189s assert (out(:,:,1), [-17.6, 8, 13, 18]); 189s assert (out(:,:,2), [23, 28, 33, 10.6]); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, 1); 189s assert (out(:,:,1), [-23, 8, 13, 18]); 189s assert (out(:,:,2), [23, 28, 33, 3.75]); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s out = trimmean (x, 10, 2); 189s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 189s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, 2); 189s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 189s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s out = trimmean (x, 10, [1, 2, 3]); 189s assert (out, trimmean (x, 10, "all")); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, [1, 2]); 189s assert (out(1,1,1), 10.7647, 1e-4); 189s assert (out(1,1,2), 29.1176, 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, [1, 3]); 189s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, [2, 3]); 189s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, [1, 2, 3]); 189s assert (out, trimmean (x, 10, "all")); 189s ***** test 189s x = reshape (1:40, [5, 4, 2]); 189s x([3, 37]) = -100; 189s x([4, 38]) = NaN; 189s out = trimmean (x, 10, [2, 3, 5]); 189s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 189s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 189s ***** assert (trimmean ([], 10), NaN) 189s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 189s ***** error trimmean (1) 189s ***** error trimmean (1,2,3,4,5) 189s ***** error trimmean ([1 2 3 4], -10) 189s ***** error trimmean ([1 2 3 4], 100) 189s ***** error trimmean ([1 2 3 4], 10, "flag") 189s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 189s ***** error ... 189s trimmean ([1 2 3 4], 10, -1) 189s ***** error ... 189s trimmean ([1 2 3 4], 10, "floor", -1) 189s ***** error ... 189s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 189s ***** error ... 189s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 189s 26 tests, 26 passed, 0 known failure, 0 skipped 189s [inst/glmfit.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/glmfit.m 189s ***** demo 189s rand ("seed", 1); 189s X = rand (100, 1); 189s b_true = [0.5; -1.2]; 189s mu = exp (b_true(1) + b_true(2) * X); 189s randp ("seed", 1); 189s y = poissrnd (mu); 189s ## Fit a GLM model using the poisson distribution 189s [b,dev] = glmfit (X, y, 'poisson'); 189s ***** demo 189s x = [2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300]'; 189s n = [48 42 31 34 31 21 23 23 21 16 17 21]'; 189s y = [1 2 0 3 8 8 14 17 19 15 17 21]'; 189s [b,dev] = glmfit (x,[y n],'binomial','Link','probit'); 189s ***** test 189s rand ("seed", 1); 189s X = rand (50, 1); 189s b_true = [0.4; 1.5]; 189s mu_true = exp (b_true(1) + b_true(2) * X); 189s randp ("seed", 1); 189s y = poissrnd (mu_true); 189s b = glmfit (X, y, "poisson", "link", "log"); 189s assert (b(1), b_true(1), 0.5); 189s assert (b(2), b_true(2), 0.5); 189s ***** test 189s rand ("seed", 1); 189s X1 = rand (50, 1); 189s X2 = rand (50, 1) * 0.5; 189s b_true = [0.4; 1.5; -0.7]; 189s mu_true = exp (b_true(1) + b_true(2) * X1 + b_true(3) * X2); 189s randp ("seed", 1); 189s y = poissrnd(mu_true); 189s [b, dev] = glmfit ([X1, X2], y, "poisson", "link", "log"); 189s assert (b(1), b_true(1), 1); 189s assert (b(2), b_true(2), 1); 189s assert (b(3), b_true(3), 1); 189s assert (dev < 60, true); 189s ***** error glmfit () 189s ***** error glmfit (1) 189s ***** error glmfit (1, 2) 189s ***** error ... 189s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 189s ***** error ... 189s glmfit ('abc', rand (6, 1), 'poisson') 189s ***** error ... 189s glmfit (rand (5, 2), 'abc', 'poisson') 189s ***** error ... 189s glmfit (rand (5, 2), rand (6, 1), 'poisson') 189s ***** error ... 189s glmfit (rand (6, 2), rand (6, 1), 3) 189s ***** error ... 189s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 189s ***** error ... 189s glmfit (rand (5, 2), rand (5, 3), 'binomial') 189s ***** error ... 189s glmfit (rand (5, 2), rand (5, 2), 'normal') 189s ***** error ... 189s glmfit (rand (5, 2), rand (5, 1), 'gamma') 189s ***** error ... 189s glmfit (rand (5, 2), rand (5, 1), 'inverse gaussian') 189s ***** error ... 189s glmfit (rand (5, 2), rand (5, 1), 'loguniform') 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log','dfv','dfgvd'}) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@log, 'derivative', @exp}) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@exp, @log, @(x) eye(e)}) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 2) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 0) 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'log', 'constant', 'asda') 189s ***** error ... 189s glmfit (rand(5,2), rand(5,1), 'poisson', 'param', 'log', 'constant', 'on') 189s 26 tests, 26 passed, 0 known failure, 0 skipped 189s [inst/tiedrank.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/tiedrank.m 189s ***** test 189s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 189s assert (r, [1, 2.5, 4, 5, 2.5]); 189s assert (tieadj, 3); 189s ***** test 189s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 189s assert (r, [1; 2.5; 4; 5; 2.5]); 189s assert (tieadj, 3); 189s ***** test 189s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 189s assert (r, [1, 2.5, 4, 5, 2.5]); 189s assert (tieadj, [1; 0; 18]); 189s ***** test 189s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 189s assert (r, [1, 2.5, 2, 1, 2.5]); 189s assert (tieadj, 3); 189s ***** test 189s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 189s assert (r, [1, 2.5, 2, 1, 2.5]); 189s assert (tieadj, [1; 0; 18]); 189s ***** error tiedrank (ones (2)) 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], "A") 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], [true, true]) 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], 0, "A") 189s ***** error ... 189s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 189s 12 tests, 12 passed, 0 known failure, 0 skipped 189s [inst/adtest.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/adtest.m 189s ***** error adtest (); 189s ***** error adtest (ones (20,2)); 189s ***** error adtest ([1+i,0-3i]); 189s ***** error ... 189s adtest (ones (20,1), "Distribution", "normal"); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"norm", 5}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"ev", 5}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", 35); 189s ***** error ... 189s adtest (rand (20,1), "Name", "norm"); 189s ***** error ... 189s adtest (rand (20,1), "Name", {"norm", 75, 10}); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 189s ***** error ... 189s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 189s ***** error ... 189s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 189s "Asymptotic", true); 189s ***** error ... 189s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 189s "Alpha", 0.000000001); 189s ***** error ... 189s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 189s "Alpha", 0.999999999); 189s ***** error ... 189s adtest (10); 189s ***** warning ... 189s randn ("seed", 34); 189s adtest (ones (20,1), "Alpha", 0.000001); 189s ***** warning ... 189s randn ("seed", 34); 189s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 189s ***** warning ... 189s randn ("seed", 34); 189s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 189s ***** test 189s load examgrades 189s x = grades(:,1); 189s [h, pval, adstat, cv] = adtest (x); 189s assert (h, false); 189s assert (pval, 0.1854, 1e-4); 189s assert (adstat, 0.5194, 1e-4); 189s assert (cv, 0.7470, 1e-4); 189s ***** test 189s load examgrades 189s x = grades(:,1); 189s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 189s assert (h, false); 189s assert (pval, 0.071363, 1e-6); 189s ***** test 189s load examgrades 189s x = grades(:,1); 189s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 189s assert (h, false); 189s assert (pval, 0.4687, 1e-4); 189s 25 tests, 25 passed, 0 known failure, 0 skipped 189s [inst/ecdf.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ecdf.m 189s ***** demo 189s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 189s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 189s t = min (y, d); ## we observe the minimum of these times 189s censored = (y > d); ## we also observe whether the subject failed 189s 189s ## Calculate and plot the empirical cdf and confidence bounds 189s [f, x, flo, fup] = ecdf (t, "censoring", censored); 189s stairs (x, f); 189s hold on; 189s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 189s 189s ## Superimpose a plot of the known true cdf 189s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 189s hold off; 189s ***** demo 189s R = wblrnd (100, 2, 100, 1); 189s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 189s hold on 189s x = 1:1:250; 189s wblsurv = 1 - cdf ("weibull", x, 100, 2); 189s plot (x, wblsurv, "g-", "LineWidth", 2) 189s legend ("Empirical survivor function", "Lower confidence bound", ... 189s "Upper confidence bound", "Weibull survivor function", ... 189s "Location", "northeast"); 189s hold off 189s ***** error ecdf (); 189s ***** error ecdf (randi (15,2)); 189s ***** error ecdf ([3,2,4,3+2i,5]); 189s ***** error kstest ([2,3,4,5,6],"tail"); 189s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 189s ***** error kstest ([2,3,4,5,6],"function", ""); 189s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 189s ***** error kstest ([2,3,4,5,6],"tail", 0); 189s ***** error kstest ([2,3,4,5,6],"alpha", 0); 189s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 189s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 189s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 189s ***** test 189s hf = figure ("visible", "off"); 189s unwind_protect 189s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 189s [F, x, Flo, Fup] = ecdf (x); 189s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 189s assert (F, F_out, ones (10,1) * 1e-4); 189s x_out = [0 0 2 3 4 5 6 7 8 9]'; 189s assert (x, x_out); 189s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 189s assert (Flo, Flo_out, ones (10,1) * 1e-4); 189s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 189s assert (Fup, Fup_out, ones (10,1) * 1e-4); 189s unwind_protect_cleanup 189s close (hf); 189s end_unwind_protect 189s warning: using the gnuplot graphics toolkit is discouraged 189s 189s The gnuplot graphics toolkit is not actively maintained and has a number 189s of limitations that are unlikely to be fixed. Communication with gnuplot 189s uses a one-directional pipe and limited information is passed back to the 189s Octave interpreter so most changes made interactively in the plot window 189s will not be reflected in the graphics properties managed by Octave. For 189s example, if the plot window is closed with a mouse click, Octave will not 189s be notified and will not update its internal list of open figure windows. 189s The qt toolkit is recommended instead. 189s ***** test 189s hf = figure ("visible", "off"); 189s unwind_protect 189s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 189s ecdf (x); 189s unwind_protect_cleanup 189s close (hf); 189s end_unwind_protect 189s 14 tests, 14 passed, 0 known failure, 0 skipped 189s [inst/princomp.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/princomp.m 189s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 189s ***** test 189s x=[7 4 3 189s 4 1 8 189s 6 3 5 189s 8 6 1 189s 8 5 7 189s 7 2 9 189s 5 3 3 189s 9 5 8 189s 7 4 5 189s 8 2 2]; 189s R = corrcoef (x); 189s [V, lambda] = eig (R); 189s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 189s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 189s ## contribution of first 2 PCs to each original variable 189s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 189s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 189s F = zscore(x)*B; 189s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 189s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 189s ***** test 189s x=[1,2,3;2,1,3]'; 189s [COEFF,SCORE,latent,tsquare] = princomp(x); 189s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 189s m(:,1) = m(:,1)*sign(COEFF(1,1)); 189s m(:,2) = m(:,2)*sign(COEFF(1,2)); 189s ***** assert(COEFF,m(1:2,:),10*eps); 189s ***** assert(SCORE,-m,10*eps); 189s ***** assert(latent,[1.5;.5],10*eps); 189s ***** assert(tsquare,[4;4;4]/3,10*eps); 189s ***** test 189s x=x'; 189s [COEFF,SCORE,latent,tsquare] = princomp(x); 189s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 189s m(:,1) = m(:,1)*sign(COEFF(1,1)); 189s m(:,2) = m(:,2)*sign(COEFF(1,2)); 189s m(:,3) = m(:,3)*sign(COEFF(3,3)); 189s ***** assert(COEFF,m,10*eps); 189s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 189s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 189s ***** assert(latent,[1;0;0],10*eps); 189s ***** assert(tsquare,[0.5;0.5],10*eps) 189s ***** test 189s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 189s ***** assert(COEFF,m(:, 1),10*eps); 189s ***** assert(SCORE,-m(1:2,1),10*eps); 189s ***** assert(latent,[1],10*eps); 189s ***** assert(tsquare,[0.5;0.5],10*eps) 189s 19 tests, 19 passed, 0 known failure, 0 skipped 189s [inst/mcnemar_test.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/mcnemar_test.m 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 189s assert (h, 1); 189s assert (pval, 3.8151e-06, 1e-10); 189s assert (chisq, 21.356, 1e-3); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 189s assert (h, 1); 189s assert (pval, 0.034690, 1e-6); 189s assert (isempty (chisq), true); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 189s assert (h, 0); 189s assert (pval, 0.034690, 1e-6); 189s assert (isempty (chisq), true); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 189s assert (h, 1); 189s assert (pval, 0.034690, 1e-6); 189s assert (isempty (chisq), true); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 189s assert (h, 1); 189s assert (pval, 0.033006, 1e-6); 189s assert (chisq, 4.5455, 1e-4); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 189s assert (h, 0); 189s assert (pval, 0.052479, 1e-6); 189s assert (isempty (chisq), true); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 189s assert (h, 0); 189s assert (pval, 0.055009, 1e-6); 189s assert (chisq, 3.6818, 1e-4); 189s ***** test 189s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 189s assert (h, 1); 189s assert (pval, 0.055009, 1e-6); 189s assert (chisq, 3.6818, 1e-4); 189s ***** error mcnemar_test (59, 6, 16, 80) 189s ***** error mcnemar_test (ones (3, 3)) 189s ***** error ... 189s mcnemar_test ([59,6;16,-80]) 189s ***** error ... 189s mcnemar_test ([59,6;16,4.5]) 189s ***** error ... 189s mcnemar_test ([59,6;16,80], {""}) 189s ***** error ... 189s mcnemar_test ([59,6;16,80], -0.2) 189s ***** error ... 189s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 189s ***** error ... 189s mcnemar_test ([59,6;16,80], 1) 189s ***** error ... 189s mcnemar_test ([59,6;16,80], "") 189s 17 tests, 17 passed, 0 known failure, 0 skipped 189s [inst/fitgmdist.m] 189s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitgmdist.m 189s ***** demo 189s ## Generate a two-cluster problem 189s C1 = randn (100, 2) + 2; 189s C2 = randn (100, 2) - 2; 189s data = [C1; C2]; 189s 189s ## Perform clustering 189s GMModel = fitgmdist (data, 2); 189s 189s ## Plot the result 189s figure 189s [heights, bins] = hist3([C1; C2]); 189s [xx, yy] = meshgrid(bins{1}, bins{2}); 189s bbins = [xx(:), yy(:)]; 189s contour (reshape (GMModel.pdf (bbins), size (heights))); 189s ***** demo 189s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 189s nbOrientations = 2; 189s initial_orientations = [38.0; 18.0]; 189s initial_weights = ones (1, nbOrientations) / nbOrientations; 189s initial_Sigma = 10 * ones (1, 1, nbOrientations); 189s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 189s "ComponentProportion", initial_weights); 189s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 189s "RegularizationValue", 0.0001) 189s ***** test 189s load fisheriris 189s classes = unique (species); 189s [~, score] = pca (meas, "NumComponents", 2); 189s options.MaxIter = 1000; 189s options.TolFun = 1e-6; 189s options.Display = "off"; 189s GMModel = fitgmdist (score, 2, "Options", options); 189s assert (isa (GMModel, "gmdistribution"), true); 189s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 190s 1 test, 1 passed, 0 known failure, 0 skipped 190s [inst/crossval.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/crossval.m 190s ***** test 190s load fisheriris 190s y = meas(:, 1); 190s X = [ones(size(y)) meas(:, 2:4)]; 190s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 190s results0 = crossval (f, X, y); 190s results1 = crossval (f, X, y, 'KFold', 10); 190s folds = 5; 190s results2 = crossval (f, X, y, 'KFold', folds); 190s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 190s results4 = crossval (f, X, y, 'LeaveOut', 1); 190s mcreps = 2; n_holdout = 20; 190s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 190s 190s ## ensure equal representation of iris species in the training set -- tends 190s ## to slightly reduce cross-validation mean square error 190s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 190s 190s assert (results0, results1, 2e-15); 190s assert (results2, results3, 5e-17); 190s assert (size(results4), [1 numel(y)]); 190s assert (mean(results4), 0.1018, 1e-4); 190s assert (size(results5), [mcreps 1]); 190s warning: strmatch is obsolete; use strncmp or strcmp instead 190s 1 test, 1 passed, 0 known failure, 0 skipped 190s [inst/hmmgenerate.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hmmgenerate.m 190s ***** test 190s len = 25; 190s transprob = [0.8, 0.2; 0.4, 0.6]; 190s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 190s [sequence, states] = hmmgenerate (len, transprob, outprob); 190s assert (length (sequence), len); 190s assert (length (states), len); 190s assert (min (sequence) >= 1); 190s assert (max (sequence) <= columns (outprob)); 190s assert (min (states) >= 1); 190s assert (max (states) <= rows (transprob)); 190s ***** test 190s len = 25; 190s transprob = [0.8, 0.2; 0.4, 0.6]; 190s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 190s symbols = {"A", "B", "C"}; 190s statenames = {"One", "Two"}; 190s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 190s "symbols", symbols, "statenames", statenames); 190s assert (length (sequence), len); 190s assert (length (states), len); 190s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 190s strcmp (sequence, "C") == ones (1, len)); 190s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 190s 2 tests, 2 passed, 0 known failure, 0 skipped 190s [inst/cl_multinom.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cl_multinom.m 190s ***** demo 190s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 190s ***** error cl_multinom (); 190s ***** error cl_multinom (1, 2, 3, 4, 5); 190s ***** error ... 190s cl_multinom (1, 2, 3, 4); 190s ***** error ... 190s cl_multinom (1, 2, 3, "some string"); 190s 4 tests, 4 passed, 0 known failure, 0 skipped 190s [inst/fitlm.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitlm.m 190s ***** demo 190s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 190s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 190s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 190s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 190s 25.694 ]'; 190s 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]'; 190s 190s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 190s ***** demo 190s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 190s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 190s brands = {'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'}; 190s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 190s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 190s 190s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 190s "CategoricalVars",[1,2],"display","on"); 190s ***** test 190s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 190s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 190s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 190s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 190s 25.694 ]'; 190s 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]'; 190s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 190s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 190s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 190s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 190s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 190s assert (TAB{2,2}, 10, 1e-04); 190s assert (TAB{3,2}, 7.99999999999999, 1e-09); 190s assert (TAB{4,2}, 8.99999999999999, 1e-09); 190s assert (TAB{5,2}, 11.0001428571429, 1e-09); 190s assert (TAB{6,2}, 19.0001111111111, 1e-09); 190s assert (TAB{2,3}, 1.01775379540949, 1e-09); 190s assert (TAB{3,3}, 1.64107868458008, 1e-09); 190s assert (TAB{4,3}, 1.43932122062479, 1e-09); 190s assert (TAB{5,3}, 1.48983900477565, 1e-09); 190s assert (TAB{6,3}, 1.3987687997822, 1e-09); 190s assert (TAB{2,6}, 9.82555903510687, 1e-09); 190s assert (TAB{3,6}, 4.87484242844031, 1e-09); 190s assert (TAB{4,6}, 6.25294748040552, 1e-09); 190s assert (TAB{5,6}, 7.38344399756088, 1e-09); 190s assert (TAB{6,6}, 13.5834536158296, 1e-09); 190s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 190s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 190s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 190s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 190s ***** test 190s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 190s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 190s brands = bsxfun (@times, ones(6,1), [1,2,3]); 190s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 190s 190s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 190s "categoricalvars",[1,2],"display","off"); 190s assert (TAB{2,2}, 5.66666666666667, 1e-09); 190s assert (TAB{3,2}, -1.33333333333333, 1e-09); 190s assert (TAB{4,2}, -2.16666666666667, 1e-09); 190s assert (TAB{5,2}, 1.16666666666667, 1e-09); 190s assert (TAB{6,2}, -0.333333333333334, 1e-09); 190s assert (TAB{7,2}, -0.166666666666667, 1e-09); 190s assert (TAB{2,3}, 0.215165741455965, 1e-09); 190s assert (TAB{3,3}, 0.304290309725089, 1e-09); 190s assert (TAB{4,3}, 0.304290309725089, 1e-09); 190s assert (TAB{5,3}, 0.304290309725089, 1e-09); 190s assert (TAB{6,3}, 0.43033148291193, 1e-09); 190s assert (TAB{7,3}, 0.43033148291193, 1e-09); 190s assert (TAB{2,6}, 26.3362867542108, 1e-09); 190s assert (TAB{3,6}, -4.38178046004138, 1e-09); 190s assert (TAB{4,6}, -7.12039324756724, 1e-09); 190s assert (TAB{5,6}, 3.83405790253621, 1e-09); 190s assert (TAB{6,6}, -0.774596669241495, 1e-09); 190s assert (TAB{7,6}, -0.387298334620748, 1e-09); 190s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 190s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 190s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 190s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 190s assert (TAB{6,7}, 0.453570536021938, 1e-09); 190s assert (TAB{7,7}, 0.705316781644046, 1e-09); 190s ## Test with string ids for categorical variables 190s brands = {'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'; ... 190s 'Gourmet', 'National', 'Generic'}; 190s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 190s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 190s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 190s "categoricalvars",[1,2],"display","off"); 190s ***** test 190s load carsmall 190s X = [Weight,Horsepower,Acceleration]; 190s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 190s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 190s assert (TAB{2,2}, 47.9767628118615, 1e-09); 190s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 190s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 190s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 190s assert (TAB{2,3}, 3.87851641748551, 1e-09); 190s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 190s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 190s assert (TAB{5,3}, 0.193325043113178, 1e-09); 190s assert (TAB{2,6}, 12.369874881944, 1e-09); 190s assert (TAB{3,6}, -5.80228828790225, 1e-09); 190s assert (TAB{4,6}, -1.76626492228599, 1e-09); 190s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 190s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 190s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 190s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 190s assert (TAB{5,7}, 0.952359384151778, 1e-09); 190s 3 tests, 3 passed, 0 known failure, 0 skipped 190s [inst/confusionmat.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/confusionmat.m 190s ***** test 190s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 190s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 190s 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; ... 190s 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]; 190s assert (confusionmat (Yt, Yp), C) 190s 1 test, 1 passed, 0 known failure, 0 skipped 190s [inst/friedman.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/friedman.m 190s ***** demo 190s load popcorn; 190s friedman (popcorn, 3); 190s ***** demo 190s load popcorn; 190s [p, atab] = friedman (popcorn, 3, "off"); 190s disp (p); 190s ***** test 190s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 190s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 190s [p, atab] = friedman (popcorn, 3, "off"); 190s assert (p, 0.001028853354594794, 1e-14); 190s assert (atab{2,2}, 99.75, 1e-14); 190s assert (atab{2,3}, 2, 0); 190s assert (atab{2,4}, 49.875, 1e-14); 190s assert (atab{2,5}, 13.75862068965517, 1e-14); 190s assert (atab{2,6}, 0.001028853354594794, 1e-14); 190s assert (atab{3,2}, 0.08333333333333215, 1e-14); 190s assert (atab{3,4}, 0.04166666666666607, 1e-14); 190s assert (atab{4,3}, 12, 0); 190s ***** test 190s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 190s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 190s [p, atab, stats] = friedman (popcorn, 3, "off"); 190s assert (atab{5,2}, 116, 0); 190s assert (atab{5,3}, 17, 0); 190s assert (stats.source, "friedman"); 190s assert (stats.n, 2); 190s assert (stats.meanranks, [8, 4.75, 2.25], 0); 190s assert (stats.sigma, 2.692582403567252, 1e-14); 190s 2 tests, 2 passed, 0 known failure, 0 skipped 190s [inst/Classification/ClassificationKNN.m] 190s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationKNN.m 190s ***** demo 190s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 190s ## Evaluate some model predictions on new data. 190s 190s load fisheriris 190s x = meas; 190s y = species; 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 190s [label, score, cost] = predict (obj, xc) 190s ***** demo 190s load fisheriris 190s x = meas; 190s y = species; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 190s 190s ## Create a cross-validated model 190s CVMdl = crossval (obj) 190s ***** demo 190s load fisheriris 190s x = meas; 190s y = species; 190s covMatrix = cov (x); 190s 190s ## Fit the k-NN model using the 'mahalanobis' distance 190s ## and the custom covariance matrix 190s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 190s 'Cov', covMatrix); 190s 190s ## Create a partition model using cvpartition 190s Partition = cvpartition (size (x, 1), 'kfold', 12); 190s 190s ## Create cross-validated model using 'cvPartition' name-value argument 190s CVMdl = crossval (obj, 'cvPartition', Partition) 190s 190s ## Access the trained model from first fold of cross-validation 190s CVMdl.Trained{1} 190s ***** demo 190s X = [1, 2; 3, 4; 5, 6]; 190s Y = {'A'; 'B'; 'A'}; 190s model = fitcknn (X, Y); 190s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 190s ## Calculate loss using custom loss function 190s L = loss (model, X, Y, 'LossFun', customLossFun) 190s ***** demo 190s X = [1, 2; 3, 4; 5, 6]; 190s Y = {'A'; 'B'; 'A'}; 190s model = fitcknn (X, Y); 190s ## Calculate loss using 'mincost' loss function 190s L = loss (model, X, Y, 'LossFun', 'mincost') 190s ***** demo 190s X = [1, 2; 3, 4; 5, 6]; 190s Y = ['1'; '2'; '3']; 190s model = fitcknn (X, Y); 190s X_test = [3, 3; 5, 7]; 190s Y_test = ['1'; '2']; 190s ## Specify custom Weights 190s W = [1; 2]; 190s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 190s ***** demo 190s load fisheriris 190s mdl = fitcknn (meas, species); 190s X = mean (meas); 190s Y = {'versicolor'}; 190s m = margin (mdl, X, Y) 190s ***** demo 190s X = [1, 2; 4, 5; 7, 8; 3, 2]; 190s Y = [2; 1; 3; 2]; 190s ## Train the model 190s mdl = fitcknn (X, Y); 190s ## Specify Vars and Labels 190s Vars = 1; 190s Labels = 2; 190s ## Calculate partialDependence 190s [pd, x, y] = partialDependence (mdl, Vars, Labels); 190s ***** demo 190s X = [1, 2; 4, 5; 7, 8; 3, 2]; 190s Y = [2; 1; 3; 2]; 190s ## Train the model 190s mdl = fitcknn (X, Y); 190s ## Specify Vars and Labels 190s Vars = 1; 190s Labels = 1; 190s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 190s ## Calculate partialDependence using queryPoints 190s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 190s queryPoints) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s k = 10; 190s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = ones (4, 11); 190s y = ["a"; "a"; "b"; "b"]; 190s k = 10; 190s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s k = 10; 190s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s k = 10; 190s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s weights = ones (4,1); 190s a = ClassificationKNN (x, y, "Standardize", 1); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.Standardize}, {true}) 190s assert ({a.Sigma}, {std(x, [], 1)}) 190s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s weights = ones (4,1); 190s a = ClassificationKNN (x, y, "Standardize", false); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.Standardize}, {false}) 190s assert ({a.Sigma}, {[]}) 190s assert ({a.Mu}, {[]}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s s = ones (1, 3); 190s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.DistParameter}, {s}) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 190s assert (class (a), "ClassificationKNN"); 190s assert (a.DistParameter, 5) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 190s "NSMethod", "exhaustive"); 190s assert (class (a), "ClassificationKNN"); 190s assert (a.DistParameter, 5) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 190s assert (class (a), "ClassificationKNN"); 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 190s assert ({a.BucketSize}, {20}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y, "IncludeTies", true); 190s assert (class (a), "ClassificationKNN"); 190s assert (a.IncludeTies, true); 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y); 190s assert (class (a), "ClassificationKNN"); 190s assert (a.IncludeTies, false); 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s a = ClassificationKNN (x, y); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Prior, [0.5; 0.5]) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s prior = [0.5; 0.5]; 190s a = ClassificationKNN (x, y, "Prior", "empirical"); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Prior, prior) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "a"; "b"]; 190s prior = [0.75; 0.25]; 190s a = ClassificationKNN (x, y, "Prior", "empirical"); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Prior, prior) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "a"; "b"]; 190s prior = [0.5; 0.5]; 190s a = ClassificationKNN (x, y, "Prior", "uniform"); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Prior, prior) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s cost = eye (2); 190s a = ClassificationKNN (x, y, "Cost", cost); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Cost, [1, 0; 0, 1]) 190s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 190s y = ["a"; "a"; "b"; "b"]; 190s cost = eye (2); 190s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 190s assert (class (a), "ClassificationKNN") 190s assert (a.Cost, [1, 0; 0, 1]) 190s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 190s assert ({a.BucketSize}, {50}) 190s ***** test 190s x = [1, 2; 3, 4; 5,6; 5, 8]; 190s y = {'9'; '9'; '6'; '7'}; 190s a = ClassificationKNN (x, y); 190s assert (a.Prior, [0.5; 0.25; 0.25]) 190s ***** test 190s load fisheriris 190s x = meas; 190s y = species; 190s ClassNames = {'setosa', 'versicolor', 'virginica'}; 190s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 190s assert (a.ClassNames, ClassNames') 190s ***** error ClassificationKNN () 190s ***** error ... 190s ClassificationKNN (ones(4, 1)) 190s ***** error ... 190s ClassificationKNN (ones (4,2), ones (1,4)) 190s ***** error ... 190s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 190s ***** error ... 190s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 190s ***** error ... 190s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 190s ***** error ... 190s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 190s ***** error ... 190s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 190s ***** error ... 190s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 190s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 190s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 190s ***** error ... 190s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 190s ***** error ... 190s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 190s ***** error ... 190s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 190s ***** shared x, y 190s load fisheriris 190s x = meas; 190s y = species; 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 5); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"; "versicolor"; "virginica"}) 190s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 190s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"; "versicolor"; "virginica"}) 190s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 190s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 190s [l, s, c] = predict (obj, xc); 190s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 190s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"; "versicolor"; "virginica"}) 190s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 190s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 190s ***** test 190s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 190s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 190s obj = fitcknn (x, y, "NumNeighbors", 5); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 190s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 190s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 5); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 0.6, 0.4], 1e-4) 190s assert (c, [1, 0.4, 0.6], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 0.5, 0.5], 1e-4) 190s assert (c, [1, 0.5, 0.5], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"}) 190s assert (s, [0.9, 0.1, 0], 1e-4) 190s assert (c, [0.1, 0.9, 1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 190s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"}) 190s assert (s, [0.8, 0.2, 0], 1e-4) 190s assert (c, [0.2, 0.8, 1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 1, 0], 1e-4) 190s assert (c, [1, 0, 1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 0.7, 0.3], 1e-4) 190s assert (c, [1, 0.3, 0.7], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 0.6, 0.4], 1e-4) 190s assert (c, [1, 0.4, 0.6], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"virginica"}) 190s assert (s, [0, 0.1, 0.9], 1e-4) 190s assert (c, [1, 0.9, 0.1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"virginica"}) 190s assert (s, [0, 0.1, 0.9], 1e-4) 190s assert (c, [1, 0.9, 0.1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"versicolor"}) 190s assert (s, [0, 1, 0], 1e-4) 190s assert (c, [1, 0, 1], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"}) 190s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 190s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 190s ***** test 190s xc = [5, 3, 5, 1.45]; 190s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"}) 190s assert (s, [0.8, 0.2, 0], 1e-4) 190s assert (c, [0.2, 0.8, 1], 1e-4) 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa"; "versicolor"; "virginica"}) 190s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 190s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 190s ***** test 190s xc = [min(x); mean(x); max(x)]; 190s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 190s [l, s, c] = predict (obj, xc); 190s assert (l, {"setosa";"setosa";"setosa"}) 190s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 190s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 191s ***** error ... 191s predict (ClassificationKNN (ones (4,2), ones (4,1))) 191s ***** error ... 191s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 191s ***** error ... 191s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 191s ***** test 191s load fisheriris 191s model = fitcknn (meas, species, 'NumNeighbors', 5); 191s X = mean (meas); 191s Y = {'versicolor'}; 191s L = loss (model, X, Y); 191s assert (L, 0) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = {'A'; 'B'; 'A'}; 191s model = fitcknn (X, Y); 191s X_test = [1, 6; 3, 3]; 191s Y_test = {'A'; 'B'}; 191s L = loss (model, X_test, Y_test); 191s assert (abs (L - 0.6667) > 1e-5) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = {'A'; 'B'; 'A'}; 191s model = fitcknn (X, Y); 191s X_with_nan = [1, 2; NaN, 4]; 191s Y_test = {'A'; 'B'}; 191s L = loss (model, X_with_nan, Y_test); 191s assert (abs (L - 0.3333) < 1e-4) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = {'A'; 'B'; 'A'}; 191s model = fitcknn (X, Y); 191s X_with_nan = [1, 2; NaN, 4]; 191s Y_test = {'A'; 'B'}; 191s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 191s assert (isnan (L)) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = {'A'; 'B'; 'A'}; 191s model = fitcknn (X, Y); 191s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 191s L = loss (model, X, Y, 'LossFun', customLossFun); 191s assert (L, 0) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = [1; 2; 1]; 191s model = fitcknn (X, Y); 191s L = loss (model, X, Y, 'LossFun', 'classiferror'); 191s assert (L, 0) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = [true; false; true]; 191s model = fitcknn (X, Y); 191s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 191s assert (abs (L - 0.1269) < 1e-4) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = ['1'; '2'; '1']; 191s model = fitcknn (X, Y); 191s L = loss (model, X, Y, 'LossFun', 'classiferror'); 191s assert (L, 0) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = ['1'; '2'; '3']; 191s model = fitcknn (X, Y); 191s X_test = [3, 3]; 191s Y_test = ['1']; 191s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 191s assert (L, 1) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = ['1'; '2'; '3']; 191s model = fitcknn (X, Y); 191s X_test = [3, 3; 5, 7]; 191s Y_test = ['1'; '2']; 191s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 191s assert (L, 1) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = ['1'; '2'; '3']; 191s model = fitcknn (X, Y); 191s X_test = [3, 3; 5, 7]; 191s Y_test = ['1'; '2']; 191s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 191s assert (L, 1) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = ['1'; '2'; '3']; 191s model = fitcknn (X, Y); 191s X_test = [3, 3; 5, 7]; 191s Y_test = ['1'; '2']; 191s W = [1; 2]; 191s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 191s assert (abs (L - 0.6931) < 1e-4) 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1))) 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 191s ***** error ... 191s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 191s ***** error ... 191s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 191s ones (4,1), 'LossFun') 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 191s ones (4,1), 'LossFun', 'a') 191s ***** error ... 191s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 191s ones (4,1), 'Weights', 'w') 191s ***** test 191s load fisheriris 191s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 191s X = mean (meas); 191s Y = {'versicolor'}; 191s m = margin (mdl, X, Y); 191s assert (m, 1) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = [1; 2; 3]; 191s mdl = fitcknn (X, Y); 191s m = margin (mdl, X, Y); 191s assert (m, [1; 1; 1]) 191s ***** test 191s X = [7, 8; 9, 10]; 191s Y = ['1'; '2']; 191s mdl = fitcknn (X, Y); 191s m = margin (mdl, X, Y); 191s assert (m, [1; 1]) 191s ***** test 191s X = [11, 12]; 191s Y = {'1'}; 191s mdl = fitcknn (X, Y); 191s m = margin (mdl, X, Y); 191s assert (isnan (m)) 191s ***** test 191s X = [1, 2; 3, 4; 5, 6]; 191s Y = [1; 2; 3]; 191s mdl = fitcknn (X, Y); 191s X1 = [15, 16]; 191s Y1 = [1]; 191s m = margin (mdl, X1, Y1); 191s assert (m, -1) 191s ***** error ... 191s margin (ClassificationKNN (ones (4,2), ones (4,1))) 191s ***** error ... 191s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 191s ***** error ... 191s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 191s ***** error ... 191s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 191s ***** error ... 191s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 191s ***** shared X, Y, mdl 191s X = [1, 2; 4, 5; 7, 8; 3, 2]; 191s Y = [2; 1; 3; 2]; 191s mdl = fitcknn (X, Y); 191s ***** test 191s Vars = 1; 191s Labels = 2; 191s [pd, x, y] = partialDependence (mdl, Vars, Labels); 191s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000]; 191s assert (pd, pdm) 191s ***** test 191s Vars = 1; 191s Labels = 2; 191s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 191s 'NumObservationsToSample', 5); 191s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 191s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 191s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 191s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 191s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 191s assert (abs (pdm - pd) < 1) 191s ***** test 191s Vars = 1; 191s Labels = 2; 191s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 191s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000]; 191s assert (pd, pdm) 191s ***** test 191s Vars = [1, 2]; 191s Labels = 1; 191s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 191s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 191s queryPoints, 'UseParallel', true); 191s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 191s assert (pd, pdm) 191s ***** test 191s Vars = 1; 191s Labels = [1; 2]; 191s [pd, x, y] = partialDependence (mdl, Vars, Labels); 191s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 191s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 191s 0.5000, 0.5000, 0.5000]; 191s assert (pd, pdm) 192s ***** test 192s Vars = [1, 2]; 192s Labels = [1; 2]; 192s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 192s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 192s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 192s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 192s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 192s assert (pd, pdm) 192s ***** test 192s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 192s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 192s X = [X1, double(X2)]; 192s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 192s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 192s Vars = 1; 192s Labels = 1; 192s [pd, x, y] = partialDependence (mdl, Vars, Labels); 192s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 192s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 192s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 192s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 192s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 192s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 192s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 192s 0.7500, 0.7500, 0.7500]; 192s assert (pd, pdm) 192s ***** test 192s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 192s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 192s X = [X1, double(X2)]; 192s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 192s predictorNames = {'Feature1', 'Feature2'}; 192s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 192s Vars = 'Feature1'; 192s Labels = 1; 192s [pd, x, y] = partialDependence (mdl, Vars, Labels); 192s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 192s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 192s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 192s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 192s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 192s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 192s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 192s 0.7500, 0.7500, 0.7500]; 192s assert (pd, pdm) 192s ***** test 192s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 192s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 192s X = [X1, double(X2)]; 192s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 192s predictorNames = {'Feature1', 'Feature2'}; 192s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 192s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 192s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 192s new_X = [new_X1, double(new_X2)]; 192s Vars = 'Feature1'; 192s Labels = 1; 192s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 192s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 192s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 192s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 192s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 192s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 192s 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]; 192s assert (pd, pdm) 193s ***** error ... 193s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 193s ***** error ... 193s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 193s ***** error ... 193s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 193s ones (4,1), 'NumObservationsToSample') 193s ***** error ... 193s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 193s ones (4,1), 2) 193s ***** shared x, y, obj 193s load fisheriris 193s x = meas; 193s y = species; 193s covMatrix = cov (x); 193s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 193s 'mahalanobis', 'Cov', covMatrix); 193s ***** test 193s CVMdl = crossval (obj); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 193s assert (CVMdl.KFold == 10) 193s assert (CVMdl.ModelParameters.NumNeighbors == 5) 193s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 193s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 193s assert (!CVMdl.ModelParameters.Standardize) 193s ***** test 193s CVMdl = crossval (obj, "KFold", 5); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 193s assert (CVMdl.KFold == 5) 193s assert (CVMdl.ModelParameters.NumNeighbors == 5) 193s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 193s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 193s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 193s ***** test 193s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 193s CVMdl = crossval (obj, "HoldOut", 0.2); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 193s assert (CVMdl.ModelParameters.NumNeighbors == 5) 193s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 193s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 193s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 193s ***** test 193s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 193s CVMdl = crossval (obj, "LeaveOut", 'on'); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 193s assert (CVMdl.ModelParameters.NumNeighbors == 10) 193s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 193s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 193s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 193s ***** test 193s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 193s partition = cvpartition (y, 'KFold', 3); 193s CVMdl = crossval (obj, 'cvPartition', partition); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert (CVMdl.KFold == 3) 193s assert (CVMdl.ModelParameters.NumNeighbors == 10) 193s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 193s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 193s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 193s ***** error ... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 193s ***** error... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 193s ***** error ... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 193s ***** error ... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 193s ***** error ... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 193s ***** error ... 193s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 193s 162 tests, 162 passed, 0 known failure, 0 skipped 193s [inst/Classification/ClassificationSVM.m] 193s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationSVM.m 193s ***** demo 193s ## Create a Support Vector Machine classifier and determine margin for test 193s ## data. 193s load fisheriris 193s rng(1); ## For reproducibility 193s 193s ## Select indices of the non-setosa species 193s inds = !strcmp(species, 'setosa'); 193s 193s ## Select features and labels for non-setosa species 193s X = meas(inds, 3:4); 193s Y = grp2idx(species(inds)); 193s 193s ## Convert labels to +1 and -1 193s unique_classes = unique(Y); 193s Y(Y == unique_classes(1)) = -1; 193s Y(Y == unique_classes(2)) = 1; 193s 193s ## Partition data for training and testing 193s cv = cvpartition(Y, 'HoldOut', 0.15); 193s X_train = X(training(cv), :); 193s Y_train = Y(training(cv)); 193s X_test = X(test(cv), :); 193s Y_test = Y(test(cv)); 193s 193s ## Train the SVM model 193s CVSVMModel = fitcsvm(X_train, Y_train); 193s 193s ## Calculate margins 193s m = margin(CVSVMModel, X_test, Y_test); 193s disp(m); 193s ***** demo 193s ## Create a Support Vector Machine classifier and determine loss for test 193s ## data. 193s load fisheriris 193s rng(1); ## For reproducibility 193s 193s ## Select indices of the non-setosa species 193s inds = !strcmp(species, 'setosa'); 193s 193s ## Select features and labels for non-setosa species 193s X = meas(inds, 3:4); 193s Y = grp2idx(species(inds)); 193s 193s ## Convert labels to +1 and -1 193s unique_classes = unique(Y); 193s Y(Y == unique_classes(1)) = -1; 193s Y(Y == unique_classes(2)) = 1; 193s 193s ## Randomly partition the data into training and testing sets 193s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 193s 193s X_train = X(training(cv), :); 193s Y_train = Y(training(cv)); 193s 193s X_test = X(test(cv), :); 193s Y_test = Y(test(cv)); 193s 193s ## Train the SVM model 193s SVMModel = fitcsvm(X_train, Y_train); 193s 193s ## Calculate loss 193s 193s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 193s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 193s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 193s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 193s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 193s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 193s ***** test 193s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 193s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 193s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 193s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 193s assert (class (a), "ClassificationSVM"); 193s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 193s assert ({a.X, a.Y}, {x, y}) 193s assert (a.NumObservations, 5) 193s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 193s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 193s ***** test 193s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 193s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 193s a = ClassificationSVM (x, y); 193s assert (class (a), "ClassificationSVM"); 193s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 193s assert (a.ModelParameters.BoxConstraint, 1) 193s assert (a.ClassNames, [1; -1]) 193s assert (a.ModelParameters.KernelOffset, 0) 193s ***** test 193s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 193s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 193s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 193s "KernelOffset", 2); 193s assert (class (a), "ClassificationSVM"); 193s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 193s assert (a.ModelParameters.BoxConstraint, 2) 193s assert (a.ModelParameters.KernelOffset, 2) 193s ***** test 193s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 193s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 193s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 193s "PolynomialOrder", 3); 193s assert (class (a), "ClassificationSVM"); 193s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 193s assert (a.ModelParameters.PolynomialOrder, 3) 193s ***** error ClassificationSVM () 193s ***** error ... 193s ClassificationSVM (ones(10,2)) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (5,1)) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 193s ***** error ... 193s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 193s ***** error ... 193s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 193s ***** error ... 193s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 193s ***** error ... 193s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 193s ***** error ... 193s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 193s ***** error ... 193s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 193s ***** error ... 193s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 193s ***** error ... 193s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 193s ***** shared x, y, x_train, x_test, y_train, y_test, objST 193s load fisheriris 193s inds = ! strcmp (species, 'setosa'); 193s x = meas(inds, 3:4); 193s y = grp2idx (species(inds)); 193s ***** test 193s xc = [min(x); mean(x); max(x)]; 193s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 193s assert (isempty (obj.Alpha), true) 193s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 193s [label, score] = predict (obj, xc); 193s assert (label, [1; 2; 2]); 193s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 193s assert (score(:,1), -score(:,2), eps) 193s obj = fitPosterior (obj); 193s [label, probs] = predict (obj, xc); 193s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 1e-5); 193s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 193s ***** test 193s obj = fitcsvm (x, y); 193s assert (isempty (obj.Beta), true) 193s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 193s assert (numel (obj.Alpha), 24) 193s assert (obj.Bias, -14.415, 1e-3) 193s xc = [min(x); mean(x); max(x)]; 193s label = predict (obj, xc); 193s assert (label, [1; 2; 2]); 193s ***** error ... 193s predict (ClassificationSVM (ones (40,2), ones (40,1))) 193s ***** error ... 193s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 193s ***** error ... 193s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 193s ***** test 193s objST = fitcsvm (x, y); 193s objST.ScoreTransform = "a"; 193s ***** error ... 193s [labels, scores] = predict (objST, x); 193s ***** error ... 193s [labels, scores] = resubPredict (objST); 193s ***** test 193s rand ("seed", 1); 193s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 193s 'Tolerance', 1e-7); 193s obj = CVSVMModel.Trained{1}; 193s testInds = test (CVSVMModel.Partition); 193s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 193s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 193s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 193s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 193s assert (computed_margin, expected_margin, 1e-4); 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 193s ***** error ... 193s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 193s ***** test 193s rand ("seed", 1); 193s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 193s obj = CVSVMModel.Trained{1}; 193s testInds = test (CVSVMModel.Partition); 193s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 193s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 193s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 193s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 193s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 193s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 193s assert (L1, 2.8711, 1e-4); 193s assert (L2, 0.5333, 1e-4); 193s assert (L3, 10.9685, 1e-4); 193s assert (L4, 1.9827, 1e-4); 193s assert (L5, 1.5849, 1e-4); 193s assert (L6, 7.6739, 1e-4); 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones(2,1), "LossFun") 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "LossFun", 1) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "LossFun", "some") 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "Weights", ['a','b']) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "Weights", 'a') 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "Weights", [1,2,3]) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "Weights", 3) 193s ***** error ... 193s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 193s ones (2,1), "some", "some") 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 193s ***** error ... 193s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 193s ***** test 193s SVMModel = fitcsvm (x, y); 193s CVMdl = crossval (SVMModel, "KFold", 5); 193s assert (class (CVMdl), "ClassificationPartitionedModel") 193s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 193s assert (CVMdl.KFold == 5) 193s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 193s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 194s ***** test 194s obj = fitcsvm (x, y); 194s CVMdl = crossval (obj, "HoldOut", 0.2); 194s assert (class (CVMdl), "ClassificationPartitionedModel") 194s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 194s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 194s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 194s ***** test 194s obj = fitcsvm (x, y); 194s CVMdl = crossval (obj, "LeaveOut", 'on'); 194s assert (class (CVMdl), "ClassificationPartitionedModel") 194s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 194s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 194s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 194s "KFold", 5, "leaveout", 'on') 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 194s ***** error ... 194s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 194s 114 tests, 114 passed, 0 known failure, 0 skipped 194s [inst/Classification/CompactClassificationGAM.m] 194s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/CompactClassificationGAM.m 194s ***** demo 194s ## Create a generalized additive model classifier and its compact version 194s # and compare their size 194s 194s load fisheriris 194s X = meas; 194s Y = species; 194s 194s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 194s CMdl = crossval (Mdl); 194s 194s whos ('Mdl', 'CMdl') 194s ***** test 194s Mdl = CompactClassificationGAM (); 194s assert (class (Mdl), "CompactClassificationGAM") 194s ***** test 194s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 194s y = [0; 0; 1; 1]; 194s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 194s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 194s CMdl = compact (Mdl); 194s assert (class (CMdl), "CompactClassificationGAM"); 194s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 194s assert (CMdl.ClassNames, {'0'; '1'}) 194s assert (CMdl.PredictorNames, PredictorNames) 194s assert (CMdl.BaseModel.Intercept, 0) 195s ***** test 195s load fisheriris 195s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 195s X = meas(inds, :); 195s Y = species(inds, :)'; 195s Y = strcmp (Y, 'virginica')'; 195s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 195s CMdl = compact (Mdl); 195s assert (class (CMdl), "CompactClassificationGAM"); 195s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 195s assert (CMdl.ClassNames, {'0'; '1'}) 195s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 195s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 195s assert (CMdl.ModelwInt.Intercept, 0) 198s ***** test 198s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 198s Y = [0; 1; 0; 1; 1]; 198s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 198s CMdl = compact (Mdl); 198s assert (class (CMdl), "CompactClassificationGAM"); 198s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 198s assert (CMdl.ClassNames, {'0'; '1'}) 198s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 198s assert (CMdl.Knots, [4, 4, 4]) 198s assert (CMdl.Order, [3, 3, 3]) 198s assert (CMdl.DoF, [7, 7, 7]) 198s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 199s ***** error ... 199s CompactClassificationGAM (1) 199s ***** test 199s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 199s y = [1; 0; 1; 0; 1]; 199s Mdl = fitcgam (x, y, "interactions", "all"); 199s CMdl = compact (Mdl); 199s l = {'0'; '0'; '0'; '0'; '0'}; 199s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 199s 0.4259, 0.5741; 0.3760, 0.6240]; 199s [labels, scores] = predict (CMdl, x); 199s assert (class (CMdl), "CompactClassificationGAM"); 199s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 199s assert (CMdl.ClassNames, {'1'; '0'}) 199s assert (CMdl.PredictorNames, {'x1', 'x2'}) 199s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 199s assert (labels, l) 199s assert (scores, s, 1e-1) 200s ***** test 200s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 200s y = [0; 0; 1; 1]; 200s interactions = [false, true, false; true, false, true; false, true, false]; 200s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 200s CMdl = compact (Mdl); 200s [label, score] = predict (CMdl, x, "includeinteractions", true); 200s l = {'0'; '0'; '1'; '1'}; 200s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 200s assert (class (CMdl), "CompactClassificationGAM"); 200s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 200s assert (CMdl.ClassNames, {'0'; '1'}) 200s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 200s assert (CMdl.ModelwInt.Intercept, 0) 200s assert (label, l) 200s assert (score, s, 1e-1) 203s ***** shared CMdl 203s Mdl = fitcgam (ones (4,2), ones (4,1)); 203s CMdl = compact (Mdl); 203s ***** error ... 203s predict (CMdl) 203s ***** error ... 203s predict (CMdl, []) 203s ***** error ... 203s predict (CMdl, 1) 203s 10 tests, 10 passed, 0 known failure, 0 skipped 203s [inst/Classification/CompactClassificationDiscriminant.m] 203s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/CompactClassificationDiscriminant.m 203s ***** demo 203s ## Create a discriminant analysis classifier and its compact version 203s # and compare their size 203s 203s load fisheriris 203s X = meas; 203s Y = species; 203s 203s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 203s CMdl = crossval (Mdl); 203s 203s whos ('Mdl', 'CMdl') 203s ***** test 203s load fisheriris 203s x = meas; 203s y = species; 203s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 203s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 203s CMdl = compact (Mdl); 203s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 203s 0.092721, 0.115388, 0.055244, 0.032710; ... 203s 0.167514, 0.055244, 0.185188, 0.042665; ... 203s 0.038401, 0.032710, 0.042665, 0.041882]; 203s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 203s 5.9360, 2.7700, 4.2600, 1.3260; ... 203s 6.5880, 2.9740, 5.5520, 2.0260]; 203s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 203s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 203s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 203s assert (class (CMdl), "CompactClassificationDiscriminant"); 203s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 203s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 203s assert (CMdl.ClassNames, unique (species)) 203s assert (CMdl.Sigma, sigma, 1e-6) 203s assert (CMdl.Mu, mu, 1e-14) 203s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 203s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 203s assert (CMdl.PredictorNames, PredictorNames) 203s ***** test 203s load fisheriris 203s x = meas; 203s y = species; 203s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 203s CMdl = compact (Mdl); 203s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 203s 0.046361, 0.115388, 0.027622, 0.016355; ... 203s 0.083757, 0.027622, 0.185188, 0.021333; ... 203s 0.019201, 0.016355, 0.021333, 0.041882]; 203s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 203s 5.9360, 2.7700, 4.2600, 1.3260; ... 203s 6.5880, 2.9740, 5.5520, 2.0260]; 203s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 203s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 203s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 203s assert (class (CMdl), "CompactClassificationDiscriminant"); 203s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 203s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 203s assert (CMdl.ClassNames, unique (species)) 203s assert (CMdl.Sigma, sigma, 1e-6) 203s assert (CMdl.Mu, mu, 1e-14) 203s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 203s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 203s ***** error ... 203s CompactClassificationDiscriminant (1) 203s ***** test 203s load fisheriris 203s x = meas; 203s y = species; 203s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 203s CMdl = compact (Mdl); 203s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 203s assert (label, {'versicolor'}) 203s assert (score, [0, 0.9999, 0.0001], 1e-4) 203s assert (cost, [1, 0.0001, 0.9999], 1e-4) 203s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 203s assert (label, {'versicolor'}) 203s assert (score, [0, 0.6368, 0.3632], 1e-4) 203s assert (cost, [1, 0.3632, 0.6368], 1e-4) 203s ***** test 203s load fisheriris 203s x = meas; 203s y = species; 203s xc = [min(x); mean(x); max(x)]; 203s Mdl = fitcdiscr (x, y); 203s CMdl = compact (Mdl); 203s [label, score, cost] = predict (CMdl, xc); 203s l = {'setosa'; 'versicolor'; 'virginica'}; 203s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 203s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 203s assert (label, l) 203s assert (score, s, 1e-4) 203s assert (cost, c, 1e-4) 203s ***** shared MODEL 203s X = rand (10,2); 203s Y = [ones(5,1);2*ones(5,1)]; 203s MODEL = compact (ClassificationDiscriminant (X, Y)); 203s ***** error ... 203s predict (MODEL) 203s ***** error ... 203s predict (MODEL, []) 203s ***** error ... 203s predict (MODEL, 1) 203s ***** test 203s load fisheriris 203s model = fitcdiscr (meas, species); 203s x = mean (meas); 203s y = {'versicolor'}; 203s L = loss (model, x, y); 203s assert (L, 0) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6]; 203s y = {'A'; 'B'; 'A'}; 203s model = fitcdiscr (x, y, "Gamma", 0.4); 203s x_test = [1, 6; 3, 3]; 203s y_test = {'A'; 'B'}; 203s L = loss (model, x_test, y_test); 203s assert (L, 0.3333, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6; 7, 8]; 203s y = ['1'; '2'; '3'; '1']; 203s model = fitcdiscr (x, y, "gamma" , 0.5); 203s x_test = [3, 3]; 203s y_test = ['1']; 203s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 203s assert (L, 0.2423, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6; 7, 8]; 203s y = ['1'; '2'; '3'; '1']; 203s model = fitcdiscr (x, y, "gamma" , 0.5); 203s x_test = [3, 3; 5, 7]; 203s y_test = ['1'; '2']; 203s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 203s assert (L, 0.3333, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6; 7, 8]; 203s y = ['1'; '2'; '3'; '1']; 203s model = fitcdiscr (x, y, "gamma" , 0.5); 203s x_test = [3, 3; 5, 7]; 203s y_test = ['1'; '2']; 203s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 203s assert (L, 0.5886, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6; 7, 8]; 203s y = ['1'; '2'; '3'; '1']; 203s model = fitcdiscr (x, y, "gamma" , 0.5); 203s x_test = [3, 3; 5, 7]; 203s y_test = ['1'; '2']; 203s W = [1; 2]; 203s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 203s assert (L, 0.5107, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6]; 203s y = {'A'; 'B'; 'A'}; 203s model = fitcdiscr (x, y, "gamma" , 0.5); 203s x_with_nan = [1, 2; NaN, 4]; 203s y_test = {'A'; 'B'}; 203s L = loss (model, x_with_nan, y_test); 203s assert (L, 0.3333, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6]; 203s y = {'A'; 'B'; 'A'}; 203s model = fitcdiscr (x, y); 203s x_with_nan = [1, 2; NaN, 4]; 203s y_test = {'A'; 'B'}; 203s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 203s assert (isnan (L)) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6]; 203s y = {'A'; 'B'; 'A'}; 203s model = fitcdiscr (x, y); 203s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 203s L = loss (model, x, y, 'LossFun', customLossFun); 203s assert (L, 0.8889, 1e-4) 203s ***** test 203s x = [1, 2; 3, 4; 5, 6]; 203s y = [1; 2; 1]; 203s model = fitcdiscr (x, y); 203s L = loss (model, x, y, 'LossFun', 'classiferror'); 203s assert (L, 0.3333, 1e-4) 203s ***** error ... 203s loss (MODEL) 203s ***** error ... 203s loss (MODEL, ones (4,2)) 203s ***** error ... 203s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 203s ***** error ... 203s loss (MODEL, ones (4,2), ones (3,1)) 203s ***** error ... 203s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 203s ***** error ... 203s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 203s load fisheriris 203s mdl = fitcdiscr (meas, species); 203s X = mean (meas); 203s Y = {'versicolor'}; 203s m = margin (mdl, X, Y); 203s assert (m, 1, 1e-6) 203s ***** test 203s X = [1, 2; 3, 4; 5, 6]; 203s Y = [1; 2; 1]; 203s mdl = fitcdiscr (X, Y, "gamma", 0.5); 203s m = margin (mdl, X, Y); 203s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 203s ***** error ... 203s margin (MODEL) 203s ***** error ... 203s margin (MODEL, ones (4,2)) 203s ***** error ... 203s margin (MODEL, ones (4,2), ones (3,1)) 203s 28 tests, 28 passed, 0 known failure, 0 skipped 203s [inst/Classification/ClassificationNeuralNetwork.m] 203s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationNeuralNetwork.m 203s ***** error ... 203s ClassificationNeuralNetwork () 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2)) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 203s ***** error ... 203s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 203s "Activations", {"sigmoid", "unsupported_type"}) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 203s ***** error ... 203s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 203s ***** error ... 203s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 203s ***** error ... 203s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 203s 35 tests, 35 passed, 0 known failure, 0 skipped 203s [inst/Classification/ClassificationPartitionedModel.m] 203s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationPartitionedModel.m 203s ***** demo 203s 203s load fisheriris 203s x = meas; 203s y = species; 203s 203s ## Create a KNN classifier model 203s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 203s 203s ## Create a partition for 5-fold cross-validation 203s partition = cvpartition (y, "KFold", 5); 203s 203s ## Create the ClassificationPartitionedModel object 203s cvModel = crossval (obj, 'cvPartition', partition) 203s ***** demo 203s 203s load fisheriris 203s x = meas; 203s y = species; 203s 203s ## Create a KNN classifier model 203s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 203s 203s ## Create the ClassificationPartitionedModel object 203s cvModel = crossval (obj); 203s 203s ## Predict the class labels for the observations not used for training 203s [label, score, cost] = kfoldPredict (cvModel); 203s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 203s sum (strcmp (label, y)) / numel (y) *100, ... 203s sum (strcmp (label, y)), numel (y)) 203s ***** test 203s load fisheriris 203s a = fitcdiscr (meas, species, "gamma", 0.3); 203s cvModel = crossval (a, "KFold", 5); 203s assert (class (cvModel), "ClassificationPartitionedModel"); 203s assert (cvModel.NumObservations, 150); 203s assert (numel (cvModel.Trained), 5); 203s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 203s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 203s assert (cvModel.KFold, 5); 203s ***** test 203s load fisheriris 203s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 203s cvModel = crossval (a, "HoldOut", 0.3); 203s assert (class (cvModel), "ClassificationPartitionedModel"); 203s assert ({cvModel.X, cvModel.Y}, {meas, species}); 203s assert (cvModel.NumObservations, 150); 203s assert (numel (cvModel.Trained), 1); 203s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 203s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 203s ***** test 203s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 203s y = ["a"; "a"; "b"; "b"]; 203s a = fitcgam (x, y, "Interactions", "all"); 203s cvModel = crossval (a, "KFold", 5); 203s assert (class (cvModel), "ClassificationPartitionedModel"); 203s assert (cvModel.NumObservations, 4); 203s assert (numel (cvModel.Trained), 5); 203s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 203s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 203s assert (cvModel.KFold, 5); 221s ***** test 221s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 221s y = ["a"; "a"; "b"; "b"]; 221s a = fitcgam (x, y); 221s cvModel = crossval (a, "LeaveOut", "on"); 221s assert (class (cvModel), "ClassificationPartitionedModel"); 221s assert ({cvModel.X, cvModel.Y}, {x, y}); 221s assert (cvModel.NumObservations, 4); 221s assert (numel (cvModel.Trained), 4); 221s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 221s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 225s ***** test 225s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 225s y = ["a"; "a"; "b"; "b"]; 225s a = fitcknn (x, y); 225s partition = cvpartition (y, "KFold", 5); 225s cvModel = ClassificationPartitionedModel (a, partition); 225s assert (class (cvModel), "ClassificationPartitionedModel"); 225s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 225s assert (cvModel.NumObservations, 4); 225s assert (cvModel.ModelParameters.NumNeighbors, 1); 225s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 225s assert (cvModel.ModelParameters.Distance, "euclidean"); 225s assert (! cvModel.ModelParameters.Standardize); 225s ***** test 225s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 225s y = ["a"; "a"; "b"; "b"]; 225s a = fitcknn (x, y, "NSMethod", "exhaustive"); 225s partition = cvpartition (y, "HoldOut", 0.2); 225s cvModel = ClassificationPartitionedModel (a, partition); 225s assert (class (cvModel), "ClassificationPartitionedModel"); 225s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 225s assert ({cvModel.X, cvModel.Y}, {x, y}); 225s assert (cvModel.NumObservations, 4); 225s assert (cvModel.ModelParameters.NumNeighbors, 1); 225s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 225s assert (cvModel.ModelParameters.Distance, "euclidean"); 225s assert (! cvModel.ModelParameters.Standardize); 225s ***** test 225s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 225s y = ["a"; "a"; "b"; "b"]; 225s k = 3; 225s a = fitcknn (x, y, "NumNeighbors" ,k); 225s partition = cvpartition (y, "LeaveOut"); 225s cvModel = ClassificationPartitionedModel (a, partition); 225s assert (class (cvModel), "ClassificationPartitionedModel"); 225s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 225s assert ({cvModel.X, cvModel.Y}, {x, y}); 225s assert (cvModel.NumObservations, 4); 225s assert (cvModel.ModelParameters.NumNeighbors, k); 225s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 225s assert (cvModel.ModelParameters.Distance, "euclidean"); 225s assert (! cvModel.ModelParameters.Standardize); 225s ***** test 225s load fisheriris 225s inds = ! strcmp (species, 'setosa'); 225s x = meas(inds, 3:4); 225s y = grp2idx (species(inds)); 225s SVMModel = fitcsvm (x,y); 225s CVMdl = crossval (SVMModel, "KFold", 5); 225s assert (class (CVMdl), "ClassificationPartitionedModel") 225s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 225s assert (CVMdl.KFold == 5) 225s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 225s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 225s ***** test 225s load fisheriris 225s inds = ! strcmp (species, 'setosa'); 225s x = meas(inds, 3:4); 225s y = grp2idx (species(inds)); 225s obj = fitcsvm (x, y); 225s CVMdl = crossval (obj, "HoldOut", 0.2); 225s assert (class (CVMdl), "ClassificationPartitionedModel") 225s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 225s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 225s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 225s ***** test 225s load fisheriris 225s inds = ! strcmp (species, 'setosa'); 225s x = meas(inds, 3:4); 225s y = grp2idx (species(inds)); 225s obj = fitcsvm (x, y); 225s CVMdl = crossval (obj, "LeaveOut", 'on'); 225s assert (class (CVMdl), "ClassificationPartitionedModel") 225s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 225s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 225s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 225s ***** error ... 225s ClassificationPartitionedModel () 225s ***** error ... 225s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 225s ***** error ... 225s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 225s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 225s ***** error ... 225s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 225s ones (4,1)), 'Holdout') 225s ***** test 225s load fisheriris 225s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 225s cvModel = crossval (a, "Kfold", 4); 225s [label, score, cost] = kfoldPredict (cvModel); 225s assert (class(cvModel), "ClassificationPartitionedModel"); 225s assert ({cvModel.X, cvModel.Y}, {meas, species}); 225s assert (cvModel.NumObservations, 150); 225s ***** # assert (label, {"b"; "b"; "a"; "a"}); 225s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 225s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 225s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 225s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 225s ***** test 225s x = ones(4, 11); 225s y = {"a"; "a"; "b"; "b"}; 225s k = 3; 225s a = fitcknn (x, y, "NumNeighbors", k); 225s partition = cvpartition (y, "LeaveOut"); 225s cvModel = ClassificationPartitionedModel (a, partition); 225s [label, score, cost] = kfoldPredict (cvModel); 225s assert (class(cvModel), "ClassificationPartitionedModel"); 225s assert ({cvModel.X, cvModel.Y}, {x, y}); 225s assert (cvModel.NumObservations, 4); 225s assert (cvModel.ModelParameters.NumNeighbors, k); 225s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 225s assert (cvModel.ModelParameters.Distance, "euclidean"); 225s assert (! cvModel.ModelParameters.Standardize); 225s assert (label, {"b"; "b"; "a"; "a"}); 225s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 225s 0.6667, 0.3333], 1e-4); 225s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 225s 0.3333, 0.6667], 1e-4); 225s ***** error ... 225s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 226s 17 tests, 17 passed, 0 known failure, 0 skipped 226s [inst/Classification/CompactClassificationNeuralNetwork.m] 226s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/CompactClassificationNeuralNetwork.m 226s ***** demo 226s ## Create a neural network classifier and its compact version 226s # and compare their size 226s 226s load fisheriris 226s X = meas; 226s Y = species; 226s 226s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 226s CMdl = crossval (Mdl); 226s 226s whos ('Mdl', 'CMdl') 226s ***** error ... 226s CompactClassificationDiscriminant (1) 226s 1 test, 1 passed, 0 known failure, 0 skipped 226s [inst/Classification/ClassificationDiscriminant.m] 226s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationDiscriminant.m 226s ***** demo 226s ## Create discriminant classifier 226s ## Evaluate some model predictions on new data. 226s 226s load fisheriris 226s x = meas; 226s y = species; 226s xc = [min(x); mean(x); max(x)]; 226s obj = fitcdiscr (x, y); 226s [label, score, cost] = predict (obj, xc); 226s ***** demo 226s load fisheriris 226s model = fitcdiscr (meas, species); 226s X = mean (meas); 226s Y = {'versicolor'}; 226s ## Compute loss for discriminant model 226s L = loss (model, X, Y) 226s ***** demo 226s load fisheriris 226s mdl = fitcdiscr (meas, species); 226s X = mean (meas); 226s Y = {'versicolor'}; 226s ## Margin for discriminant model 226s m = margin (mdl, X, Y) 226s ***** demo 226s load fisheriris 226s x = meas; 226s y = species; 226s obj = fitcdiscr (x, y, "gamma", 0.4); 226s ## Cross-validation for discriminant model 226s CVMdl = crossval (obj) 226s ***** test 226s load fisheriris 226s x = meas; 226s y = species; 226s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 226s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 226s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 226s 0.092721, 0.115388, 0.055244, 0.032710; ... 226s 0.167514, 0.055244, 0.185188, 0.042665; ... 226s 0.038401, 0.032710, 0.042665, 0.041882]; 226s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 226s 5.9360, 2.7700, 4.2600, 1.3260; ... 226s 6.5880, 2.9740, 5.5520, 2.0260]; 226s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 226s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 226s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 226s assert (class (Mdl), "ClassificationDiscriminant"); 226s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 226s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 226s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 226s assert (Mdl.ClassNames, unique (species)) 226s assert (Mdl.Sigma, sigma, 1e-6) 226s assert (Mdl.Mu, mu, 1e-14) 226s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 226s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 226s assert (Mdl.PredictorNames, PredictorNames) 226s ***** test 226s load fisheriris 226s x = meas; 226s y = species; 226s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 226s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 226s 0.046361, 0.115388, 0.027622, 0.016355; ... 226s 0.083757, 0.027622, 0.185188, 0.021333; ... 226s 0.019201, 0.016355, 0.021333, 0.041882]; 226s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 226s 5.9360, 2.7700, 4.2600, 1.3260; ... 226s 6.5880, 2.9740, 5.5520, 2.0260]; 226s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 226s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 226s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 226s assert (class (Mdl), "ClassificationDiscriminant"); 226s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 226s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 226s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 226s assert (Mdl.ClassNames, unique (species)) 226s assert (Mdl.Sigma, sigma, 1e-6) 226s assert (Mdl.Mu, mu, 1e-14) 226s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 226s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 226s ***** shared X, Y, MODEL 226s X = rand (10,2); 226s Y = [ones(5,1);2*ones(5,1)]; 226s MODEL = ClassificationDiscriminant (X, Y); 226s ***** error ClassificationDiscriminant () 226s ***** error ... 226s ClassificationDiscriminant (ones(4, 1)) 226s ***** error ... 226s ClassificationDiscriminant (ones (4,2), ones (1,4)) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "ResponseName", 1) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 226s ***** error ... 226s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 226s ***** error ... 226s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 226s ***** error ... 226s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 226s ***** error ... 226s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "Cost", "string") 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 226s ***** error ... 226s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 226s ***** error ... 226s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 226s ***** error ... 226s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 226s ***** error ... 226s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 226s ***** error ... 226s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 226s ***** test 226s load fisheriris 226s x = meas; 226s y = species; 226s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 226s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 226s assert (label, {'versicolor'}) 226s assert (score, [0, 0.9999, 0.0001], 1e-4) 226s assert (cost, [1, 0.0001, 0.9999], 1e-4) 226s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 226s assert (label, {'versicolor'}) 226s assert (score, [0, 0.6368, 0.3632], 1e-4) 226s assert (cost, [1, 0.3632, 0.6368], 1e-4) 226s ***** test 226s load fisheriris 226s x = meas; 226s y = species; 226s xc = [min(x); mean(x); max(x)]; 226s Mdl = fitcdiscr (x, y); 226s [label, score, cost] = predict (Mdl, xc); 226s l = {'setosa'; 'versicolor'; 'virginica'}; 226s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 226s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 226s assert (label, l) 226s assert (score, s, 1e-4) 226s assert (cost, c, 1e-4) 226s ***** error ... 226s predict (MODEL) 226s ***** error ... 226s predict (MODEL, []) 226s ***** error ... 226s predict (MODEL, 1) 226s ***** test 226s load fisheriris 226s model = fitcdiscr (meas, species); 226s x = mean (meas); 226s y = {'versicolor'}; 226s L = loss (model, x, y); 226s assert (L, 0) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6]; 226s y = {'A'; 'B'; 'A'}; 226s model = fitcdiscr (x, y, "Gamma", 0.4); 226s x_test = [1, 6; 3, 3]; 226s y_test = {'A'; 'B'}; 226s L = loss (model, x_test, y_test); 226s assert (L, 0.3333, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6; 7, 8]; 226s y = ['1'; '2'; '3'; '1']; 226s model = fitcdiscr (x, y, "gamma" , 0.5); 226s x_test = [3, 3]; 226s y_test = ['1']; 226s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 226s assert (L, 0.2423, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6; 7, 8]; 226s y = ['1'; '2'; '3'; '1']; 226s model = fitcdiscr (x, y, "gamma" , 0.5); 226s x_test = [3, 3; 5, 7]; 226s y_test = ['1'; '2']; 226s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 226s assert (L, 0.3333, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6; 7, 8]; 226s y = ['1'; '2'; '3'; '1']; 226s model = fitcdiscr (x, y, "gamma" , 0.5); 226s x_test = [3, 3; 5, 7]; 226s y_test = ['1'; '2']; 226s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 226s assert (L, 0.5886, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6; 7, 8]; 226s y = ['1'; '2'; '3'; '1']; 226s model = fitcdiscr (x, y, "gamma" , 0.5); 226s x_test = [3, 3; 5, 7]; 226s y_test = ['1'; '2']; 226s W = [1; 2]; 226s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 226s assert (L, 0.5107, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6]; 226s y = {'A'; 'B'; 'A'}; 226s model = fitcdiscr (x, y, "gamma" , 0.5); 226s x_with_nan = [1, 2; NaN, 4]; 226s y_test = {'A'; 'B'}; 226s L = loss (model, x_with_nan, y_test); 226s assert (L, 0.3333, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6]; 226s y = {'A'; 'B'; 'A'}; 226s model = fitcdiscr (x, y); 226s x_with_nan = [1, 2; NaN, 4]; 226s y_test = {'A'; 'B'}; 226s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 226s assert (isnan (L)) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6]; 226s y = {'A'; 'B'; 'A'}; 226s model = fitcdiscr (x, y); 226s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 226s L = loss (model, x, y, 'LossFun', customLossFun); 226s assert (L, 0.8889, 1e-4) 226s ***** test 226s x = [1, 2; 3, 4; 5, 6]; 226s y = [1; 2; 1]; 226s model = fitcdiscr (x, y); 226s L = loss (model, x, y, 'LossFun', 'classiferror'); 226s assert (L, 0.3333, 1e-4) 226s ***** error ... 226s loss (MODEL) 226s ***** error ... 226s loss (MODEL, ones (4,2)) 226s ***** error ... 226s loss (MODEL, [], zeros (2)) 226s ***** error ... 226s loss (MODEL, 1, zeros (2)) 226s ***** error ... 226s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 226s ***** error ... 226s loss (MODEL, ones (4,2), ones (3,1)) 226s ***** error ... 226s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 226s ***** error ... 226s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 226s load fisheriris 226s mdl = fitcdiscr (meas, species); 226s X = mean (meas); 226s Y = {'versicolor'}; 226s m = margin (mdl, X, Y); 226s assert (m, 1, 1e-6) 226s ***** test 226s X = [1, 2; 3, 4; 5, 6]; 226s Y = [1; 2; 1]; 226s mdl = fitcdiscr (X, Y, "gamma", 0.5); 226s m = margin (mdl, X, Y); 226s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 226s ***** error ... 226s margin (MODEL) 226s ***** error ... 226s margin (MODEL, ones (4,2)) 226s ***** error ... 226s margin (MODEL, [], zeros (2)) 226s ***** error ... 226s margin (MODEL, 1, zeros (2)) 226s ***** error ... 226s margin (MODEL, ones (4,2), ones (3,1)) 226s ***** shared x, y, obj 226s load fisheriris 226s x = meas; 226s y = species; 226s obj = fitcdiscr (x, y, "gamma", 0.4); 226s ***** test 226s CVMdl = crossval (obj); 226s assert (class (CVMdl), "ClassificationPartitionedModel") 226s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 226s assert (CVMdl.KFold == 10) 226s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 226s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 226s ***** test 226s CVMdl = crossval (obj, "KFold", 3); 226s assert (class (CVMdl), "ClassificationPartitionedModel") 226s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 226s assert (CVMdl.KFold == 3) 226s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 226s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 226s ***** test 226s CVMdl = crossval (obj, "HoldOut", 0.2); 226s assert (class (CVMdl), "ClassificationPartitionedModel") 226s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 226s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 226s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 226s ***** test 226s CVMdl = crossval (obj, "LeaveOut", 'on'); 226s assert (class (CVMdl), "ClassificationPartitionedModel") 226s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 226s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 226s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 227s ***** test 227s partition = cvpartition (y, 'KFold', 3); 227s CVMdl = crossval (obj, 'cvPartition', partition); 227s assert (class (CVMdl), "ClassificationPartitionedModel") 227s assert (CVMdl.KFold == 3) 227s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 227s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 227s ***** error ... 227s crossval (obj, "kfold") 227s ***** error... 227s crossval (obj, "kfold", 12, "holdout", 0.2) 227s ***** error ... 227s crossval (obj, "kfold", 'a') 227s ***** error ... 227s crossval (obj, "holdout", 2) 227s ***** error ... 227s crossval (obj, "leaveout", 1) 227s ***** error ... 227s crossval (obj, "cvpartition", 1) 227s 65 tests, 65 passed, 0 known failure, 0 skipped 227s [inst/Classification/ClassificationGAM.m] 227s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ClassificationGAM.m 227s ***** demo 227s ## Train a GAM classifier for binary classification 227s ## using specific data and plot the decision boundaries. 227s 227s ## Define specific data 227s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 227s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 227s Y = [0; 0; 0; 0; 0; ... 227s 1; 1; 1; 1; 1]; 227s 227s ## Train the GAM model 227s obj = fitcgam (X, Y, "Interactions", "all") 227s 227s ## Create a grid of values for prediction 227s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 227s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 227s [x1G, x2G] = meshgrid (x1, x2); 227s XGrid = [x1G(:), x2G(:)]; 227s [labels, score] = predict (obj, XGrid); 227s ***** test 227s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 227s y = [0; 0; 1; 1]; 227s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 227s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 227s assert (class (a), "ClassificationGAM"); 227s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 227s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 227s assert (a.ClassNames, {'0'; '1'}) 227s assert (a.PredictorNames, PredictorNames) 227s assert (a.BaseModel.Intercept, 0) 228s ***** test 228s load fisheriris 228s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 228s X = meas(inds, :); 228s Y = species(inds, :)'; 228s Y = strcmp (Y, 'virginica')'; 228s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 228s assert (class (a), "ClassificationGAM"); 228s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 228s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 228s assert (a.ClassNames, {'0'; '1'}) 228s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 228s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 228s assert (a.ModelwInt.Intercept, 0) 231s ***** test 231s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 231s Y = [0; 1; 0; 1; 1]; 231s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 231s assert (class (a), "ClassificationGAM"); 231s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 231s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 231s assert (a.ClassNames, {'0'; '1'}) 231s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 231s assert (a.Knots, [4, 4, 4]) 231s assert (a.Order, [3, 3, 3]) 231s assert (a.DoF, [7, 7, 7]) 231s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 232s ***** error ClassificationGAM () 232s ***** error ... 232s ClassificationGAM (ones(4, 1)) 232s ***** error ... 232s ClassificationGAM (ones (4,2), ones (1,4)) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 232s ***** error ... 232s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 232s ***** error ... 232s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 232s ***** error ... 232s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 232s ***** error ... 232s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 232s ***** error ... 232s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 232s ***** error ... 232s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 232s ***** test 232s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 232s y = [1; 0; 1; 0; 1]; 232s a = ClassificationGAM (x, y, "interactions", "all"); 232s l = {'0'; '0'; '0'; '0'; '0'}; 232s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 232s 0.4259, 0.5741; 0.3760, 0.6240]; 232s [labels, scores] = predict (a, x); 232s assert (class (a), "ClassificationGAM"); 232s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 232s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 232s assert (a.ClassNames, {'1'; '0'}) 232s assert (a.PredictorNames, {'x1', 'x2'}) 232s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 232s assert (labels, l) 232s assert (scores, s, 1e-1) 233s ***** test 233s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 233s y = [0; 0; 1; 1]; 233s interactions = [false, true, false; true, false, true; false, true, false]; 233s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 233s [label, score] = predict (a, x, "includeinteractions", true); 233s l = {'0'; '0'; '1'; '1'}; 233s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 233s assert (class (a), "ClassificationGAM"); 233s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 233s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 233s assert (a.ClassNames, {'0'; '1'}) 233s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 233s assert (a.ModelwInt.Intercept, 0) 233s assert (label, l) 233s assert (score, s, 1e-1) 236s ***** error ... 236s predict (ClassificationGAM (ones (4,2), ones (4,1))) 236s ***** error ... 236s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 237s ***** error ... 237s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 237s ***** shared x, y, obj 237s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 237s y = [0; 0; 1; 1]; 237s obj = fitcgam (x, y); 238s ***** test 238s CVMdl = crossval (obj); 238s assert (class (CVMdl), "ClassificationPartitionedModel") 238s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 238s assert (CVMdl.KFold == 10) 238s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 238s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 247s ***** test 247s CVMdl = crossval (obj, "KFold", 5); 247s assert (class (CVMdl), "ClassificationPartitionedModel") 247s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 247s assert (CVMdl.KFold == 5) 247s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 247s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 251s ***** test 251s CVMdl = crossval (obj, "HoldOut", 0.2); 251s assert (class (CVMdl), "ClassificationPartitionedModel") 251s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 251s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 251s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 252s ***** test 252s partition = cvpartition (y, 'KFold', 3); 252s CVMdl = crossval (obj, 'cvPartition', partition); 252s assert (class (CVMdl), "ClassificationPartitionedModel") 252s assert (CVMdl.KFold == 3) 252s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 252s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 255s ***** error ... 255s crossval (obj, "kfold") 255s ***** error... 255s crossval (obj, "kfold", 12, "holdout", 0.2) 255s ***** error ... 255s crossval (obj, "kfold", 'a') 255s ***** error ... 255s crossval (obj, "holdout", 2) 255s ***** error ... 255s crossval (obj, "leaveout", 1) 255s ***** error ... 255s crossval (obj, "cvpartition", 1) 255s 34 tests, 34 passed, 0 known failure, 0 skipped 255s [inst/Classification/CompactClassificationSVM.m] 255s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/CompactClassificationSVM.m 255s ***** demo 255s ## Create a support vectors machine classifier and its compact version 255s # and compare their size 255s 255s load fisheriris 255s X = meas; 255s Y = species; 255s 255s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 255s CMdl = crossval (Mdl); 255s 255s whos ('Mdl', 'CMdl') 255s ***** error ... 255s CompactClassificationSVM (1) 255s ***** shared x, y, CMdl 255s load fisheriris 255s inds = ! strcmp (species, 'setosa'); 255s x = meas(inds, 3:4); 255s y = grp2idx (species(inds)); 255s ***** test 255s xc = [min(x); mean(x); max(x)]; 255s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 255s CMdl = compact (Mdl); 255s assert (isempty (CMdl.Alpha), true) 255s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 255s [label, score] = predict (CMdl, xc); 255s assert (label, [1; 2; 2]); 255s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 255s assert (score(:,1), -score(:,2), eps) 255s ***** test 255s Mdl = fitcsvm (x, y); 255s CMdl = compact (Mdl); 255s assert (isempty (CMdl.Beta), true) 255s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 255s assert (numel (CMdl.Alpha), 24) 255s assert (CMdl.Bias, -14.415, 1e-3) 255s xc = [min(x); mean(x); max(x)]; 255s label = predict (CMdl, xc); 255s assert (label, [1; 2; 2]); 255s ***** error ... 255s predict (CMdl) 255s ***** error ... 255s predict (CMdl, []) 255s ***** error ... 255s predict (CMdl, 1) 255s ***** test 255s CMdl.ScoreTransform = "a"; 255s ***** error ... 255s [labels, scores] = predict (CMdl, x); 255s ***** test 255s rand ("seed", 1); 255s C = cvpartition (y, 'HoldOut', 0.15); 255s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 255s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 255s CMdl = compact (Mdl); 255s testInds = test (C); 255s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 255s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 255s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 255s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 255s assert (computed_margin, expected_margin, 1e-4); 255s ***** error ... 255s margin (CMdl) 255s ***** error ... 255s margin (CMdl, zeros (2)) 255s ***** error ... 255s margin (CMdl, [], 1) 255s ***** error ... 255s margin (CMdl, 1, 1) 255s ***** error ... 255s margin (CMdl, [1, 2], []) 255s ***** error ... 255s margin (CMdl, [1, 2], [1; 2]) 255s ***** test 255s rand ("seed", 1); 255s C = cvpartition (y, 'HoldOut', 0.15); 255s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 255s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 255s CMdl = compact (Mdl); 255s testInds = test (C); 255s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 255s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 255s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 255s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 255s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 255s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 255s assert (L1, 2.8711, 1e-4); 255s assert (L2, 0.5333, 1e-4); 255s assert (L3, 10.9685, 1e-4); 255s assert (L4, 1.9827, 1e-4); 255s assert (L5, 1.5849, 1e-4); 255s assert (L6, 7.6739, 1e-4); 255s ***** error ... 255s loss (CMdl) 255s ***** error ... 255s loss (CMdl, zeros (2)) 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "LossFun") 255s ***** error ... 255s loss (CMdl, [], zeros (2)) 255s ***** error ... 255s loss (CMdl, 1, zeros (2)) 255s ***** error ... 255s loss (CMdl, [1, 2], []) 255s ***** error ... 255s loss (CMdl, [1, 2], [1; 2]) 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "LossFun", 1) 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "LossFun", "some") 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "Weights", 'a') 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 255s ***** error ... 255s loss (CMdl, [1, 2], 1, "some", "some") 255s 29 tests, 29 passed, 0 known failure, 0 skipped 255s [inst/Classification/ConfusionMatrixChart.m] 255s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Classification/ConfusionMatrixChart.m 255s ***** demo 255s ## Create a simple ConfusionMatrixChart Object 255s 255s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 255s NormalizedValues = cm.NormalizedValues 255s ClassLabels = cm.ClassLabels 255s ***** test 255s hf = figure ("visible", "off"); 255s unwind_protect 255s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 255s assert (isa (cm, "ConfusionMatrixChart"), true); 255s unwind_protect_cleanup 255s close (hf); 255s end_unwind_protect 255s 1 test, 1 passed, 0 known failure, 0 skipped 255s [inst/dendrogram.m] 255s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dendrogram.m 255s ***** demo 255s ## simple dendrogram 255s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 255s y(:,3) = 1:5; 255s dendrogram (y); 255s title ("simple dendrogram"); 255s ***** demo 255s ## another simple dendrogram 255s v = 2 * rand (30, 1) - 1; 255s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 255s y = linkage (squareform (d, "tovector")); 255s dendrogram (y); 255s title ("another simple dendrogram"); 255s ***** demo 255s ## collapsed tree, find all the leaves of node 5 255s X = randn (60, 2); 255s D = pdist (X); 255s y = linkage (D, "average"); 255s subplot (2, 1, 1); 255s title ("original tree"); 255s dendrogram (y, 0); 255s subplot (2, 1, 2); 255s title ("collapsed tree"); 255s [~, t] = dendrogram (y, 20); 255s find(t == 5) 255s ***** demo 255s ## optimal leaf order 255s X = randn (30, 2); 255s D = pdist (X); 255s y = linkage (D, "average"); 255s order = optimalleaforder (y, D); 255s subplot (2, 1, 1); 255s title ("original leaf order"); 255s dendrogram (y); 255s subplot (2, 1, 2); 255s title ("optimal leaf order"); 255s dendrogram (y, "Reorder", order); 255s ***** demo 255s ## horizontal orientation and labels 255s X = randn (8, 2); 255s D = pdist (X); 255s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 255s "Sneezy"; "Dopey"]; 255s y = linkage (D, "average"); 255s dendrogram (y, "Orientation", "left", "Labels", L); 255s title ("horizontal orientation and labels"); 255s ***** shared visibility_setting 255s visibility_setting = get (0, "DefaultFigureVisible"); 255s ***** test 255s hf = figure ("visible", "off"); 255s unwind_protect 255s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 255s y(:,3) = 1:5; 255s dendrogram (y); 255s unwind_protect_cleanup 255s close (hf); 255s end_unwind_protect 255s ***** test 255s hf = figure ("visible", "off"); 255s unwind_protect 255s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 255s y(:,3) = 1:5; 255s dendrogram (y); 255s unwind_protect_cleanup 255s close (hf); 255s end_unwind_protect 255s ***** test 255s hf = figure ("visible", "off"); 255s unwind_protect 255s v = 2 * rand (30, 1) - 1; 255s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 255s y = linkage (squareform (d, "tovector")); 255s dendrogram (y); 255s unwind_protect_cleanup 255s close (hf); 255s end_unwind_protect 256s ***** test 256s hf = figure ("visible", "off"); 256s unwind_protect 256s X = randn (30, 2); 256s D = pdist (X); 256s y = linkage (D, "average"); 256s order = optimalleaforder (y, D); 256s subplot (2, 1, 1); 256s title ("original leaf order"); 256s dendrogram (y); 256s subplot (2, 1, 2); 256s title ("optimal leaf order"); 256s dendrogram (y, "Reorder", order); 256s unwind_protect_cleanup 256s close (hf); 256s end_unwind_protect 257s ***** error dendrogram (); 257s ***** error dendrogram (ones (2, 2), 1); 257s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 257s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 257s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 257s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 257s 9 tests, 9 passed, 0 known failure, 0 skipped 257s [inst/runstest.m] 257s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/runstest.m 257s ***** test 257s ## NIST beam deflection data 257s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 257s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 257s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 257s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 257s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 257s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 257s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 257s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 257s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 257s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 257s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 257s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 257s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 257s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 257s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 257s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 257s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 257s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 257s [h, p, stats] = runstest (data, median (data)); 257s expected_h = 1; 257s expected_p = 0.008562; 257s expected_z = 2.6229; 257s assert (h, expected_h); 257s assert (p, expected_p, 1E-6); 257s assert (stats.z, expected_z, 1E-4); 257s ***** shared x 257s x = [45, -60, 1.225, 55.4, -9 27]; 257s ***** test 257s [h, p, stats] = runstest (x); 257s assert (h, 0); 257s assert (p, 0.6, 1e-14); 257s assert (stats.nruns, 5); 257s assert (stats.n1, 3); 257s assert (stats.n0, 3); 257s assert (stats.z, 0.456435464587638, 1e-14); 257s ***** test 257s [h, p, stats] = runstest (x, [], "method", "approximate"); 257s assert (h, 0); 257s assert (p, 0.6481, 1e-4); 257s assert (stats.z, 0.456435464587638, 1e-14); 257s ***** test 257s [h, p, stats] = runstest (x, [], "tail", "left"); 257s assert (h, 0); 257s assert (p, 0.9, 1e-14); 257s assert (stats.z, 1.369306393762915, 1e-14); 257s ***** error runstest (ones (2,20)) 257s ***** error runstest (["asdasda"]) 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], "updown") 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "method", "some") 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 257s ***** error ... 257s runstest ([2 3 4 3 2 3 4], [], "option", "some") 257s 14 tests, 14 passed, 0 known failure, 0 skipped 257s [inst/vartestn.m] 257s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/vartestn.m 257s ***** demo 257s ## Test the null hypothesis that the variances are equal across the five 257s ## columns of data in the students’ exam grades matrix, grades. 257s 257s load examgrades 257s vartestn (grades) 257s ***** demo 257s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 257s ## equal across different model years. 257s 257s load carsmall 257s vartestn (MPG, Model_Year) 257s ***** demo 257s ## Use Levene’s test to test the null hypothesis that the variances in miles 257s ## per gallon (MPG) are equal across different model years. 257s 257s load carsmall 257s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 257s ***** demo 257s ## Test the null hypothesis that the variances are equal across the five 257s ## columns of data in the students’ exam grades matrix, grades, using the 257s ## Brown-Forsythe test. Suppress the display of the summary table of 257s ## statistics and the box plot. 257s 257s load examgrades 257s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 257s ***** error vartestn (); 257s ***** error vartestn (1); 257s ***** error ... 257s vartestn ([1, 2, 3, 4, 5, 6, 7]); 257s ***** error ... 257s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 257s ***** error ... 257s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 257s ***** error ... 257s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 257s ***** error ... 257s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 257s ***** error ... 257s vartestn (ones (50,3), "Display", "some"); 257s ***** error ... 257s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 257s ***** error ... 257s vartestn (ones (50,3), [], "som"); 257s ***** error ... 257s vartestn (ones (50,3), [], "some", "some"); 257s ***** error ... 257s vartestn (ones (50,3), [1, 2], "Display", "off"); 257s ***** test 257s load examgrades 257s [p, stat] = vartestn (grades, "Display", "off"); 257s assert (p, 7.908647337018238e-08, 1e-14); 257s assert (stat.chisqstat, 38.7332, 1e-4); 257s assert (stat.df, 4); 257s ***** test 257s load examgrades 257s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 257s assert (p, 9.523239714592791e-07, 1e-14); 257s assert (stat.fstat, 8.5953, 1e-4); 257s assert (stat.df, [4, 595]); 257s ***** test 257s load examgrades 257s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 257s assert (p, 7.219514351897161e-07, 1e-14); 257s assert (stat.fstat, 8.7503, 1e-4); 257s assert (stat.df, [4, 595]); 257s ***** test 257s load examgrades 257s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 257s assert (p, 1.312093241723211e-06, 1e-14); 257s assert (stat.fstat, 8.4160, 1e-4); 257s assert (stat.df, [4, 595]); 257s ***** test 257s load examgrades 257s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 257s assert (p, 8.235660885480556e-07, 1e-14); 257s assert (stat.fstat, 8.6766, 1e-4); 257s assert (stat.df, [4, 595]); 257s 17 tests, 17 passed, 0 known failure, 0 skipped 257s [inst/hotelling_t2test.m] 257s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hotelling_t2test.m 257s ***** error hotelling_t2test (); 257s ***** error ... 257s hotelling_t2test (1); 257s ***** error ... 257s hotelling_t2test (ones(2,2,2)); 257s ***** error ... 257s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 257s ***** error ... 257s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 257s ***** error ... 257s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 257s ***** error ... 257s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 257s ***** error ... 257s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 257s ***** error ... 257s hotelling_t2test (ones(20,1), [0, 0]); 257s ***** error ... 257s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 257s ***** error ... 257s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 257s ***** test 257s randn ("seed", 1); 257s x = randn (50000, 5); 257s [h, pval, stats] = hotelling_t2test (x); 257s assert (h, 0); 257s assert (stats.df1, 5); 257s assert (stats.df2, 49995); 257s ***** test 257s randn ("seed", 1); 257s x = randn (50000, 5); 257s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 257s assert (h, 1); 257s assert (stats.df1, 5); 257s assert (stats.df2, 49995); 257s 13 tests, 13 passed, 0 known failure, 0 skipped 257s [inst/vartest.m] 257s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/vartest.m 257s ***** error vartest (); 257s ***** error vartest ([1, 2, 3, 4], -0.5); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 0); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "tail", "val"); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "dim", 3); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 257s ***** error ... 257s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 257s ***** test 257s load carsmall 257s [h, pval, ci] = vartest (MPG, 7^2); 257s assert (h, 1); 257s assert (pval, 0.04335086742174443, 1e-14); 257s assert (ci, [49.397; 88.039], 1e-3); 257s 12 tests, 12 passed, 0 known failure, 0 skipped 257s [inst/fitcgam.m] 257s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitcgam.m 257s ***** demo 257s ## Train a GAM classifier for binary classification 257s ## using specific data and plot the decision boundaries. 257s 257s ## Define specific data 257s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 257s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 257s Y = [0; 0; 0; 0; 0; ... 257s 1; 1; 1; 1; 1]; 257s 257s ## Train the GAM model 257s obj = fitcgam (X, Y, "Interactions", "all"); 257s 257s ## Create a grid of values for prediction 257s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 257s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 257s [x1G, x2G] = meshgrid (x1, x2); 257s XGrid = [x1G(:), x2G(:)]; 257s pred = predict (obj, XGrid); 257s 257s ## Plot decision boundaries and data points 257s predNumeric = str2double (pred); 257s gidx = predNumeric > 0.5; 257s 257s figure 257s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 257s hold on 257s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 257s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 257s xlabel("Feature 1"); 257s ylabel("Feature 2"); 257s title("Generalized Additive Model (GAM) Decision Boundary"); 257s legend({"Class 1 Region", "Class 0 Region", ... 257s "Class 1 Samples", "Class 0 Samples"}, ... 257s "location", "northwest") 257s axis tight 257s hold off 257s ***** test 257s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 257s y = [0; 0; 1; 1]; 257s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 257s a = fitcgam (x, y, "PredictorNames", PredictorNames); 257s assert (class (a), "ClassificationGAM"); 257s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 257s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 257s assert (a.ClassNames, {'0'; '1'}) 257s assert (a.PredictorNames, PredictorNames) 257s assert (a.BaseModel.Intercept, 0) 258s ***** test 258s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 258s y = [1; 0; 1; 0; 1]; 258s a = fitcgam (x, y, "interactions", "all"); 258s assert (class (a), "ClassificationGAM"); 258s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 258s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 258s assert (a.ClassNames, {'1'; '0'}) 258s assert (a.PredictorNames, {'x1', 'x2'}) 258s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 259s ***** test 259s load fisheriris 259s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 259s X = meas(inds, :); 259s Y = species(inds, :)'; 259s Y = strcmp (Y, 'virginica')'; 259s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 259s assert (class (a), "ClassificationGAM"); 259s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 259s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 259s assert (a.ClassNames, {'0'; '1'}) 259s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 259s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 259s assert (a.ModelwInt.Intercept, 0) 262s ***** error fitcgam () 262s ***** error fitcgam (ones (4,1)) 262s ***** error 262s fitcgam (ones (4,2), ones (4, 1), "K") 262s ***** error 262s fitcgam (ones (4,2), ones (3, 1)) 262s ***** error 262s fitcgam (ones (4,2), ones (3, 1), "K", 2) 262s 8 tests, 8 passed, 0 known failure, 0 skipped 262s [inst/regression_ttest.m] 262s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/regression_ttest.m 262s ***** error regression_ttest (); 262s ***** error regression_ttest (1); 262s ***** error ... 262s regression_ttest ([1 2 NaN]', [2 3 4]'); 262s ***** error ... 262s regression_ttest ([1 2 Inf]', [2 3 4]'); 262s ***** error ... 262s regression_ttest ([1 2 3+i]', [2 3 4]'); 262s ***** error ... 262s regression_ttest ([1 2 3]', [2 3 NaN]'); 262s ***** error ... 262s regression_ttest ([1 2 3]', [2 3 Inf]'); 262s ***** error ... 262s regression_ttest ([1 2 3]', [3 4 3+i]'); 262s ***** error ... 263s regression_ttest ([1 2 3]', [3 4 4 5]'); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 263s ***** error ... 263s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 263s 16 tests, 16 passed, 0 known failure, 0 skipped 263s [inst/ridge.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ridge.m 263s ***** demo 263s ## Perform ridge regression for a range of ridge parameters and observe 263s ## how the coefficient estimates change based on the acetylene dataset. 263s 263s load acetylene 263s 263s X = [x1, x2, x3]; 263s 263s x1x2 = x1 .* x2; 263s x1x3 = x1 .* x3; 263s x2x3 = x2 .* x3; 263s 263s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 263s 263s k = 0:1e-5:5e-3; 263s 263s b = ridge (y, D, k); 263s 263s figure 263s plot (k, b, "LineWidth", 2) 263s ylim ([-100, 100]) 263s grid on 263s xlabel ("Ridge Parameter") 263s ylabel ("Standardized Coefficient") 263s title ("Ridge Trace") 263s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 263s 263s ***** demo 263s 263s load carbig 263s X = [Acceleration Weight Displacement Horsepower]; 263s y = MPG; 263s 263s n = length(y); 263s 263s rand("seed",1); % For reproducibility 263s 263s c = cvpartition(n,'HoldOut',0.3); 263s idxTrain = training(c,1); 263s idxTest = ~idxTrain; 263s 263s idxTrain = training(c,1); 263s idxTest = ~idxTrain; 263s 263s k = 5; 263s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 263s 263s % Predict MPG values for the test data using the model. 263s yhat = b(1) + X(idxTest,:)*b(2:end); 263s scatter(y(idxTest),yhat) 263s 263s hold on 263s plot(y(idxTest),y(idxTest),"r") 263s xlabel('Actual MPG') 263s ylabel('Predicted MPG') 263s hold off 263s 263s ***** test 263s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 263s assert (b, [0.5533; 0.5533], 1e-4); 263s ***** test 263s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 263s assert (b, [0.4841; 0.4841], 1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0); 263s assert (b,[10.2273;1.97128;-0.601818],1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0.0005); 263s assert (b,[10.2233;1.9712;-0.6056],1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0.001); 263s assert (b,[10.2194;1.9711;-0.6094],1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0.002); 263s assert (b,[10.2116;1.9709;-0.6169],1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0.005); 263s assert (b,[10.1882;1.9704;-0.6393],1e-4); 263s ***** test 263s load acetylene 263s x = [x1, x2, x3]; 263s b = ridge (y, x, 0.01); 263s assert (b,[10.1497;1.9695;-0.6761],1e-4); 263s ***** error ridge (1) 263s ***** error ridge (1, 2) 263s ***** error ridge (ones (3), ones (3), 2) 263s ***** error ridge ([1, 2], ones (2), 2) 263s ***** error ridge ([], ones (3), 2) 263s ***** error ridge (ones (5,1), [], 2) 263s ***** error ... 263s ridge ([1; 2; 3; 4; 5], ones (3), 3) 263s ***** error ... 263s ridge ([1; 2; 3], ones (3), 3, 2) 263s ***** error ... 263s ridge ([1; 2; 3], ones (3), 3, "some") 263s 17 tests, 17 passed, 0 known failure, 0 skipped 263s [inst/sigma_pts.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/sigma_pts.m 263s ***** demo 263s K = [1 0.5; 0.5 1]; # covaraince matrix 263s # calculate and build associated ellipse 263s [R,S,~] = svd (K); 263s theta = atan2 (R(2,1), R(1,1)); 263s v = sqrt (diag (S)); 263s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 263s t = linspace (0, 2*pi, 100).'; 263s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 263s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 263s 263s figure(1); clf; hold on 263s # Plot ellipse and axes 263s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 263s plot (xe,ye,'-r'); 263s 263s col = 'rgb'; 263s l = [-1.8 -1 1.5]; 263s for li = 1:3 263s p = sigma_pts (2, [], K, l(li)); 263s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 263s p(1,1), p(1,2), ['o' col(li)]); 263s h(li) = tmp(1); 263s endfor 263s hold off 263s axis image 263s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 263s ***** test 263s p = sigma_pts (5); 263s assert (mean (p), zeros(1,5), sqrt(eps)); 263s assert (cov (p), eye(5), sqrt(eps)); 263s ***** test 263s m = randn(1, 5); 263s p = sigma_pts (5, m); 263s assert (mean (p), m, sqrt(eps)); 263s assert (cov (p), eye(5), sqrt(eps)); 263s ***** test 263s x = linspace (0,1,5); 263s K = exp (- (x.' - x).^2/ 0.5); 263s p = sigma_pts (5, [], K); 263s assert (mean (p), zeros(1,5), sqrt(eps)); 263s assert (cov (p), K, sqrt(eps)); 263s ***** error sigma_pts(2,1); 263s ***** error sigma_pts(2,[],1); 263s ***** error sigma_pts(2,1,1); 263s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 263s 7 tests, 7 passed, 0 known failure, 0 skipped 263s [inst/slicesample.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/slicesample.m 263s ***** demo 263s ## Define function to sample 263s d = 2; 263s mu = [-1; 2]; 263s rand ("seed", 5) # for reproducibility 263s Sigma = rand (d); 263s Sigma = (Sigma + Sigma'); 263s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 263s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 263s 263s ## Inputs 263s start = ones (1,2); 263s nsamples = 500; 263s K = 500; 263s m = 10; 263s rande ("seed", 4); rand ("seed", 5) # for reproducibility 263s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 263s figure; 263s hold on; 263s plot (smpl(:,1), smpl(:,2), 'x'); 263s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 263s z = reshape (pdf ([x(:), y(:)]), size(x)); 263s mesh (x, y, z, "facecolor", "None"); 263s 263s ## Using sample points to find the volume of half a sphere with radius of .5 263s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 263s int = mean (f (smpl) ./ pdf (smpl)); 263s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 263s trueerr = abs (2/3*pi*.25^(3/2)-int); 263s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 263s fprintf ("Monte Carlo integral error estimate %f\n", errest); 263s fprintf ("The actual error %f\n", trueerr); 263s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 263s ***** demo 263s ## Integrate truncated normal distribution to find normilization constant 263s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 263s nsamples = 1e3; 263s rande ("seed", 4); rand ("seed", 5) # for reproducibility 263s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 263s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 263s x = linspace (-3, 3, 1000); 263s area (x, f(x)); 263s xlabel ("x"); 263s ylabel ("f(x)"); 263s int = mean (f (smpl) ./ pdf (smpl)); 263s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 263s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 263s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 263s fprintf("Monte Carlo integral error estimate %f\n", errest); 263s fprintf("The actual error %f\n", trueerr); 263s ***** test 263s start = 0.5; 263s nsamples = 1e3; 263s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 263s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 263s assert (mean (smpl, 1), 1, .15); 263s assert (var (smpl, 1), 1, .25); 263s ***** error slicesample (); 263s ***** error slicesample (1); 263s ***** error slicesample (1, 1); 263s 4 tests, 4 passed, 0 known failure, 0 skipped 263s [inst/procrustes.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/procrustes.m 263s ***** demo 263s ## Create some random points in two dimensions 263s n = 10; 263s randn ("seed", 1); 263s X = normrnd (0, 1, [n, 2]); 263s 263s ## Those same points, rotated, scaled, translated, plus some noise 263s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 263s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 263s 263s ## Conform Y to X, plot original X and Y, and transformed Y 263s [d, Z] = procrustes (X, Y); 263s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 263s ***** demo 263s ## Find Procrustes distance and plot superimposed shape 263s 263s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 263s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 263s plot (X(:,1),X(:,2),"x"); 263s hold on 263s plot (Y(:,1),Y(:,2),"o"); 263s xlim ([0 100]); 263s ylim ([0 100]); 263s legend ("Target shape (X)", "Source shape (Y)"); 263s [d, Z] = procrustes (X, Y) 263s plot (Z(:,1), Z(:,2), "s"); 263s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 263s hold off 263s ***** demo 263s ## Apply Procrustes transformation to larger set of points 263s 263s ## Create matrices with landmark points for two triangles 263s X = [5, 0; 5, 5; 8, 5]; # target 263s Y = [0, 0; 1, 0; 1, 1]; # source 263s 263s ## Create a matrix with more points on the source triangle 263s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 263s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 263s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 263s 263s ## Plot both shapes, including the larger set of points for the source shape 263s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 263s hold on 263s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 263s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 263s xlim ([-1 10]); 263s ylim ([-1 6]); 263s legend ("Target shape (X)", "Source shape (Y)", ... 263s "More points on Y", "Location", "northwest"); 263s hold off 263s 263s ## Obtain the Procrustes transformation 263s [d, Z, transform] = procrustes (X, Y) 263s 263s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 263s ## on the source shape onto the target shape, and then visualize the results. 263s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 263s figure 263s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 263s hold on 263s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 263s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 263s xlim ([-1 10]); 263s ylim ([-1 6]); 263s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 263s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 263s legend ("Target shape (X)", "Source shape (Y)", ... 263s "More points on Y", "Transformed source shape (Z)", ... 263s "Transformed additional points", "Location", "northwest"); 263s hold off 263s ***** demo 263s ## Compare shapes without reflection 263s 263s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 263s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 263s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 263s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 263s plot (T(:,1), T(:,2), "x-"); 263s hold on 263s plot (S(:,1), S(:,2), "o-"); 263s legend ("Target shape (d)", "Source shape (b)"); 263s hold off 263s d_false = procrustes (T, S, "reflection", false); 263s printf ("Procrustes distance without reflection: %f\n", d_false); 263s d_true = procrustes (T, S, "reflection", true); 263s printf ("Procrustes distance with reflection: %f\n", d_true); 263s d_best = procrustes (T, S, "reflection", "best"); 263s printf ("Procrustes distance with best fit: %f\n", d_true); 263s ***** error procrustes (); 263s ***** error procrustes (1, 2, 3, 4, 5, 6); 263s ***** error ... 263s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 263s ***** error ... 263s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 263s ***** error ... 263s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 263s ***** error ... 263s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (11, 3)); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 4)); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), true); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 263s ***** error ... 263s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 263s 15 tests, 15 passed, 0 known failure, 0 skipped 263s [inst/bar3h.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/bar3h.m 263s ***** demo 263s ## Ploting 5 bars in the same series. 263s 263s y = [50; 40; 30; 20; 10]; 263s bar3h (y); 263s ***** demo 263s ## Ploting 5 bars in different groups. 263s 263s y = [50, 40, 30, 20, 10]; 263s bar3h (y); 263s ***** demo 263s ## A 3D bar graph with each series corresponding to a column in y. 263s 263s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 263s bar3h (y); 263s ***** demo 263s ## Specify z-axis locations as tick names. z must be a column vector! 263s 263s z = [1950, 1960, 1970, 1980, 1990]'; 263s y = [16, 8, 4, 2, 1]'; 263s bar3h (z, y); 263s ***** demo 263s ## Plot 3 series as a grouped plot without any space between the grouped bars 263s 263s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 263s bar3h (y, 1, 'grouped'); 263s ***** demo 263s ## Plot a stacked style 3D bar graph 263s 263s y = [19, 30, 21, 30; 40, 16, 32, 12]; 263s b = bar3h (y, 0.5, 'stacked'); 263s ***** error bar3h ("A") 263s ***** error bar3h ({2,3,4,5}) 263s ***** error ... 263s bar3h ([1,2,3]', ones (2)) 263s ***** error ... 263s bar3h ([1:5], 1.2) 263s ***** error ... 263s bar3h ([1:5]', ones (5), 1.2) 263s ***** error ... 263s bar3h ([1:5]', ones (5), [0.8, 0.7]) 263s ***** error ... 263s bar3h (ones (5), 'width') 263s ***** error ... 263s bar3h (ones (5), 'width', 1.2) 263s ***** error ... 263s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 263s ***** error ... 263s bar3h (ones (5), 'color') 263s ***** error ... 263s bar3h (ones (5), 'color', [0.8, 0.8]) 263s ***** error ... 263s bar3h (ones (5), 'color', "brown") 263s ***** error ... 263s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 263s ***** error ... 263s bar3h (ones (5), 'xlabel') 263s ***** error ... 263s bar3h (ones (5), 'xlabel', 4) 263s ***** error ... 263s bar3h (ones (5), 'zlabel') 263s ***** error ... 263s bar3h (ones (5), 'zlabel', 4) 263s ***** error bar3h (ones (5), 'this', 4) 263s ***** error ... 263s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 263s ***** error ... 263s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 263s 20 tests, 20 passed, 0 known failure, 0 skipped 263s [inst/linkage.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/linkage.m 263s ***** shared x, t 263s x = reshape (mod (magic (6),5), [], 3); 263s t = 1e-6; 263s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 263s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 263s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 263s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 263s lastwarn(); # Clear last warning before the test 263s ***** warning linkage (pdist (x), "centroid"); 263s ***** test 263s warning off Octave:clustering 263s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 263s warning on Octave:clustering 263s ***** warning linkage (pdist (x), "median"); 263s ***** test 263s warning off Octave:clustering 263s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 263s warning on Octave:clustering 263s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 263s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 263s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 263s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 263s 12 tests, 12 passed, 0 known failure, 0 skipped 263s [inst/combnk.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/combnk.m 263s ***** demo 263s c = combnk (1:5, 2); 263s disp ("All pairs of integers between 1 and 5:"); 263s disp (c); 263s ***** test 263s c = combnk (1:3, 2); 263s assert (c, [1, 2; 1, 3; 2, 3]); 263s ***** test 263s c = combnk (1:3, 6); 263s assert (isempty (c)); 263s ***** test 263s c = combnk ({1, 2, 3}, 2); 263s assert (c, {1, 2; 1, 3; 2, 3}); 263s ***** test 263s c = combnk ("hello", 2); 263s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 263s 4 tests, 4 passed, 0 known failure, 0 skipped 263s [inst/binotest.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/binotest.m 263s ***** demo 263s % flip a coin 1000 times, showing 475 heads 263s % Hypothesis: coin is fair, i.e. p=1/2 263s [h,p_val,ci] = binotest(475,1000,0.5) 263s % Result: h = 0 : null hypothesis not rejected, coin could be fair 263s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 263s % 0.444 <= p <= 0.506 with 95% confidence 263s ***** demo 263s % flip a coin 100 times, showing 65 heads 263s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 263s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 263s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 263s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 263s % 0 <= p <= 0.76 with 99% confidence 263s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 263s [h,p_val,ci] = binotest (51,235,1/6); 263s assert (p_val, 0.0437, 0.00005) 263s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 263s assert (p_val, 0.027, 0.0005) 263s 1 test, 1 passed, 0 known failure, 0 skipped 263s [inst/levene_test.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/levene_test.m 263s ***** error levene_test () 263s ***** error ... 263s levene_test (1, 2, 3, 4, 5); 263s ***** error levene_test (randn (50, 2), 0); 263s ***** error ... 263s levene_test (randn (50, 2), [1, 2, 3]); 263s ***** error ... 263s levene_test (randn (50, 1), ones (55, 1)); 263s ***** error ... 263s levene_test (randn (50, 1), ones (50, 2)); 263s ***** error ... 263s levene_test (randn (50, 2), [], 1.2); 263s ***** error ... 263s levene_test (randn (50, 2), "some_string"); 263s ***** error ... 263s levene_test (randn (50, 2), [], "alpha"); 263s ***** error ... 263s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 263s ***** error ... 263s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 263s ***** error ... 263s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 263s ***** warning ... 263s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades); 263s assert (h, 1); 263s assert (pval, 9.523239714592791e-07, 1e-14); 263s assert (W, 8.59529, 1e-5); 263s assert (df, [4, 595]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 263s assert (h, 1); 263s assert (pval, 9.523239714592791e-07, 1e-14); 263s assert (W, 8.59529, 1e-5); 263s assert (df, [4, 595]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades, [], "median"); 263s assert (h, 1); 263s assert (pval, 1.312093241723211e-06, 1e-14); 263s assert (W, 8.415969, 1e-6); 263s assert (df, [4, 595]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades(:,[1:3])); 263s assert (h, 1); 263s assert (pval, 0.004349390980463497, 1e-14); 263s assert (W, 5.52139, 1e-5); 263s assert (df, [2, 357]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 263s assert (h, 1); 263s assert (pval, 0.004355216763951453, 1e-14); 263s assert (W, 5.52001, 1e-5); 263s assert (df, [2, 357]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 263s assert (h, 0); 263s assert (pval, 0.1807494957440653, 2e-14); 263s assert (W, 1.80200, 1e-5); 263s assert (df, [1, 238]); 263s ***** test 263s load examgrades 263s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 263s assert (h, 0); 263s assert (pval, 0.1978225622063785, 2e-14); 263s assert (W, 1.66768, 1e-5); 263s assert (df, [1, 238]); 263s 20 tests, 20 passed, 0 known failure, 0 skipped 263s [inst/evalclusters.m] 263s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/evalclusters.m 263s ***** demo 263s load fisheriris; 263s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 263s plot (eva) 263s ***** error evalclusters () 263s ***** error evalclusters ([1 1;0 1]) 264s ***** error evalclusters ([1 1;0 1], "kmeans") 264s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 264s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 264s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 264s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 264s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 264s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 264s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 264s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 264s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 264s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 264s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 264s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 264s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 264s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 264s "distance", "a") 264s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 264s "distance", "a") 264s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 264s "clusterpriors", "equal") 264s ***** error evalclusters ([1 1;0 1], [1; 2], ... 264s "silhouette", "clusterpriors", "xxx") 264s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 264s ***** test 264s load fisheriris; 264s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 264s assert (isa (eva, "CalinskiHarabaszEvaluation")); 264s assert (eva.NumObservations, 150); 264s assert (eva.OptimalK, 3); 264s assert (eva.InspectedK, [1 2 3 4 5 6]); 264s 22 tests, 22 passed, 0 known failure, 0 skipped 264s [inst/einstein.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/einstein.m 264s ***** demo 264s einstein (0.4, 0.6) 264s ***** demo 264s einstein (0.2, 0.5) 264s ***** demo 264s einstein (0.6, 0.1) 264s ***** test 264s hf = figure ("visible", "off"); 264s unwind_protect 264s tiles = einstein (0.4, 0.6); 264s assert (isstruct (tiles), true); 264s unwind_protect_cleanup 264s close (hf); 264s end_unwind_protect 264s ***** error einstein 264s ***** error einstein (0.5) 264s ***** error einstein (0, 0.9) 264s ***** error einstein (0.4, 1) 264s ***** error einstein (-0.4, 1) 264s 6 tests, 6 passed, 0 known failure, 0 skipped 264s [inst/fitcdiscr.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitcdiscr.m 264s ***** demo 264s ## Train a linear discriminant classifier for Gamma = 0.5 264s ## and plot the decision boundaries. 264s 264s load fisheriris 264s idx = ! strcmp (species, "setosa"); 264s X = meas(idx,3:4); 264s Y = cast (strcmpi (species(idx), "virginica"), "double"); 264s obj = fitcdiscr (X, Y, "Gamma", 0.5) 264s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 264s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 264s [x1G, x2G] = meshgrid (x1, x2); 264s XGrid = [x1G(:), x2G(:)]; 264s pred = predict (obj, XGrid); 264s gidx = logical (str2num (cell2mat (pred))); 264s 264s figure 264s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 264s hold on 264s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 264s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 264s xlabel ("Petal length (cm)"); 264s ylabel ("Petal width (cm)"); 264s title ("Linear Discriminant Analysis Decision Boundary"); 264s legend ({"Versicolor Region", "Virginica Region", ... 264s "Sampled Versicolor", "Sampled Virginica"}, ... 264s "location", "northwest") 264s axis tight 264s hold off 264s ***** test 264s load fisheriris 264s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 264s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 264s assert (label, {'versicolor'}) 264s assert (score, [0, 0.9999, 0.0001], 1e-4) 264s assert (cost, [1, 0.0001, 0.9999], 1e-4) 264s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 264s assert (label, {'versicolor'}) 264s assert (score, [0, 0.6368, 0.3632], 1e-4) 264s assert (cost, [1, 0.3632, 0.6368], 1e-4) 264s assert (class (Mdl), "ClassificationDiscriminant"); 264s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 264s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 264s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 264s assert (Mdl.ClassNames, unique (species)) 264s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 264s 0.046361, 0.115388, 0.027622, 0.016355; ... 264s 0.083757, 0.027622, 0.185188, 0.021333; ... 264s 0.019201, 0.016355, 0.021333, 0.041882]; 264s assert (Mdl.Sigma, sigma, 1e-6) 264s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 264s 5.9360, 2.7700, 4.2600, 1.3260; ... 264s 6.5880, 2.9740, 5.5520, 2.0260]; 264s assert (Mdl.Mu, mu, 1e-14) 264s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 264s ***** error fitcdiscr () 264s ***** error fitcdiscr (ones (4,1)) 264s ***** error 264s fitcdiscr (ones (4,2), ones (4, 1), "K") 264s ***** error 264s fitcdiscr (ones (4,2), ones (3, 1)) 264s ***** error 264s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 264s 6 tests, 6 passed, 0 known failure, 0 skipped 264s [inst/ttest2.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ttest2.m 264s ***** test 264s a = 1:5; 264s b = 6:10; 264s b(5) = NaN; 264s [h,p,ci,stats] = ttest2 (a,b); 264s assert (h, 1); 264s assert (p, 0.002535996080258229, 1e-14); 264s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 264s assert (stats.tstat, -4.582575694955839, 1e-14); 264s assert (stats.df, 7); 264s assert (stats.sd, 1.4638501094228, 1e-13); 264s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 264s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 264s 3 tests, 3 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/logllike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/logllike.m 264s ***** test 264s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 264s assert (nlogL, 211.2965, 1e-4); 264s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 264s ***** test 264s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 264s assert (nlogL, 9.2206, 1e-4); 264s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 264s ***** error logllike (3.25) 264s ***** error logllike ([5, 0.2], ones (2)) 264s ***** error ... 264s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 264s ***** error ... 264s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 264s ***** error ... 264s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 264s ***** error ... 264s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 264s 8 tests, 8 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/wbllike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/wbllike.m 264s ***** test 264s x = 1:50; 264s [nlogL, acov] = wbllike ([2.3, 1.2], x); 264s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 264s assert (nlogL, 945.9589180651594, 1e-12); 264s assert (acov, avar_out, 1e-4); 264s ***** test 264s x = 1:50; 264s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 264s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 264s assert (nlogL, 424.9879809704742, 6e-14); 264s assert (acov, avar_out, 1e-4); 264s ***** test 264s x = 1:50; 264s [nlogL, acov] = wbllike ([21, 15], x); 264s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 264s assert (nlogL, 1635190.328991511, 1e-8); 264s assert (acov, avar_out, 1e-8); 264s ***** error wbllike ([12, 15]); 264s ***** error wbllike ([12, 15, 3], [1:50]); 264s ***** error wbllike ([12, 3], ones (10, 2)); 264s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 264s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 264s ***** error ... 264s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 264s 9 tests, 9 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/gumbellike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gumbellike.m 264s ***** test 264s x = 1:50; 264s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 264s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 264s assert (nlogL, 3.242264755689906e+17, 1e-14); 264s assert (avar, avar_out, 1e-3); 264s ***** test 264s x = 1:50; 264s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 264s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 264s assert (nlogL, 481898704.0472211, 1e-6); 264s assert (avar, avar_out, 1e-3); 264s ***** test 264s x = 1:50; 264s [nlogL, avar] = gumbellike ([21, 15], x); 264s avar_out = [11.73913876598908, -5.9546128523121216; ... 264s -5.954612852312121, 3.708060045170236]; 264s assert (nlogL, 223.7612479380652, 1e-13); 264s assert (avar, avar_out, 1e-14); 264s ***** error gumbellike ([12, 15]); 264s ***** error gumbellike ([12, 15, 3], [1:50]); 264s ***** error gumbellike ([12, 3], ones (10, 2)); 264s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 264s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 264s 8 tests, 8 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/hnfit.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/hnfit.m 264s ***** demo 264s ## Sample 2 populations from different half-normal distibutions 264s rand ("seed", 1); # for reproducibility 264s r1 = hnrnd (0, 5, 5000, 1); 264s rand ("seed", 2); # for reproducibility 264s r2 = hnrnd (0, 2, 5000, 1); 264s r = [r1, r2]; 264s 264s ## Plot them normalized and fix their colors 264s hist (r, [0.5:20], 1); 264s h = findobj (gca, "Type", "patch"); 264s set (h(1), "facecolor", "c"); 264s set (h(2), "facecolor", "g"); 264s hold on 264s 264s ## Estimate their shape parameters 264s mu_sigmaA = hnfit (r(:,1), 0); 264s mu_sigmaB = hnfit (r(:,2), 0); 264s 264s ## Plot their estimated PDFs 264s x = [0:0.2:10]; 264s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 264s plot (x, y, "-pr"); 264s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 264s plot (x, y, "-sg"); 264s xlim ([0, 10]) 264s ylim ([0, 0.5]) 264s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 264s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 264s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 264s mu_sigmaA(1), mu_sigmaA(2)), ... 264s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 264s mu_sigmaB(1), mu_sigmaB(2))}) 264s title ("Two population samples from different half-normal distibutions") 264s hold off 264s ***** test 264s x = 1:20; 264s [paramhat, paramci] = hnfit (x, 0); 264s assert (paramhat, [0, 11.9791], 1e-4); 264s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 264s ***** test 264s x = 1:20; 264s [paramhat, paramci] = hnfit (x, 0, 0.01); 264s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 264s ***** error hnfit () 264s ***** error hnfit (1) 264s ***** error hnfit ([0.2, 0.5+i], 0); 264s ***** error hnfit (ones (2,2) * 0.5, 0); 264s ***** error ... 264s hnfit ([0.5, 1.2], [0, 1]); 264s ***** error ... 264s hnfit ([0.5, 1.2], 5+i); 264s ***** error ... 264s hnfit ([1:5], 2); 264s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 264s ***** error hnfit ([0.01:0.1:0.99], 0, i); 264s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 264s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 264s ***** error 264s hnfit ([1 2 3], 0, [], [1 5]) 264s ***** error 264s hnfit ([1 2 3], 0, [], [1 5 -1]) 264s 15 tests, 15 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/betalike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/betalike.m 264s ***** test 264s x = 0.01:0.02:0.99; 264s [nlogL, avar] = betalike ([2.3, 1.2], x); 264s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 264s assert (nlogL, 17.873477715879040, 3e-14); 264s assert (avar, avar_out, 1e-7); 264s ***** test 264s x = 0.01:0.02:0.99; 264s [nlogL, avar] = betalike ([1, 4], x); 264s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 264s assert (nlogL, 79.648061114839550, 1e-13); 264s assert (avar, avar_out, 1e-7); 264s ***** test 264s x = 0.00:0.02:1; 264s [nlogL, avar] = betalike ([1, 4], x); 264s avar_out = [0.00000801564765, 0.00000131397245; ... 264s 0.00000131397245, 0.00070827639442]; 264s assert (nlogL, 573.2008434477486, 1e-10); 264s assert (avar, avar_out, 1e-14); 264s ***** error ... 264s betalike ([12, 15]); 264s ***** error betalike ([12, 15, 3], [1:50]); 264s ***** error ... 264s betalike ([12, 15], ones (10, 1), ones (8,1)) 264s ***** error ... 264s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 264s ***** error ... 264s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 264s 8 tests, 8 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/binolike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/binolike.m 264s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 264s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 264s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 264s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 264s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 264s ***** test 264s [nlogL, acov] = binolike ([3, 0.333], 3); 264s assert (acov(4), 0.0740, 1e-4) 264s ***** error binolike (3.25) 264s ***** error binolike ([5, 0.2], ones (2)) 264s ***** error ... 264s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 264s ***** error binolike ([1.5, 0.2], 1) 264s ***** error binolike ([-1, 0.2], 1) 264s ***** error binolike ([Inf, 0.2], 1) 264s ***** error binolike ([5, 1.2], [3, 5]) 264s ***** error binolike ([5, -0.2], [3, 5]) 264s ***** error ... 264s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 264s ***** error ... 264s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 264s ***** error binolike ([5, 0.2], [-1, 3]) 264s ***** error binolike ([5, 0.2], [3, 5, 7]) 264s 18 tests, 18 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/nbinfit.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/nbinfit.m 264s ***** demo 264s ## Sample 2 populations from different negative binomial distibutions 264s randp ("seed", 5); randg ("seed", 5); # for reproducibility 264s r1 = nbinrnd (2, 0.15, 5000, 1); 264s randp ("seed", 8); randg ("seed", 8); # for reproducibility 264s r2 = nbinrnd (5, 0.2, 5000, 1); 264s r = [r1, r2]; 264s 264s ## Plot them normalized and fix their colors 264s hist (r, [0:51], 1); 264s h = findobj (gca, "Type", "patch"); 264s set (h(1), "facecolor", "c"); 264s set (h(2), "facecolor", "g"); 264s hold on 264s 264s ## Estimate their probability of success 264s r_psA = nbinfit (r(:,1)); 264s r_psB = nbinfit (r(:,2)); 264s 264s ## Plot their estimated PDFs 264s x = [0:40]; 264s y = nbinpdf (x, r_psA(1), r_psA(2)); 264s plot (x, y, "-pg"); 264s x = [min(r(:,2)):max(r(:,2))]; 264s y = nbinpdf (x, r_psB(1), r_psB(2)); 264s plot (x, y, "-sc"); 264s ylim ([0, 0.1]) 264s xlim ([0, 50]) 264s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 264s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 264s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 264s r_psA(1), r_psA(2)), ... 264s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 264s r_psB(1), r_psB(2))}) 264s title ("Two population samples from negative different binomial distibutions") 264s hold off 264s ***** test 264s [paramhat, paramci] = nbinfit ([1:50]); 264s assert (paramhat, [2.420857, 0.086704], 1e-6); 264s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 264s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 264s ***** test 264s [paramhat, paramci] = nbinfit ([1:20]); 264s assert (paramhat, [3.588233, 0.254697], 1e-6); 264s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 264s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 264s ***** test 264s [paramhat, paramci] = nbinfit ([1:10]); 264s assert (paramhat, [8.8067, 0.6156], 1e-4); 264s assert (paramci(:,1), [0; 30.7068], 1e-4); 264s assert (paramci(:,2), [0.0217; 1], 1e-4); 264s ***** test 264s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 264s assert (paramhat, [8.8067, 0.6156], 1e-4); 264s assert (paramci(:,1), [0; 30.7068], 1e-4); 264s assert (paramci(:,2), [0.0217; 1], 1e-4); 264s ***** test 264s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 264s assert (paramhat, [8.8067, 0.6156], 1e-4); 264s assert (paramci(:,1), [0; 30.7068], 1e-4); 264s assert (paramci(:,2), [0.0217; 1], 1e-4); 264s ***** error nbinfit ([-1 2 3 3]) 264s ***** error nbinfit (ones (2)) 264s ***** error nbinfit ([1 2 1.2 3]) 264s ***** error nbinfit ([1 2 3], 0) 264s ***** error nbinfit ([1 2 3], 1.2) 264s ***** error nbinfit ([1 2 3], [0.02 0.05]) 264s ***** error ... 264s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 264s ***** error ... 264s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 264s ***** error ... 264s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 264s ***** error ... 264s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 264s ***** error ... 264s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 264s 16 tests, 16 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/binofit.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/binofit.m 264s ***** demo 264s ## Sample 2 populations from different binomial distibutions 264s rand ("seed", 1); # for reproducibility 264s r1 = binornd (50, 0.15, 1000, 1); 264s rand ("seed", 2); # for reproducibility 264s r2 = binornd (100, 0.5, 1000, 1); 264s r = [r1, r2]; 264s 264s ## Plot them normalized and fix their colors 264s hist (r, 23, 0.35); 264s h = findobj (gca, "Type", "patch"); 264s set (h(1), "facecolor", "c"); 264s set (h(2), "facecolor", "g"); 264s hold on 264s 264s ## Estimate their probability of success 264s pshatA = binofit (r(:,1), 50); 264s pshatB = binofit (r(:,2), 100); 264s 264s ## Plot their estimated PDFs 264s x = [min(r(:,1)):max(r(:,1))]; 264s y = binopdf (x, 50, mean (pshatA)); 264s plot (x, y, "-pg"); 264s x = [min(r(:,2)):max(r(:,2))]; 264s y = binopdf (x, 100, mean (pshatB)); 264s plot (x, y, "-sc"); 264s ylim ([0, 0.2]) 264s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 264s "Normalized HIST of sample 2 with ps=0.50", ... 264s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 264s mean (pshatA)), ... 264s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 264s mean (pshatB))}) 264s title ("Two population samples from different binomial distibutions") 264s hold off 264s ***** test 264s x = 0:3; 264s [pshat, psci] = binofit (x, 3); 264s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 264s assert (psci(1,:), [0, 0.7076], 1e-4); 264s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 264s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 264s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 264s ***** error ... 264s binofit ([1 2 3 4]) 264s ***** error ... 264s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 264s ***** error binofit (ones(2), [1, 2, 3, 3]) 264s ***** error ... 264s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 264s ***** error ... 264s binofit ([1, 4, 3, 2], [5, 5, 5]) 264s ***** error ... 264s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 264s ***** error binofit ([1, 2, 1], 3, 1.2); 264s ***** error binofit ([1, 2, 1], 3, 0); 264s ***** error binofit ([1, 2, 1], 3, "alpha"); 264s 10 tests, 10 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/tlslike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/tlslike.m 264s ***** test 264s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 264s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 264s acov_out = [0.2525, 0.0670, 0.0288; ... 264s 0.0670, 0.5724, 0.1786; ... 264s 0.0288, 0.1786, 0.1789]; 264s assert (nlogL, 17.9979636579, 1e-10); 264s assert (acov, acov_out, 1e-4); 264s ***** error tlslike ([12, 15, 1]); 264s ***** error tlslike ([12, 15], [1:50]); 264s ***** error tlslike ([12, 3, 1], ones (10, 2)); 264s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 264s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 264s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 264s 7 tests, 7 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/rayllike.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/rayllike.m 264s ***** test 264s x = [1 3 2 4 5 4 3 4]; 264s [nlogL, acov] = rayllike (3.25, x); 264s assert (nlogL, 14.7442, 1e-4) 264s ***** test 264s x = [1 2 3 4 5]; 264s f = [1 1 2 3 1]; 264s [nlogL, acov] = rayllike (3.25, x, [], f); 264s assert (nlogL, 14.7442, 1e-4) 264s ***** test 264s x = [1 2 3 4 5 6]; 264s f = [1 1 2 3 1 0]; 264s [nlogL, acov] = rayllike (3.25, x, [], f); 264s assert (nlogL, 14.7442, 1e-4) 264s ***** test 264s x = [1 2 3 4 5 6]; 264s c = [0 0 0 0 0 1]; 264s f = [1 1 2 3 1 0]; 264s [nlogL, acov] = rayllike (3.25, x, c, f); 264s assert (nlogL, 14.7442, 1e-4) 264s ***** error rayllike (1) 264s ***** error rayllike ([1 2 3], [1 2]) 264s ***** error ... 264s rayllike (3.25, ones (10, 2)) 264s ***** error ... 264s rayllike (3.25, [1 2 3 -4 5]) 264s ***** error ... 264s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 264s ***** error ... 264s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 264s ***** error ... 264s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 264s ***** error ... 264s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 264s ***** error ... 264s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 264s 13 tests, 13 passed, 0 known failure, 0 skipped 264s [inst/dist_fit/normfit.m] 264s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/normfit.m 264s ***** demo 264s ## Sample 3 populations from 3 different normal distibutions 264s randn ("seed", 1); # for reproducibility 264s r1 = normrnd (2, 5, 5000, 1); 264s randn ("seed", 2); # for reproducibility 264s r2 = normrnd (5, 2, 5000, 1); 264s randn ("seed", 3); # for reproducibility 264s r3 = normrnd (9, 4, 5000, 1); 264s r = [r1, r2, r3]; 264s 264s ## Plot them normalized and fix their colors 264s hist (r, 15, 0.4); 264s h = findobj (gca, "Type", "patch"); 264s set (h(1), "facecolor", "c"); 264s set (h(2), "facecolor", "g"); 264s set (h(3), "facecolor", "r"); 264s hold on 264s 264s ## Estimate their mu and sigma parameters 264s [muhat, sigmahat] = normfit (r); 264s 264s ## Plot their estimated PDFs 264s x = [min(r(:)):max(r(:))]; 264s y = normpdf (x, muhat(1), sigmahat(1)); 264s plot (x, y, "-pr"); 264s y = normpdf (x, muhat(2), sigmahat(2)); 264s plot (x, y, "-sg"); 264s y = normpdf (x, muhat(3), sigmahat(3)); 264s plot (x, y, "-^c"); 264s ylim ([0, 0.5]) 264s xlim ([-20, 20]) 264s hold off 264s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 264s "Normalized HIST of sample 2 with mu=5, σ=2", ... 264s "Normalized HIST of sample 3 with mu=9, σ=4", ... 264s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 264s muhat(1), sigmahat(1)), ... 264s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 264s muhat(2), sigmahat(2)), ... 264s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 264s muhat(3), sigmahat(3))}, "location", "northwest") 264s title ("Three population samples from different normal distibutions") 264s hold off 264s ***** test 264s load lightbulb 264s idx = find (lightbulb(:,2) == 0); 264s censoring = lightbulb(idx,3) == 1; 264s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 264s assert (muHat, 9496.59586737857, 1e-11); 264s assert (sigmaHat, 3064.021012796456, 2e-12); 264s ***** test 264s randn ("seed", 234); 264s x = normrnd (3, 5, [1000, 1]); 264s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 264s assert (muCI(1) < 3); 264s assert (muCI(2) > 3); 264s assert (sigmaCI(1) < 5); 264s assert (sigmaCI(2) > 5); 265s ***** error ... 265s normfit (ones (3,3,3)) 265s ***** error ... 265s normfit (ones (20,3), [], zeros (20,1)) 265s ***** error normfit (ones (20,1), 0) 265s ***** error normfit (ones (20,1), -0.3) 265s ***** error normfit (ones (20,1), 1.2) 265s ***** error normfit (ones (20,1), [0.05 0.1]) 265s ***** error normfit (ones (20,1), 0.02+i) 265s ***** error ... 265s normfit (ones (20,1), [], zeros(15,1)) 265s ***** error ... 265s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 265s ***** error ... 265s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 265s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 265s 13 tests, 13 passed, 0 known failure, 0 skipped 265s [inst/dist_fit/gamlike.m] 265s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gamlike.m 265s ***** test 265s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 265s assert (nlogL, 19.4426, 1e-4); 265s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 265s ***** test 265s [nlogL, acov] = gamlike([2, 3], [5:45]); 265s assert (nlogL, 305.8070, 1e-4); 265s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 265s ***** test 265s [nlogL, acov] = gamlike([2, 13], [5:45]); 265s assert (nlogL, 163.2261, 1e-4); 265s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 265s ***** error ... 265s gamlike ([12, 15]) 265s ***** error gamlike ([12, 15, 3], [1:50]) 265s ***** error gamlike ([12, 3], ones (10, 2)) 265s ***** error ... 265s gamlike ([12, 15], [1:50], [1, 2, 3]) 265s ***** error ... 265s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 265s 8 tests, 8 passed, 0 known failure, 0 skipped 265s [inst/dist_fit/burrfit.m] 265s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/burrfit.m 265s ***** demo 265s ## Sample 3 populations from different Burr type XII distibutions 265s rand ("seed", 4); # for reproducibility 265s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 265s rand ("seed", 2); # for reproducibility 265s r2 = burrrnd (1, 3, 1, 10000, 1); 265s rand ("seed", 9); # for reproducibility 265s r3 = burrrnd (0.5, 2, 3, 10000, 1); 265s r = [r1, r2, r3]; 265s 265s ## Plot them normalized and fix their colors 265s hist (r, [0.1:0.2:20], [18, 5, 3]); 265s h = findobj (gca, "Type", "patch"); 265s set (h(1), "facecolor", "c"); 265s set (h(2), "facecolor", "g"); 265s set (h(3), "facecolor", "r"); 265s ylim ([0, 3]); 265s xlim ([0, 5]); 265s hold on 265s 265s ## Estimate their α and β parameters 265s lambda_c_kA = burrfit (r(:,1)); 265s lambda_c_kB = burrfit (r(:,2)); 265s lambda_c_kC = burrfit (r(:,3)); 265s 265s ## Plot their estimated PDFs 265s x = [0.01:0.15:15]; 265s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 265s plot (x, y, "-pr"); 265s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 265s plot (x, y, "-sg"); 265s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 265s plot (x, y, "-^c"); 265s hold off 265s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 265s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 265s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 265s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 265s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 265s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 265s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 265s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 265s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 265s title ("Three population samples from different Burr type XII distibutions") 265s hold off 265s ***** test 265s l = 1; c = 2; k = 3; 265s r = burrrnd (l, c, k, 100000, 1); 265s lambda_c_kA = burrfit (r); 265s assert (lambda_c_kA(1), l, 0.2); 265s assert (lambda_c_kA(2), c, 0.2); 265s assert (lambda_c_kA(3), k, 0.3); 266s ***** test 266s l = 0.5; c = 1; k = 3; 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 = 1; c = 3; 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 = 3; c = 2; k = 1; 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); 272s ***** test 272s l = 4; c = 2; k = 4; 272s r = burrrnd (l, c, k, 100000, 1); 272s lambda_c_kA = burrfit (r); 272s assert (lambda_c_kA(1), l, 0.2); 272s assert (lambda_c_kA(2), c, 0.2); 272s assert (lambda_c_kA(3), k, 0.3); 273s ***** error burrfit (ones (2,5)); 273s ***** error burrfit ([-1 2 3 4]); 273s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 273s ***** error burrfit ([1, 2, 3, 4, 5], 0); 273s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 273s ***** error ... 273s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 273s ***** error ... 273s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 273s ***** error 273s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 273s ***** error 273s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 273s ***** error ... 273s burrfit ([1:10], 0.05, [], [], 5) 273s 15 tests, 15 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/gevlike.m] 273s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gevlike.m 273s ***** test 273s x = 1; 273s k = 0.2; 273s sigma = 0.3; 273s mu = 0.5; 273s [L, C] = gevlike ([k sigma mu], x); 273s expected_L = 0.75942; 273s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 273s assert (L, expected_L, 0.001); 273s assert (C, inv (expected_C), 0.001); 273s ***** test 273s x = 1; 273s k = 0; 273s sigma = 0.3; 273s mu = 0.5; 273s [L, C] = gevlike ([k sigma mu], x); 273s expected_L = 0.65157; 273s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 273s assert (L, expected_L, 0.001); 273s assert (C, inv (expected_C), 0.001); 273s ***** test 273s x = -5:-1; 273s k = -0.2; 273s sigma = 0.3; 273s mu = 0.5; 273s [L, C] = gevlike ([k sigma mu], x); 273s expected_L = 3786.4; 273s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 273s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 273s 8.7297e-05, 1.2034e-05, -0.0019125]; 273s assert (L, expected_L, -0.001); 273s assert (C, expected_C, -0.001); 273s ***** test 273s x = -5:0; 273s k = -0.2; 273s sigma = 0.3; 273s mu = 0.5; 273s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 273s expected_L = 3786.4; 273s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 273s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 273s 8.7297e-05, 1.2034e-05, -0.0019125]; 273s assert (L, expected_L, -0.001); 273s assert (C, expected_C, -0.001); 273s ***** error gevlike (3.25) 273s ***** error gevlike ([1, 2, 3], ones (2)) 273s ***** error ... 273s gevlike ([1, 2], [1, 3, 5, 7]) 273s ***** error ... 273s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 273s ***** error ... 273s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 273s ***** error ... 273s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 273s ***** error ... 273s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 273s 11 tests, 11 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/geofit.m] 273s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/geofit.m 273s ***** demo 273s ## Sample 2 populations from different geometric distibutions 273s rande ("seed", 1); # for reproducibility 273s r1 = geornd (0.15, 1000, 1); 273s rande ("seed", 2); # for reproducibility 273s r2 = geornd (0.5, 1000, 1); 273s r = [r1, r2]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, 0:0.5:20.5, 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 pshatA = geofit (r(:,1)); 273s pshatB = geofit (r(:,2)); 273s 273s ## Plot their estimated PDFs 273s x = [0:15]; 273s y = geopdf (x, pshatA); 273s plot (x, y, "-pg"); 273s y = geopdf (x, pshatB); 273s plot (x, y, "-sc"); 273s xlim ([0, 15]) 273s ylim ([0, 0.6]) 273s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 273s "Normalized HIST of sample 2 with ps=0.50", ... 273s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 273s mean (pshatA)), ... 273s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 273s mean (pshatB))}) 273s title ("Two population samples from different geometric distibutions") 273s hold off 273s ***** test 273s x = 0:5; 273s [pshat, psci] = geofit (x); 273s assert (pshat, 0.2857, 1e-4); 273s assert (psci, [0.092499; 0.478929], 1e-5); 273s ***** test 273s x = 0:5; 273s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 273s assert (pshat, 0.2857, 1e-4); 273s assert (psci, [0.092499; 0.478929], 1e-5); 273s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 273s ***** error geofit () 273s ***** error geofit (-1, [1 2 3 3]) 273s ***** error geofit (1, 0) 273s ***** error geofit (1, 1.2) 273s ***** error geofit (1, [0.02 0.05]) 273s ***** error ... 273s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 273s ***** error ... 273s geofit ([1.5, 0.2], [], [1, 1, 1]) 273s 10 tests, 10 passed, 0 known failure, 0 skipped 273s [inst/dist_fit/lognfit.m] 273s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/lognfit.m 273s ***** demo 273s ## Sample 3 populations from 3 different log-normal distibutions 273s randn ("seed", 1); # for reproducibility 273s r1 = lognrnd (0, 0.25, 1000, 1); 273s randn ("seed", 2); # for reproducibility 273s r2 = lognrnd (0, 0.5, 1000, 1); 273s randn ("seed", 3); # for reproducibility 273s r3 = lognrnd (0, 1, 1000, 1); 273s r = [r1, r2, r3]; 273s 273s ## Plot them normalized and fix their colors 273s hist (r, 30, 2); 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 hold on 273s 273s ## Estimate their mu and sigma parameters 273s mu_sigmaA = lognfit (r(:,1)); 273s mu_sigmaB = lognfit (r(:,2)); 273s mu_sigmaC = lognfit (r(:,3)); 273s 273s ## Plot their estimated PDFs 273s x = [0:0.1:6]; 273s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 273s plot (x, y, "-pr"); 273s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 273s plot (x, y, "-sg"); 273s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 273s plot (x, y, "-^c"); 273s ylim ([0, 2]) 273s xlim ([0, 6]) 273s hold off 273s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 273s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 273s "Normalized HIST of sample 3 with mu=0, σ=1", ... 273s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 273s mu_sigmaA(1), mu_sigmaA(2)), ... 273s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 273s mu_sigmaB(1), mu_sigmaB(2)), ... 273s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 273s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 273s title ("Three population samples from different log-normal distibutions") 273s hold off 273s ***** test 273s randn ("seed", 1); 273s x = lognrnd (3, 5, [1000, 1]); 273s [paramhat, paramci] = lognfit (x, 0.01); 273s assert (paramci(1,1) < 3); 273s assert (paramci(1,2) > 3); 273s assert (paramci(2,1) < 5); 273s assert (paramci(2,2) > 5); 274s ***** error ... 274s lognfit (ones (20,3)) 274s ***** error ... 274s lognfit ({1, 2, 3, 4, 5}) 274s ***** error ... 274s lognfit ([-1, 2, 3, 4, 5]) 274s ***** error lognfit (ones (20,1), 0) 274s ***** error lognfit (ones (20,1), -0.3) 274s ***** error lognfit (ones (20,1), 1.2) 274s ***** error lognfit (ones (20,1), [0.05, 0.1]) 274s ***** error lognfit (ones (20,1), 0.02+i) 274s ***** error ... 274s lognfit (ones (20,1), [], zeros(15,1)) 274s ***** error ... 274s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 274s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 274s 12 tests, 12 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/nakalike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/nakalike.m 274s ***** test 274s nlogL = nakalike ([0.735504, 858.5], [1:50]); 274s assert (nlogL, 202.8689, 1e-4); 274s ***** test 274s nlogL = nakalike ([1.17404, 11], [1:5]); 274s assert (nlogL, 8.6976, 1e-4); 274s ***** test 274s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 274s assert (nlogL, 8.6976, 1e-4); 274s ***** test 274s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 274s assert (nlogL, 8.6976, 1e-4); 274s ***** error nakalike (3.25) 274s ***** error nakalike ([5, 0.2], ones (2)) 274s ***** error ... 274s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 274s ***** error ... 274s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 274s ***** error ... 274s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 274s ***** error ... 274s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 274s ***** error ... 274s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 274s 11 tests, 11 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/invgfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/invgfit.m 274s ***** demo 274s ## Sample 3 populations from different inverse Gaussian distibutions 274s rand ("seed", 5); randn ("seed", 5); # for reproducibility 274s r1 = invgrnd (1, 0.2, 2000, 1); 274s rand ("seed", 2); randn ("seed", 2); # for reproducibility 274s r2 = invgrnd (1, 3, 2000, 1); 274s rand ("seed", 7); randn ("seed", 7); # for reproducibility 274s r3 = invgrnd (3, 1, 2000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [0.1:0.1:3.2], 9); 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, 3]); 274s xlim ([0, 3]); 274s hold on 274s 274s ## Estimate their MU and LAMBDA parameters 274s mu_lambdaA = invgfit (r(:,1)); 274s mu_lambdaB = invgfit (r(:,2)); 274s mu_lambdaC = invgfit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [0:0.1:3]; 274s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 274s plot (x, y, "-pr"); 274s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 274s plot (x, y, "-sg"); 274s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 274s plot (x, y, "-^c"); 274s hold off 274s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 274s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 274s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 274s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 274s mu_lambdaA(1), mu_lambdaA(2)), ... 274s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 274s mu_lambdaB(1), mu_lambdaB(2)), ... 274s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 274s mu_lambdaC(1), mu_lambdaC(2))}) 274s title ("Three population samples from different inverse Gaussian distibutions") 274s hold off 274s ***** test 274s paramhat = invgfit ([1:50]); 274s paramhat_out = [25.5, 19.6973]; 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** test 274s paramhat = invgfit ([1:5]); 274s paramhat_out = [3, 8.1081]; 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** error invgfit (ones (2,5)); 274s ***** error invgfit ([-1 2 3 4]); 274s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 274s ***** error invgfit ([1, 2, 3, 4, 5], 0); 274s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 274s ***** error ... 274s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 274s ***** error ... 274s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 274s ***** error ... 274s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 274s ***** error ... 274s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 274s ***** error ... 274s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 274s 12 tests, 12 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/unidfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/unidfit.m 274s ***** demo 274s ## Sample 2 populations from different discrete uniform distibutions 274s rand ("seed", 1); # for reproducibility 274s r1 = unidrnd (5, 1000, 1); 274s rand ("seed", 2); # for reproducibility 274s r2 = unidrnd (9, 1000, 1); 274s r = [r1, r2]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 0:0.5:20.5, 1); 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 NhatA = unidfit (r(:,1)); 274s NhatB = unidfit (r(:,2)); 274s 274s ## Plot their estimated PDFs 274s x = [0:10]; 274s y = unidpdf (x, NhatA); 274s plot (x, y, "-pg"); 274s y = unidpdf (x, NhatB); 274s plot (x, y, "-sc"); 274s xlim ([0, 10]) 274s ylim ([0, 0.4]) 274s legend ({"Normalized HIST of sample 1 with N=5", ... 274s "Normalized HIST of sample 2 with N=9", ... 274s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 274s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 274s title ("Two population samples from different discrete uniform distibutions") 274s hold off 274s ***** test 274s x = 0:5; 274s [Nhat, Nci] = unidfit (x); 274s assert (Nhat, 5); 274s assert (Nci, [5; 9]); 274s ***** test 274s x = 0:5; 274s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 274s assert (Nhat, 5); 274s assert (Nci, [5; 9]); 274s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 274s ***** error unidfit () 274s ***** error unidfit (-1, [1 2 3 3]) 274s ***** error unidfit (1, 0) 274s ***** error unidfit (1, 1.2) 274s ***** error unidfit (1, [0.02 0.05]) 274s ***** error ... 274s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 274s ***** error ... 274s unidfit ([1.5, 0.2], [], [1, 1, 1]) 274s ***** error ... 274s unidfit ([1.5, 0.2], [], [1, -1]) 274s 11 tests, 11 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/wblfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/gpfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gpfit.m 274s ***** demo 274s ## Sample 2 populations from different generalized Pareto distibutions 274s ## Assume location parameter θ is known 274s theta = 0; 274s rand ("seed", 5); # for reproducibility 274s r1 = gprnd (1, 2, theta, 20000, 1); 274s rand ("seed", 2); # for reproducibility 274s r2 = gprnd (3, 1, theta, 20000, 1); 274s r = [r1, r2]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [0.1:0.2:100], 5); 274s h = findobj (gca, "Type", "patch"); 274s set (h(1), "facecolor", "r"); 274s set (h(2), "facecolor", "c"); 274s ylim ([0, 1]); 274s xlim ([0, 5]); 274s hold on 274s 274s ## Estimate their α and β parameters 274s k_sigmaA = gpfit (r(:,1), theta); 274s k_sigmaB = gpfit (r(:,2), theta); 274s 274s ## Plot their estimated PDFs 274s x = [0.01, 0.1:0.2:18]; 274s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 274s plot (x, y, "-pc"); 274s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 274s plot (x, y, "-sr"); 274s hold off 274s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 274s "Normalized HIST of sample 2 with k=2 and σ=2", ... 274s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 274s k_sigmaA(1), k_sigmaA(2)), ... 274s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 274s k_sigmaB(1), k_sigmaB(2))}) 274s title ("Three population samples from different generalized Pareto distibutions") 274s text (2, 0.7, "Known location parameter θ = 0") 274s hold off 274s ***** test 274s k = 0.8937; sigma = 1.3230; theta = 1; 274s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 274s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 274s [hat, ci] = gpfit (x, theta); 274s assert (hat, [k, sigma, theta], 1e-4); 274s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 274s ***** error gpfit () 274s ***** error gpfit (1) 274s ***** error gpfit ([0.2, 0.5+i], 0); 274s ***** error gpfit (ones (2,2) * 0.5, 0); 274s ***** error ... 274s gpfit ([0.5, 1.2], [0, 1]); 274s ***** error ... 274s gpfit ([0.5, 1.2], 5+i); 274s ***** error ... 274s gpfit ([1:5], 2); 274s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 274s ***** error gpfit ([0.01:0.1:0.99], 0, i); 274s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 274s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 274s ***** error 274s gpfit ([1 2 3], 0, [], [1 5]) 274s ***** error 274s gpfit ([1 2 3], 0, [], [1 5 -1]) 274s ***** error ... 274s gpfit ([1:10], 1, 0.05, [], 5) 274s 15 tests, 15 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/gevfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gevfit.m 274s ***** demo 274s ## Sample 2 populations from 2 different exponential distibutions 274s rand ("seed", 1); # for reproducibility 274s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 274s rand ("seed", 2); # for reproducibility 274s r2 = gevrnd (0, 1, -4, 5000, 1); 274s r = [r1, r2]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 50, 5); 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 k, sigma, and mu parameters 274s k_sigma_muA = gevfit (r(:,1)); 274s k_sigma_muB = gevfit (r(:,2)); 274s 274s ## Plot their estimated PDFs 274s x = [-10:0.5:20]; 274s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 274s plot (x, y, "-pr"); 274s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 274s plot (x, y, "-sg"); 274s ylim ([0, 0.7]) 274s xlim ([-7, 5]) 274s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 274s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 274s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 274s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 274s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 274s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 274s title ("Two population samples from different exponential distibutions") 274s hold off 274s ***** test 274s x = 1:50; 274s [pfit, pci] = gevfit (x); 274s pfit_out = [-0.4407, 15.1923, 21.5309]; 274s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 274s assert (pfit, pfit_out, 1e-3); 274s 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/gplike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gplike.m 274s ***** test 274s k = 0.8937; sigma = 1.3230; theta = 1; 274s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 274s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 274s [nlogL, acov] = gplike ([k, sigma, theta], x); 274s assert (nlogL, 21.736, 1e-3); 274s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 274s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 274s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 274s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 274s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 274s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 274s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 274s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 274s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 274s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 274s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 274s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 274s ***** error gplike () 274s ***** error gplike (1) 274s ***** error gplike ([1, 2, 0], []) 274s ***** error gplike ([1, 2, 0], ones (2)) 274s ***** error gplike (2, [1:10]) 274s ***** error gplike ([2, 3], [1:10]) 274s ***** error ... 274s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 274s ***** error ... 274s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 274s 20 tests, 20 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/gumbelfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gumbelfit.m 274s ***** demo 274s ## Sample 3 populations from different Gumbel distibutions 274s rand ("seed", 1); # for reproducibility 274s r1 = gumbelrnd (2, 5, 400, 1); 274s rand ("seed", 11); # for reproducibility 274s r2 = gumbelrnd (-5, 3, 400, 1); 274s rand ("seed", 16); # for reproducibility 274s r3 = gumbelrnd (14, 8, 400, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 25, 0.32); 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, 0.28]) 274s xlim ([-11, 50]); 274s hold on 274s 274s ## Estimate their MU and BETA parameters 274s mu_betaA = gumbelfit (r(:,1)); 274s mu_betaB = gumbelfit (r(:,2)); 274s mu_betaC = gumbelfit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [min(r(:)):max(r(:))]; 274s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 274s plot (x, y, "-pr"); 274s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 274s plot (x, y, "-sg"); 274s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 274s plot (x, y, "-^c"); 274s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 274s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 274s "Normalized HIST of sample 3 with μ=14 and β=8", ... 274s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 274s mu_betaA(1), mu_betaA(2)), ... 274s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 274s mu_betaB(1), mu_betaB(2)), ... 274s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 274s mu_betaC(1), mu_betaC(2))}) 274s title ("Three population samples from different Gumbel distibutions") 274s hold off 274s ***** test 274s x = 1:50; 274s [paramhat, paramci] = gumbelfit (x); 274s paramhat_out = [18.3188, 13.0509]; 274s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 274s assert (paramhat, paramhat_out, 1e-4); 274s assert (paramci, paramci_out, 1e-4); 274s ***** test 274s x = 1:50; 274s [paramhat, paramci] = gumbelfit (x, 0.01); 274s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 274s assert (paramci, paramci_out, 1e-4); 274s ***** error gumbelfit (ones (2,5)); 274s ***** error ... 274s gumbelfit (single (ones (1,5))); 274s ***** error ... 274s gumbelfit ([1, 2, 3, 4, NaN]); 274s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 274s ***** error ... 274s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 274s ***** error ... 274s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 274s ***** error 274s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 274s ***** error ... 274s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 274s 10 tests, 10 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/explike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/explike.m 274s ***** test 274s x = 12; 274s beta = 5; 274s [L, V] = explike (beta, x); 274s expected_L = 4.0094; 274s expected_V = 6.5789; 274s assert (L, expected_L, 0.001); 274s assert (V, expected_V, 0.001); 274s ***** test 274s x = 1:5; 274s beta = 2; 274s [L, V] = explike (beta, x); 274s expected_L = 10.9657; 274s expected_V = 0.4; 274s assert (L, expected_L, 0.001); 274s assert (V, expected_V, 0.001); 274s ***** error explike () 274s ***** error explike (2) 274s ***** error explike ([12, 3], [1:50]) 274s ***** error explike (3, ones (10, 2)) 274s ***** error ... 274s explike (3, [1:50], [1, 2, 3]) 274s ***** error ... 274s explike (3, [1:50], [], [1, 2, 3]) 274s 8 tests, 8 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/ricelike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/hnlike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/hnlike.m 274s ***** test 274s x = 1:20; 274s paramhat = hnfit (x, 0); 274s [nlogL, acov] = hnlike (paramhat, x); 274s assert (nlogL, 64.179177404891300, 1e-14); 274s ***** test 274s x = 1:20; 274s paramhat = hnfit (x, 0); 274s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 274s assert (nlogL, 64.179177404891300, 1e-14); 274s ***** error ... 274s hnlike ([12, 15]); 274s ***** error hnlike ([12, 15, 3], [1:50]); 274s ***** error hnlike ([3], [1:50]); 274s ***** error ... 274s hnlike ([0, 3], ones (2)); 274s ***** error ... 274s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 274s ***** error ... 274s hnlike ([1, 2], ones (10, 1), ones (8,1)) 274s ***** error ... 274s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 274s 9 tests, 9 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/invglike.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/invglike.m 274s ***** test 274s nlogL = invglike ([25.5, 19.6973], [1:50]); 274s assert (nlogL, 219.1516, 1e-4); 274s ***** test 274s nlogL = invglike ([3, 8.1081], [1:5]); 274s assert (nlogL, 9.0438, 1e-4); 274s ***** error invglike (3.25) 274s ***** error invglike ([5, 0.2], ones (2)) 274s ***** error invglike ([5, 0.2], [-1, 3]) 274s ***** error ... 274s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 274s ***** error ... 274s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 274s ***** error ... 274s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 274s ***** error ... 274s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 274s 9 tests, 9 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/logifit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/logifit.m 274s ***** demo 274s ## Sample 3 populations from different logistic distibutions 274s rand ("seed", 5) # for reproducibility 274s r1 = logirnd (2, 1, 2000, 1); 274s rand ("seed", 2) # for reproducibility 274s r2 = logirnd (5, 2, 2000, 1); 274s rand ("seed", 7) # for reproducibility 274s r3 = logirnd (9, 4, 2000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [-6: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 ylim ([0, 0.3]); 274s xlim ([-5, 20]); 274s hold on 274s 274s ## Estimate their MU and LAMBDA parameters 274s mu_sA = logifit (r(:,1)); 274s mu_sB = logifit (r(:,2)); 274s mu_sC = logifit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [-5:0.5:20]; 274s y = logipdf (x, mu_sA(1), mu_sA(2)); 274s plot (x, y, "-pr"); 274s y = logipdf (x, mu_sB(1), mu_sB(2)); 274s plot (x, y, "-sg"); 274s y = logipdf (x, mu_sC(1), mu_sC(2)); 274s plot (x, y, "-^c"); 274s hold off 274s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 274s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 274s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 274s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 274s mu_sA(1), mu_sA(2)), ... 274s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 274s mu_sB(1), mu_sB(2)), ... 274s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 274s mu_sC(1), mu_sC(2))}) 274s title ("Three population samples from different logistic distibutions") 274s hold off 274s ***** test 274s paramhat = logifit ([1:50]); 274s paramhat_out = [25.5, 8.7724]; 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** test 274s paramhat = logifit ([1:5]); 274s paramhat_out = [3, 0.8645]; 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** test 274s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 274s paramhat_out = [3, 0.8645]; 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** test 274s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 274s paramhat_out = logifit ([1:5, 5]); 274s assert (paramhat, paramhat_out, 1e-4); 274s ***** error logifit (ones (2,5)); 274s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 274s ***** error logifit ([1, 2, 3, 4, 5], 0); 274s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 274s ***** error ... 274s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 274s ***** error ... 274s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 274s ***** error ... 274s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 274s ***** error ... 274s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 274s ***** error ... 274s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 274s 13 tests, 13 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/expfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/expfit.m 274s ***** demo 274s ## Sample 3 populations from 3 different exponential distibutions 274s rande ("seed", 1); # for reproducibility 274s r1 = exprnd (2, 4000, 1); 274s rande ("seed", 2); # for reproducibility 274s r2 = exprnd (5, 4000, 1); 274s rande ("seed", 3); # for reproducibility 274s r3 = exprnd (12, 4000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, 48, 0.52); 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 mu parameter 274s muhat = expfit (r); 274s 274s ## Plot their estimated PDFs 274s x = [0:max(r(:))]; 274s y = exppdf (x, muhat(1)); 274s plot (x, y, "-pr"); 274s y = exppdf (x, muhat(2)); 274s plot (x, y, "-sg"); 274s y = exppdf (x, muhat(3)); 274s plot (x, y, "-^c"); 274s ylim ([0, 0.6]) 274s xlim ([0, 40]) 274s legend ({"Normalized HIST of sample 1 with μ=2", ... 274s "Normalized HIST of sample 2 with μ=5", ... 274s "Normalized HIST of sample 3 with μ=12", ... 274s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 274s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 274s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 274s title ("Three population samples from different exponential distibutions") 274s hold off 274s ***** assert (expfit (1), 1) 274s ***** assert (expfit (1:3), 2) 274s ***** assert (expfit ([1:3]'), 2) 274s ***** assert (expfit (1:3, []), 2) 274s ***** assert (expfit (1:3, [], [], []), 2) 274s ***** assert (expfit (magic (3)), [5 5 5]) 274s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 274s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 274s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 274s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 274s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 274s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 274s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 274s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 274s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 274s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 274s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 274s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 274s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 274s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 274s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 274s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 274s [1.75 4.75 7.75]) 274s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 274s [1.75 4.75 7.75]) 274s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 274s [3.5 19/3 31/3]) 274s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 274s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 274s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 274s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 274s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 274s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 274s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 274s 1000*eps) 274s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 274s [0.953017262058213; 7.337731146400207], 1000*eps) 274s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 274s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 274s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 274s 1000*eps) 274s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 274s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 274s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 274s 1000*eps) 274s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 274s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 274s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 274s 1000*eps) 274s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 274s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 274s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 274s 1000*eps) 274s ***** test 274s x = reshape (1:8, [4 2]); 274s x(4) = NaN; 274s [muhat,muci] = expfit (x); 274s assert ({muhat, muci}, {[NaN, 6.5], ... 274s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 274s ***** test 274s x = magic (3); 274s censor = [0 1 0; 0 1 0; 0 1 0]; 274s freq = [1 1 0; 1 1 0; 1 1 0]; 274s [muhat,muci] = expfit (x, [], censor, freq); 274s assert ({muhat, muci}, {[5 NaN NaN], ... 274s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 274s ***** error expfit () 274s ***** error expfit (1,2,3,4,5) 274s ***** error [a b censor] = expfit (1) 274s ***** error expfit (1, [1 2]) 274s ***** error expfit ([-1 2 3 4 5]) 274s ***** error expfit ([1:5], [], "test") 274s ***** error expfit ([1:5], [], [], "test") 274s ***** error expfit ([1:5], [], [0 0 0 0]) 274s ***** error expfit ([1:5], [], [], [1 1 1 1]) 274s 47 tests, 47 passed, 0 known failure, 0 skipped 274s [inst/dist_fit/poissfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/raylfit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/nakafit.m] 274s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/nakafit.m 274s ***** demo 274s ## Sample 3 populations from different Nakagami distibutions 274s randg ("seed", 5) # for reproducibility 274s r1 = nakarnd (0.5, 1, 2000, 1); 274s randg ("seed", 2) # for reproducibility 274s r2 = nakarnd (5, 1, 2000, 1); 274s randg ("seed", 7) # for reproducibility 274s r3 = nakarnd (2, 2, 2000, 1); 274s r = [r1, r2, r3]; 274s 274s ## Plot them normalized and fix their colors 274s hist (r, [0.05:0.1:3.5], 10); 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.5]); 274s xlim ([0, 3.0]); 274s hold on 274s 274s ## Estimate their MU and LAMBDA parameters 274s mu_omegaA = nakafit (r(:,1)); 274s mu_omegaB = nakafit (r(:,2)); 274s mu_omegaC = nakafit (r(:,3)); 274s 274s ## Plot their estimated PDFs 274s x = [0.01:0.1:3.01]; 274s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 274s plot (x, y, "-pr"); 274s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 274s plot (x, y, "-sg"); 274s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 274s plot (x, y, "-^c"); 274s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 274s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 274s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 274s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 274s mu_omegaA(1), mu_omegaA(2)), ... 274s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 274s mu_omegaB(1), mu_omegaB(2)), ... 274s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 274s mu_omegaC(1), mu_omegaC(2))}) 274s title ("Three population samples from different Nakagami distibutions") 274s hold off 274s ***** test 274s paramhat = nakafit ([1:50]); 274s paramhat_out = [0.7355, 858.5]; 274s assert (paramhat, paramhat_out, 1e-4); 275s ***** test 275s paramhat = nakafit ([1:5]); 275s paramhat_out = [1.1740, 11]; 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** test 275s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 275s paramhat_out = [1.1740, 11]; 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** test 275s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 275s paramhat_out = nakafit ([1:5, 5]); 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** error nakafit (ones (2,5)); 275s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 275s ***** error nakafit ([1, 2, 3, 4, 5], 0); 275s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 275s ***** error ... 275s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 275s 15 tests, 15 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/nbinlike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/nbinlike.m 275s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 275s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 275s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 275s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 275s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 275s ***** error nbinlike (3.25) 275s ***** error nbinlike ([5, 0.2], ones (2)) 275s ***** error nbinlike ([5, 0.2], [-1, 3]) 275s ***** error ... 275s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 275s ***** error nbinlike ([-5, 0.2], [1:15]) 275s ***** error nbinlike ([0, 0.2], [1:15]) 275s ***** error nbinlike ([5, 1.2], [3, 5]) 275s ***** error nbinlike ([5, -0.2], [3, 5]) 275s ***** error ... 275s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 275s ***** error ... 275s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 275s ***** error ... 275s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 275s 16 tests, 16 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/unifit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/unifit.m 275s ***** demo 275s ## Sample 2 populations from different continuous uniform distibutions 275s rand ("seed", 5); # for reproducibility 275s r1 = unifrnd (2, 5, 2000, 1); 275s rand ("seed", 6); # for reproducibility 275s r2 = unifrnd (3, 9, 2000, 1); 275s r = [r1, r2]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, 0:0.5:10, 2); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s hold on 275s 275s ## Estimate their probability of success 275s a_bA = unifit (r(:,1)); 275s a_bB = unifit (r(:,2)); 275s 275s ## Plot their estimated PDFs 275s x = [0:10]; 275s y = unifpdf (x, a_bA(1), a_bA(2)); 275s plot (x, y, "-pg"); 275s y = unifpdf (x, a_bB(1), a_bB(2)); 275s plot (x, y, "-sc"); 275s xlim ([1, 10]) 275s ylim ([0, 0.5]) 275s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 275s "Normalized HIST of sample 2 with a=3 and b=9", ... 275s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 275s a_bA(1), a_bA(2)), ... 275s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 275s a_bB(1), a_bB(2))}) 275s title ("Two population samples from different continuous uniform distibutions") 275s hold off 275s ***** test 275s x = 0:5; 275s [paramhat, paramci] = unifit (x); 275s assert (paramhat, [0, 5]); 275s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 275s ***** test 275s x = 0:5; 275s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 275s assert (paramhat, [0, 5]); 275s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 275s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 275s ***** error unifit () 275s ***** error unifit (-1, [1 2 3 3]) 275s ***** error unifit (1, 0) 275s ***** error unifit (1, 1.2) 275s ***** error unifit (1, [0.02 0.05]) 275s ***** error ... 275s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 275s ***** error ... 275s unifit ([1.5, 0.2], [], [1, -1]) 275s ***** error ... 275s unifit ([1.5, 0.2], [], [1, 1, 1]) 275s 11 tests, 11 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/tlsfit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/tlsfit.m 275s ***** demo 275s ## Sample 3 populations from 3 different location-scale T distibutions 275s randn ("seed", 1); # for reproducibility 275s randg ("seed", 2); # for reproducibility 275s r1 = tlsrnd (-4, 3, 1, 2000, 1); 275s randn ("seed", 3); # for reproducibility 275s randg ("seed", 4); # for reproducibility 275s r2 = tlsrnd (0, 3, 1, 2000, 1); 275s randn ("seed", 5); # for reproducibility 275s randg ("seed", 6); # for reproducibility 275s r3 = tlsrnd (5, 5, 4, 2000, 1); 275s r = [r1, r2, r3]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, [-21:21], [1, 1, 1]); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s set (h(3), "facecolor", "r"); 275s ylim ([0, 0.25]); 275s xlim ([-20, 20]); 275s hold on 275s 275s ## Estimate their lambda parameter 275s mu_sigma_nuA = tlsfit (r(:,1)); 275s mu_sigma_nuB = tlsfit (r(:,2)); 275s mu_sigma_nuC = tlsfit (r(:,3)); 275s 275s ## Plot their estimated PDFs 275s x = [-20:0.1:20]; 275s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 275s plot (x, y, "-pr"); 275s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 275s plot (x, y, "-sg"); 275s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 275s plot (x, y, "-^c"); 275s hold off 275s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 275s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 275s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 275s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 275s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 275s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 275s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 275s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 275s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 275s title ("Three population samples from different location-scale T distibutions") 275s hold off 275s ***** test 275s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 275s [paramhat, paramci] = tlsfit (x); 275s paramhat_out = [0.035893, 0.862711, 0.649261]; 275s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 275s assert (paramhat, paramhat_out, 1e-6); 275s assert (paramci, paramci_out, 1e-5); 275s ***** test 275s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 275s [paramhat, paramci] = tlsfit (x, 0.01); 275s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 275s assert (paramci, paramci_out, 1e-4); 275s ***** error tlsfit (ones (2,5)); 275s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 275s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 275s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 275s ***** error ... 275s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 275s 12 tests, 12 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/bisalike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/bisalike.m 275s ***** test 275s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 275s assert (nlogL, 215.5905, 1e-4); 275s ***** test 275s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 275s assert (nlogL, 8.9950, 1e-4); 275s ***** error bisalike (3.25) 275s ***** error bisalike ([5, 0.2], ones (2)) 275s ***** error bisalike ([5, 0.2], [-1, 3]) 275s ***** error ... 275s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 275s ***** error ... 275s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 275s ***** error ... 275s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 275s ***** error ... 275s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 275s 9 tests, 9 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/normlike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/normlike.m 275s ***** error normlike ([12, 15]); 275s ***** error normlike ([12, 15], ones (2)); 275s ***** error ... 275s normlike ([12, 15, 3], [1:50]); 275s ***** error ... 275s normlike ([12, 15], [1:50], [1, 2, 3]); 275s ***** error ... 275s normlike ([12, 15], [1:50], [], [1, 2, 3]); 275s ***** error ... 275s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = normlike ([2.3, 1.2], x); 275s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 275s assert (nlogL, 13014.95883783327, 1e-10); 275s assert (avar, avar_out, 1e-4); 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 275s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 275s assert (nlogL, 2854.802587833265, 1e-10); 275s assert (avar, avar_out, 1e-4); 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = normlike ([21, 15], x); 275s avar_out = [5.460474308300396, -1.600790513833993; ... 275s -1.600790513833993, 2.667984189723321]; 275s assert (nlogL, 206.738325604233, 1e-12); 275s assert (avar, avar_out, 1e-14); 275s ***** test 275s x = 1:50; 275s censor = ones (1, 50); 275s censor([2, 4, 6, 8, 12, 14]) = 0; 275s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 275s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 275s assert (nlogL, Inf); 275s assert (avar, [NaN, NaN; NaN, NaN]); 275s ***** test 275s x = 1:50; 275s censor = ones (1, 50); 275s censor([2, 4, 6, 8, 12, 14]) = 0; 275s [nlogL, avar] = normlike ([21, 15], x, censor); 275s avar_out = [24.4824488866131, -10.6649544179636; ... 275s -10.6649544179636, 6.22827849965737]; 275s assert (nlogL, 86.9254371829733, 1e-12); 275s assert (avar, avar_out, 8e-14); 275s 11 tests, 11 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/burrlike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/burrlike.m 275s ***** error burrlike (3.25) 275s ***** error burrlike ([1, 2, 3], ones (2)) 275s ***** error burrlike ([1, 2, 3], [-1, 3]) 275s ***** error ... 275s burrlike ([1, 2], [1, 3, 5, 7]) 275s ***** error ... 275s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 275s ***** error ... 275s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 275s ***** error ... 275s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 275s ***** error ... 275s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 275s 8 tests, 8 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/evlike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/evlike.m 275s ***** test 275s x = 1:50; 275s [nlogL, acov] = evlike ([2.3, 1.2], x); 275s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 275s assert (nlogL, 3.242264755689906e+17, 1e-14); 275s assert (acov, avar_out, 1e-3); 275s ***** test 275s x = 1:50; 275s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 275s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 275s assert (nlogL, 481898704.0472211, 1e-6); 275s assert (acov, avar_out, 1e-3); 275s ***** test 275s x = 1:50; 275s [nlogL, acov] = evlike ([21, 15], x); 275s avar_out = [11.73913876598908, -5.9546128523121216; ... 275s -5.954612852312121, 3.708060045170236]; 275s assert (nlogL, 223.7612479380652, 1e-13); 275s assert (acov, avar_out, 1e-14); 275s ***** error evlike ([12, 15]) 275s ***** error evlike ([12, 15, 3], [1:50]) 275s ***** error evlike ([12, 3], ones (10, 2)) 275s ***** error ... 275s evlike ([12, 15], [1:50], [1, 2, 3]) 275s ***** error ... 275s evlike ([12, 15], [1:50], [], [1, 2, 3]) 275s 8 tests, 8 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/gevfit_lmom.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gevfit_lmom.m 275s ***** xtest <31070> 275s data = 1:50; 275s [pfit, pci] = gevfit_lmom (data); 275s expected_p = [-0.28 15.01 20.22]'; 275s assert (pfit, expected_p, 0.1); 275s 1 test, 1 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/bisafit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/bisafit.m 275s ***** demo 275s ## Sample 3 populations from different Birnbaum-Saunders distibutions 275s rand ("seed", 5); # for reproducibility 275s r1 = bisarnd (1, 0.5, 2000, 1); 275s rand ("seed", 2); # for reproducibility 275s r2 = bisarnd (2, 0.3, 2000, 1); 275s rand ("seed", 7); # for reproducibility 275s r3 = bisarnd (4, 0.5, 2000, 1); 275s r = [r1, r2, r3]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, 80, 4.2); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s set (h(3), "facecolor", "r"); 275s ylim ([0, 1.1]); 275s xlim ([0, 8]); 275s hold on 275s 275s ## Estimate their α and β parameters 275s beta_gammaA = bisafit (r(:,1)); 275s beta_gammaB = bisafit (r(:,2)); 275s beta_gammaC = bisafit (r(:,3)); 275s 275s ## Plot their estimated PDFs 275s x = [0:0.1:8]; 275s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 275s plot (x, y, "-pr"); 275s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 275s plot (x, y, "-sg"); 275s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 275s plot (x, y, "-^c"); 275s hold off 275s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 275s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 275s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 275s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 275s beta_gammaA(1), beta_gammaA(2)), ... 275s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 275s beta_gammaB(1), beta_gammaB(2)), ... 275s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 275s beta_gammaC(1), beta_gammaC(2))}) 275s title ("Three population samples from different Birnbaum-Saunders distibutions") 275s hold off 275s ***** test 275s paramhat = bisafit ([1:50]); 275s paramhat_out = [16.2649, 1.0156]; 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** test 275s paramhat = bisafit ([1:5]); 275s paramhat_out = [2.5585, 0.5839]; 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** error bisafit (ones (2,5)); 275s ***** error bisafit ([-1 2 3 4]); 275s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 275s ***** error bisafit ([1, 2, 3, 4, 5], 0); 275s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 275s ***** error ... 275s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 275s ***** error ... 275s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 275s ***** error ... 275s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 275s ***** error ... 275s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 275s ***** error ... 275s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 275s 12 tests, 12 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/poisslike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/poisslike.m 275s ***** test 275s x = [1 3 2 4 5 4 3 4]; 275s [nlogL, avar] = poisslike (3.25, x); 275s assert (nlogL, 13.9533, 1e-4) 275s ***** test 275s x = [1 2 3 4 5]; 275s f = [1 1 2 3 1]; 275s [nlogL, avar] = poisslike (3.25, x, f); 275s assert (nlogL, 13.9533, 1e-4) 275s ***** error poisslike (1) 275s ***** error poisslike ([1 2 3], [1 2]) 275s ***** error ... 275s poisslike (3.25, ones (10, 2)) 275s ***** error ... 275s poisslike (3.25, [1 2 3 -4 5]) 275s ***** error ... 275s poisslike (3.25, ones (10, 1), ones (8,1)) 275s ***** error ... 275s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 275s 8 tests, 8 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/betafit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/betafit.m 275s ***** demo 275s ## Sample 2 populations from different Beta distibutions 275s randg ("seed", 1); # for reproducibility 275s r1 = betarnd (2, 5, 500, 1); 275s randg ("seed", 2); # for reproducibility 275s r2 = betarnd (2, 2, 500, 1); 275s r = [r1, r2]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, 12, 15); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s hold on 275s 275s ## Estimate their shape parameters 275s a_b_A = betafit (r(:,1)); 275s a_b_B = betafit (r(:,2)); 275s 275s ## Plot their estimated PDFs 275s x = [min(r(:)):0.01:max(r(:))]; 275s y = betapdf (x, a_b_A(1), a_b_A(2)); 275s plot (x, y, "-pr"); 275s y = betapdf (x, a_b_B(1), a_b_B(2)); 275s plot (x, y, "-sg"); 275s ylim ([0, 4]) 275s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 275s "Normalized HIST of sample 2 with α=2 and β=2", ... 275s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 275s a_b_A(1), a_b_A(2)), ... 275s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 275s a_b_B(1), a_b_B(2))}) 275s title ("Two population samples from different Beta distibutions") 275s hold off 275s ***** test 275s x = 0.01:0.02:0.99; 275s [paramhat, paramci] = betafit (x); 275s paramhat_out = [1.0199, 1.0199]; 275s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 275s assert (paramhat, paramhat_out, 1e-4); 275s assert (paramci, paramci_out, 1e-4); 275s ***** test 275s x = 0.01:0.02:0.99; 275s [paramhat, paramci] = betafit (x, 0.01); 275s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 275s assert (paramci, paramci_out, 1e-4); 275s ***** test 275s x = 0.00:0.02:1; 275s [paramhat, paramci] = betafit (x); 275s paramhat_out = [0.0875, 0.1913]; 275s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 275s assert (paramhat, paramhat_out, 1e-4); 275s assert (paramci, paramci_out, 1e-4); 275s ***** error betafit ([0.2, 0.5+i]); 275s ***** error betafit (ones (2,2) * 0.5); 275s ***** error betafit ([0.5, 1.2]); 275s ***** error betafit ([0.1, 0.1]); 275s ***** error betafit ([0.01:0.1:0.99], 1.2); 275s ***** error ... 275s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 275s ***** error ... 275s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 275s ***** error ... 275s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 275s ***** error ... 275s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 275s ***** error ... 275s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 275s 13 tests, 13 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/loglfit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/loglfit.m 275s ***** demo 275s ## Sample 3 populations from different log-logistic distibutions 275s rand ("seed", 5) # for reproducibility 275s r1 = loglrnd (0, 1, 2000, 1); 275s rand ("seed", 2) # for reproducibility 275s r2 = loglrnd (0, 0.5, 2000, 1); 275s rand ("seed", 7) # for reproducibility 275s r3 = loglrnd (0, 0.125, 2000, 1); 275s r = [r1, r2, r3]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, [0.05:0.1:2.5], 10); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s set (h(3), "facecolor", "r"); 275s ylim ([0, 3.5]); 275s xlim ([0, 2.0]); 275s hold on 275s 275s ## Estimate their MU and LAMBDA parameters 275s a_bA = loglfit (r(:,1)); 275s a_bB = loglfit (r(:,2)); 275s a_bC = loglfit (r(:,3)); 275s 275s ## Plot their estimated PDFs 275s x = [0.01:0.1:2.01]; 275s y = loglpdf (x, a_bA(1), a_bA(2)); 275s plot (x, y, "-pr"); 275s y = loglpdf (x, a_bB(1), a_bB(2)); 275s plot (x, y, "-sg"); 275s y = loglpdf (x, a_bC(1), a_bC(2)); 275s plot (x, y, "-^c"); 275s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 275s "Normalized HIST of sample 2 with α=1 and β=2", ... 275s "Normalized HIST of sample 3 with α=1 and β=8", ... 275s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 275s a_bA(1), a_bA(2)), ... 275s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 275s a_bB(1), a_bB(2)), ... 275s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 275s a_bC(1), a_bC(2))}) 275s title ("Three population samples from different log-logistic distibutions") 275s hold off 275s ***** test 275s [paramhat, paramci] = loglfit ([1:50]); 275s paramhat_out = [3.09717, 0.468525]; 275s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 275s assert (paramhat, paramhat_out, 1e-5); 275s assert (paramci, paramci_out, 1e-5); 275s ***** test 275s paramhat = loglfit ([1:5]); 275s paramhat_out = [1.01124, 0.336449]; 275s assert (paramhat, paramhat_out, 1e-5); 275s ***** test 275s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 275s paramhat_out = [1.01124, 0.336449]; 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** test 275s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 275s paramhat_out = loglfit ([1:5, 5]); 275s assert (paramhat, paramhat_out, 1e-4); 275s ***** error loglfit (ones (2,5)); 275s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 275s ***** error loglfit ([1, 2, 3, 4, 5], 0); 275s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 275s ***** error ... 275s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 275s ***** error ... 275s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 275s ***** error ... 275s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 275s ***** error ... 275s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 275s ***** error ... 275s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 275s 13 tests, 13 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/lognlike.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/lognlike.m 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = lognlike ([0, 0.25], x); 275s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 275s assert (nlogL, 3962.330333301793, 1e-10); 275s assert (avar, avar_out, 1e-7); 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 275s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 275s assert (nlogL, 2473.183051225747, 1e-10); 275s assert (avar, avar_out, 1e-7); 275s ***** test 275s x = 1:50; 275s [nlogL, avar] = lognlike ([0, 0.5], x); 275s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 275s assert (nlogL, 1119.072424020455, 1e-12); 275s assert (avar, avar_out, 1e-6); 275s ***** test 275s x = 1:50; 275s censor = ones (1, 50); 275s censor([2, 4, 6, 8, 12, 14]) = 0; 275s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 275s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 275s assert (nlogL, 1091.746371145497, 1e-12); 275s assert (avar, avar_out, 1e-6); 275s ***** test 275s x = 1:50; 275s censor = ones (1, 50); 275s censor([2, 4, 6, 8, 12, 14]) = 0; 275s [nlogL, avar] = lognlike ([0, 1], x, censor); 275s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 275s assert (nlogL, 349.3969104144271, 1e-12); 275s assert (avar, avar_out, 1e-6); 275s ***** error ... 275s lognlike ([12, 15]); 275s ***** error lognlike ([12, 15], ones (2)); 275s ***** error ... 275s lognlike ([12, 15, 3], [1:50]); 275s ***** error ... 275s lognlike ([12, 15], [1:50], [1, 2, 3]); 275s ***** error ... 275s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 275s 10 tests, 10 passed, 0 known failure, 0 skipped 275s [inst/dist_fit/gamfit.m] 275s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/gamfit.m 275s ***** demo 275s ## Sample 3 populations from different Gamma distibutions 275s randg ("seed", 5); # for reproducibility 275s r1 = gamrnd (1, 2, 2000, 1); 275s randg ("seed", 2); # for reproducibility 275s r2 = gamrnd (2, 2, 2000, 1); 275s randg ("seed", 7); # for reproducibility 275s r3 = gamrnd (7.5, 1, 2000, 1); 275s r = [r1, r2, r3]; 275s 275s ## Plot them normalized and fix their colors 275s hist (r, 75, 4); 275s h = findobj (gca, "Type", "patch"); 275s set (h(1), "facecolor", "c"); 275s set (h(2), "facecolor", "g"); 275s set (h(3), "facecolor", "r"); 275s ylim ([0, 0.62]); 275s xlim ([0, 12]); 275s hold on 275s 275s ## Estimate their α and β parameters 275s a_bA = gamfit (r(:,1)); 275s a_bB = gamfit (r(:,2)); 275s a_bC = gamfit (r(:,3)); 275s 275s ## Plot their estimated PDFs 275s x = [0.01,0.1:0.2:18]; 275s y = gampdf (x, a_bA(1), a_bA(2)); 275s plot (x, y, "-pr"); 275s y = gampdf (x, a_bB(1), a_bB(2)); 275s plot (x, y, "-sg"); 275s y = gampdf (x, a_bC(1), a_bC(2)); 275s plot (x, y, "-^c"); 275s hold off 275s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 275s "Normalized HIST of sample 2 with α=2 and β=2", ... 275s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 275s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 275s a_bA(1), a_bA(2)), ... 275s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 275s a_bB(1), a_bB(2)), ... 275s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 275s a_bC(1), a_bC(2))}) 275s title ("Three population samples from different Gamma distibutions") 275s hold off 275s ***** shared x 275s 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]; 275s ***** test 275s [paramhat, paramci] = gamfit (x); 275s assert (paramhat, [3.4248, 0.9752], 1e-4); 275s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 275s ***** test 275s [paramhat, paramci] = gamfit (x, 0.01); 275s assert (paramhat, [3.4248, 0.9752], 1e-4); 275s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 275s ***** test 275s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 275s [paramhat, paramci] = gamfit (x, [], [], freq); 275s assert (paramhat, [3.3025, 1.0615], 1e-4); 275s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 275s ***** test 275s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 275s assert (paramhat, [4.4484, 0.9689], 1e-4); 275s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 275s ***** test 275s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 275s assert (paramhat, [4.4484, 0.9689], 1e-4); 275s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 275s ***** test 275s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 275s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 275s assert (paramhat, [4.7537, 0.9308], 1e-4); 275s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 276s ***** test 276s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 276s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 276s [paramhat, paramci] = gamfit (x, [], cens, freq); 276s assert (paramhat, [3.4736, 1.0847], 1e-4); 276s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 276s ***** test 276s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 276s assert (paramhat, [Inf, 0]); 276s assert (paramci, [Inf, 0; Inf, 0]); 276s ***** test 276s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 276s assert (paramhat, [NaN, NaN]); 276s assert (paramci, [NaN, NaN; NaN, NaN]); 276s ***** test 276s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 276s assert (paramhat, [Inf, 0]); 276s assert (paramci, [Inf, 0; Inf, 0]); 276s ***** assert (class (gamfit (single (x))), "single") 276s ***** error gamfit (ones (2)) 276s ***** error gamfit (x, 1) 276s ***** error gamfit (x, -1) 276s ***** error gamfit (x, {0.05}) 276s ***** error gamfit (x, "a") 276s ***** error gamfit (x, i) 276s ***** error gamfit (x, [0.01 0.02]) 276s ***** error 276s gamfit ([1 2 3], 0.05, [], [1 5]) 276s ***** error 276s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 276s ***** error ... 276s gamfit ([1:10], 0.05, [], [], 5) 276s ***** error gamfit ([1 2 3 -4]) 276s ***** error ... 276s gamfit ([1 2 0], [], [1 0 0]) 276s 23 tests, 23 passed, 0 known failure, 0 skipped 276s [inst/dist_fit/ricefit.m] 276s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/ricefit.m 276s ***** demo 276s ## Sample 3 populations from different Gamma distibutions 276s randg ("seed", 5); # for reproducibility 276s randp ("seed", 6); 276s r1 = ricernd (1, 2, 3000, 1); 276s randg ("seed", 2); # for reproducibility 276s randp ("seed", 8); 276s r2 = ricernd (2, 4, 3000, 1); 276s randg ("seed", 7); # for reproducibility 276s randp ("seed", 9); 276s r3 = ricernd (7.5, 1, 3000, 1); 276s r = [r1, r2, r3]; 276s 276s ## Plot them normalized and fix their colors 276s hist (r, 75, 4); 276s h = findobj (gca, "Type", "patch"); 276s set (h(1), "facecolor", "c"); 276s set (h(2), "facecolor", "g"); 276s set (h(3), "facecolor", "r"); 276s ylim ([0, 0.7]); 276s xlim ([0, 12]); 276s hold on 276s 276s ## Estimate their α and β parameters 276s s_sigmaA = ricefit (r(:,1)); 276s s_sigmaB = ricefit (r(:,2)); 276s s_sigmaC = ricefit (r(:,3)); 276s 276s ## Plot their estimated PDFs 276s x = [0.01,0.1:0.2:18]; 276s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 276s plot (x, y, "-pr"); 276s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 276s plot (x, y, "-sg"); 276s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 276s plot (x, y, "-^c"); 276s hold off 276s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 276s "Normalized HIST of sample 2 with s=2 and σ=4", ... 276s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 276s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 276s s_sigmaA(1), s_sigmaA(2)), ... 276s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 276s s_sigmaB(1), s_sigmaB(2)), ... 276s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 276s s_sigmaC(1), s_sigmaC(2))}) 276s title ("Three population samples from different Rician distibutions") 276s hold off 276s ***** test 276s [paramhat, paramci] = ricefit ([1:50]); 276s assert (paramhat, [15.3057, 17.6668], 1e-4); 276s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 276s ***** test 276s [paramhat, paramci] = ricefit ([1:50], 0.01); 276s assert (paramhat, [15.3057, 17.6668], 1e-4); 276s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 276s ***** test 276s [paramhat, paramci] = ricefit ([1:5]); 276s assert (paramhat, [2.3123, 1.6812], 1e-4); 276s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 276s ***** test 276s [paramhat, paramci] = ricefit ([1:5], 0.01); 276s assert (paramhat, [2.3123, 1.6812], 1e-4); 276s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 276s ***** test 276s freq = [1 1 1 1 5]; 276s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 276s assert (paramhat, [3.5181, 1.5565], 1e-4); 276s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 276s ***** test 276s censor = [1 0 0 0 0]; 276s [paramhat, paramci] = ricefit ([1:5], [], censor); 276s assert (paramhat, [3.2978, 1.1527], 1e-4); 276s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 276s ***** assert (class (ricefit (single ([1:50]))), "single") 276s ***** error ricefit (ones (2)) 276s ***** error ricefit ([1:50], 1) 276s ***** error ricefit ([1:50], -1) 276s ***** error ricefit ([1:50], {0.05}) 276s ***** error ricefit ([1:50], "k") 276s ***** error ricefit ([1:50], i) 276s ***** error ricefit ([1:50], [0.01 0.02]) 276s ***** error ricefit ([1:50], [], [1 1]) 276s ***** error ricefit ([1:50], [], [], [1 1]) 276s ***** error ... 276s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 276s ***** error ricefit ([1 2 3 -4]) 276s ***** error ricefit ([1 2 0], [], [1 0 0]) 276s 19 tests, 19 passed, 0 known failure, 0 skipped 276s [inst/dist_fit/evfit.m] 276s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/evfit.m 276s ***** demo 276s ## Sample 3 populations from different extreme value distibutions 276s rand ("seed", 1); # for reproducibility 276s r1 = evrnd (2, 5, 400, 1); 276s rand ("seed", 12); # for reproducibility 276s r2 = evrnd (-5, 3, 400, 1); 276s rand ("seed", 13); # for reproducibility 276s r3 = evrnd (14, 8, 400, 1); 276s r = [r1, r2, r3]; 276s 276s ## Plot them normalized and fix their colors 276s hist (r, 25, 0.4); 276s h = findobj (gca, "Type", "patch"); 276s set (h(1), "facecolor", "c"); 276s set (h(2), "facecolor", "g"); 276s set (h(3), "facecolor", "r"); 276s ylim ([0, 0.28]) 276s xlim ([-30, 30]); 276s hold on 276s 276s ## Estimate their MU and SIGMA parameters 276s mu_sigmaA = evfit (r(:,1)); 276s mu_sigmaB = evfit (r(:,2)); 276s mu_sigmaC = evfit (r(:,3)); 276s 276s ## Plot their estimated PDFs 276s x = [min(r(:)):max(r(:))]; 276s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 276s plot (x, y, "-pr"); 276s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 276s plot (x, y, "-sg"); 276s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 276s plot (x, y, "-^c"); 276s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 276s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 276s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 276s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 276s mu_sigmaA(1), mu_sigmaA(2)), ... 276s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 276s mu_sigmaB(1), mu_sigmaB(2)), ... 276s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 276s mu_sigmaC(1), mu_sigmaC(2))}) 276s title ("Three population samples from different extreme value distibutions") 276s hold off 276s ***** test 276s x = 1:50; 276s [paramhat, paramci] = evfit (x); 276s paramhat_out = [32.6811, 13.0509]; 276s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 276s assert (paramhat, paramhat_out, 1e-4); 276s assert (paramci, paramci_out, 1e-4); 276s ***** test 276s x = 1:50; 276s [paramhat, paramci] = evfit (x, 0.01); 276s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 276s assert (paramci, paramci_out, 1e-4); 276s ***** error evfit (ones (2,5)); 276s ***** error evfit (single (ones (1,5))); 276s ***** error evfit ([1, 2, 3, 4, NaN]); 276s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 276s ***** error 276s evfit ([1 2 3], 0.05, [], [1 5]) 276s ***** error 276s evfit ([1 2 3], 0.05, [], [1 5 -1]) 276s ***** error ... 276s evfit ([1:10], 0.05, [], [], 5) 276s 9 tests, 9 passed, 0 known failure, 0 skipped 276s [inst/dist_fit/logilike.m] 276s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fit/logilike.m 276s ***** test 276s nlogL = logilike ([25.5, 8.7725], [1:50]); 276s assert (nlogL, 206.6769, 1e-4); 276s ***** test 276s nlogL = logilike ([3, 0.8645], [1:5]); 276s assert (nlogL, 9.0699, 1e-4); 276s ***** error logilike (3.25) 276s ***** error logilike ([5, 0.2], ones (2)) 276s ***** error ... 276s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 276s ***** error ... 276s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 276s ***** error ... 276s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 276s ***** error ... 276s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 276s 8 tests, 8 passed, 0 known failure, 0 skipped 276s [inst/kstest2.m] 276s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/kstest2.m 276s ***** error kstest2 ([1,2,3,4,5,5]) 276s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 276s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 276s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 276s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 276s ***** test 276s load examgrades 276s [h, p] = kstest2 (grades(:,1), grades(:,2)); 276s assert (h, false); 276s assert (p, 0.1222791870137312, 1e-14); 276s ***** test 276s load examgrades 276s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 276s assert (h, false); 276s assert (p, 0.1844421391011258, 1e-14); 276s ***** test 276s load examgrades 276s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 276s assert (h, false); 276s assert (p, 0.06115357930171663, 1e-14); 276s ***** test 276s load examgrades 276s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 276s assert (h, true); 276s assert (p, 0.06115357930171663, 1e-14); 276s 14 tests, 14 passed, 0 known failure, 0 skipped 276s [inst/confusionchart.m] 276s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/confusionchart.m 276s ***** demo 276s ## Setting the chart properties 276s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 276s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 276s confusionchart (Yt, Yp, "Title", ... 276s "Demonstration with summaries","Normalization",... 276s "absolute","ColumnSummary", "column-normalized","RowSummary",... 276s "row-normalized") 276s ***** demo 276s ## Cellstr as inputs 276s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 276s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 276s m = confusionmat (Yt, Yp); 276s confusionchart (m, {"Positive", "Negative"}); 276s ***** demo 276s ## Editing the object properties 276s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 276s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 276s cm = confusionchart (Yt, Yp); 276s cm.Title = "This is an example with a green diagonal"; 276s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 276s ***** demo 276s ## Confusion chart in a uipanel 276s h = uipanel (); 276s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 276s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 276s cm = confusionchart (h, Yt, Yp); 276s ***** demo 276s ## Sorting classes 276s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 276s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 276s cm = confusionchart (Yt, Yp, "Title", ... 276s "Classes are sorted in ascending order"); 276s cm = confusionchart (Yt, Yp, "Title", ... 276s "Classes are sorted according to clusters"); 276s sortClasses (cm, "cluster"); 276s ***** shared visibility_setting 276s visibility_setting = get (0, "DefaultFigureVisible"); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ()", "Invalid call"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 276s ".* YLabel .* string"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 276s set (0, "DefaultFigureVisible", visibility_setting); 276s ***** test 276s set (0, "DefaultFigureVisible", "off"); 276s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 276s ".* FontName .* string"); 276s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 277s ".* FontSize .* numeric"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 277s ".* DiagonalColor .* color"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 277s ".* OffDiagonalColor .* color"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 277s ".* invalid .* Normalization"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 277s ".* invalid .* ColumnSummary"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 277s ".* invalid .* RowSummary"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 277s ".* invalid .* GridVisible"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 277s ".* invalid .* HandleVisibility"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 277s ".* invalid .* OuterPosition"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 277s ".* invalid .* Position"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s ***** test 277s set (0, "DefaultFigureVisible", "off"); 277s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 277s set (0, "DefaultFigureVisible", visibility_setting); 277s 18 tests, 18 passed, 0 known failure, 0 skipped 277s [inst/tabulate.m] 277s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/tabulate.m 277s ***** demo 277s ## Generate a frequency table for a vector of data in a cell array 277s load patients 277s 277s ## Display the first seven entries of the Gender variable 277s gender = Gender(1:7) 277s 277s ## Compute the equency table that shows the number and 277s ## percentage of Male and Female patients 277s tabulate (Gender) 277s ***** demo 277s ## Create a frequency table for a vector of positive integers 277s load patients 277s 277s ## Display the first seven entries of the Gender variable 277s height = Height(1:7) 277s 277s ## Create a frequency table that shows, in its second and third columns, 277s ## the number and percentage of patients with a particular height. 277s table = tabulate (Height); 277s 277s ## Display the first and last seven entries of the frequency table 277s first = table(1:7,:) 277s 277s last = table(end-6:end,:) 277s ***** demo 277s ## Create a frequency table from a character array 277s load carsmall 277s 277s ## Tabulate the data in the Origin variable, which shows the 277s ## country of origin of each car in the data set 277s tabulate (Origin) 277s ***** demo 277s ## Create a frequency table from a numeric vector with NaN values 277s load carsmall 277s 277s ## The carsmall dataset contains measurements of 100 cars 277s total_cars = length (MPG) 277s ## For six cars, the MPG value is missing 277s missingMPG = length (MPG(isnan (MPG))) 277s 277s ## Create a frequency table using MPG 277s tabulate (MPG) 277s table = tabulate (MPG); 277s 277s ## Only 94 cars were used 277s valid_cars = sum (table(:,2)) 277s ***** test 277s load patients 277s table = tabulate (Gender); 277s assert (table{1,1}, "Male"); 277s assert (table{2,1}, "Female"); 277s assert (table{1,2}, 47); 277s assert (table{2,2}, 53); 277s ***** test 277s load patients 277s table = tabulate (Height); 277s assert (table(end-4,:), [68, 15, 15]); 277s assert (table(end-3,:), [69, 8, 8]); 277s assert (table(end-2,:), [70, 11, 11]); 277s assert (table(end-1,:), [71, 10, 10]); 277s assert (table(end,:), [72, 4, 4]); 277s ***** error tabulate (ones (3)) 277s ***** error tabulate ({1, 2, 3, 4}) 277s ***** error ... 277s tabulate ({"a", "b"; "a", "c"}) 277s 5 tests, 5 passed, 0 known failure, 0 skipped 277s [inst/multcompare.m] 277s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/multcompare.m 277s ***** demo 277s 277s ## Demonstration using balanced one-way ANOVA from anova1 277s 277s x = ones (50, 4) .* [-2, 0, 1, 5]; 277s randn ("seed", 1); # for reproducibility 277s x = x + normrnd (0, 2, 50, 4); 277s groups = {"A", "B", "C", "D"}; 277s [p, tbl, stats] = anova1 (x, groups, "off"); 277s multcompare (stats); 277s ***** demo 277s 277s ## Demonstration using unbalanced one-way ANOVA example from anovan 277s 277s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 277s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 277s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 277s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 277s 25.694 ]'; 277s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 277s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 277s 277s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 277s "ControlGroup", 1, "display", "on") 277s 277s ***** demo 277s 277s ## Demonstration using factorial ANCOVA example from anovan 277s 277s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 277s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 277s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 277s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 277s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 277s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 277s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 277s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 277s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 277s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 277s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 277s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 277s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 277s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 277s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 277s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 277s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 277s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 277s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 277s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 277s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 277s 277s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 277s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 277s "sstype", "h", "display", "off", "contrasts", ... 277s {"simple","poly",""}); 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 277s "display", "on") 277s 277s ***** demo 277s 277s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 277s ## squares to account for heteroskedasticity. 277s 277s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 277s 2, 2, 2, 2, 2, 2, 2, 2, ... 277s 3, 3, 3, 3, 3, 3, 3, 3]'; 277s 277s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 277s 10, 25, 66, 43, 47, 56, 6, 39, ... 277s 11, 39, 26, 35, 25, 14, 24, 17]'; 277s 277s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 277s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 277s b = polyfit (fitted, abs (STATS.resid), 1); 277s v = polyval (b, fitted); # Variance as a function of the fitted values 277s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 277s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 277s ***** demo 277s 277s ## Demonstration of p-value adjustments to control the false discovery rate 277s ## Data from Westfall (1997) JASA. 92(437):299-306 277s 277s p = [.005708; .023544; .024193; .044895; ... 277s .048805; .221227; .395867; .693051; .775755]; 277s 277s padj = multcompare(p,'ctype','fdr') 277s ***** test 277s 277s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 277s 277s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 277s 277s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 277s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 277s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 277s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 277s 25.694 ]'; 277s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 277s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 277s 277s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 277s "display", "off"); 277s assert (C(1,6), 2.85812420217898e-05, 1e-09); 277s assert (C(2,6), 5.22936741204085e-07, 1e-09); 277s assert (C(3,6), 2.12794763209146e-08, 1e-09); 277s assert (C(4,6), 7.82091664406946e-15, 1e-09); 277s assert (C(5,6), 0.546591417210693, 1e-09); 277s assert (C(6,6), 0.0845897945254446, 1e-09); 277s assert (C(7,6), 9.47436557975328e-08, 1e-09); 277s assert (C(8,6), 0.188873478781067, 1e-09); 277s assert (C(9,6), 4.08974010364197e-08, 1e-09); 277s assert (C(10,6), 4.44427348175241e-06, 1e-09); 277s assert (M(1,1), 10, 1e-09); 277s assert (M(2,1), 18, 1e-09); 277s assert (M(3,1), 19, 1e-09); 277s assert (M(4,1), 21.0001428571429, 1e-09); 277s assert (M(5,1), 29.0001111111111, 1e-09); 277s assert (M(1,2), 1.0177537954095, 1e-09); 277s assert (M(2,2), 1.28736803631001, 1e-09); 277s assert (M(3,2), 1.0177537954095, 1e-09); 277s assert (M(4,2), 1.0880245732889, 1e-09); 277s assert (M(5,2), 0.959547480416536, 1e-09); 277s 277s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 277s "display", "off"); 277s assert (C(1,6), 4.08303457454140e-05, 1e-09); 277s assert (C(2,6), 1.04587348240817e-06, 1e-09); 277s assert (C(3,6), 1.06397381604573e-07, 1e-09); 277s assert (C(4,6), 7.82091664406946e-14, 1e-09); 277s assert (C(5,6), 5.46591417210693e-01, 1e-09); 277s assert (C(6,6), 1.05737243156806e-01, 1e-09); 277s assert (C(7,6), 2.36859139493832e-07, 1e-09); 277s assert (C(8,6), 2.09859420867852e-01, 1e-09); 277s assert (C(9,6), 1.36324670121399e-07, 1e-09); 277s assert (C(10,6), 7.40712246958735e-06, 1e-09); 277s 277s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 277s "display", "off"); 277s assert (C(1,6), 1.14324968087159e-04, 1e-09); 277s assert (C(2,6), 3.13762044722451e-06, 1e-09); 277s assert (C(3,6), 1.91515286888231e-07, 1e-09); 277s assert (C(4,6), 7.82091664406946e-14, 1e-09); 277s assert (C(5,6), 5.46591417210693e-01, 1e-09); 277s assert (C(6,6), 2.53769383576334e-01, 1e-09); 277s assert (C(7,6), 6.63205590582730e-07, 1e-09); 277s assert (C(8,6), 3.77746957562134e-01, 1e-09); 277s assert (C(9,6), 3.27179208291358e-07, 1e-09); 277s assert (C(10,6), 2.22213674087620e-05, 1e-09); 277s 277s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 277s "display", "off"); 277s assert (C(1,6), 1.14324968087159e-04, 1e-09); 277s assert (C(2,6), 3.13762044722451e-06, 1e-09); 277s assert (C(3,6), 1.91515286888231e-07, 1e-09); 277s assert (C(4,6), 7.82091664406946e-14, 1e-09); 277s assert (C(5,6), 5.46591417210693e-01, 1e-09); 277s assert (C(6,6), 2.53769383576334e-01, 1e-09); 277s assert (C(7,6), 6.63205590582730e-07, 1e-09); 277s assert (C(8,6), 3.77746957562134e-01, 1e-09); 277s assert (C(9,6), 3.27179208291358e-07, 1e-09); 277s assert (C(10,6), 2.22213674087620e-05, 1e-09); 277s 277s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 277s "display", "off"); 277s assert (C(1,6), 0.00108105386141085, 1e-09); 277s assert (C(2,6), 2.7779386789517e-05, 1e-09); 277s assert (C(3,6), 1.3599854038198e-06, 1e-09); 277s assert (C(4,6), 7.58830197867751e-13, 1e-09); 277s assert (C(5,6), 0.984039948220281, 1e-09); 277s assert (C(6,6), 0.539077018557706, 1e-09); 277s assert (C(7,6), 5.59475764460574e-06, 1e-09); 277s assert (C(8,6), 0.771173490574105, 1e-09); 277s assert (C(9,6), 2.52838425729905e-06, 1e-09); 277s assert (C(10,6), 0.000200719143889168, 1e-09); 277s 277s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 277s 277s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 277s "display", "off"); 277s assert (C(1,6), 2.85812420217898e-04, 1e-09); 277s assert (C(2,6), 5.22936741204085e-06, 1e-09); 277s assert (C(3,6), 2.12794763209146e-07, 1e-09); 277s assert (C(4,6), 7.82091664406946e-14, 1e-09); 277s assert (C(5,6), 1.00000000000000e+00, 1e-09); 277s assert (C(6,6), 8.45897945254446e-01, 1e-09); 277s assert (C(7,6), 9.47436557975328e-07, 1e-09); 277s assert (C(8,6), 1.00000000000000e+00, 1e-09); 277s assert (C(9,6), 4.08974010364197e-07, 1e-09); 277s assert (C(10,6), 4.44427348175241e-05, 1e-09); 277s 277s ## Test for anova1 ("equal")- comparison of results from Matlab 277s 277s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 277s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 277s assert (C(1,6), 2.85812420217898e-05, 1e-09); 277s assert (C(2,6), 5.22936741204085e-07, 1e-09); 277s assert (C(3,6), 2.12794763209146e-08, 1e-09); 277s assert (C(4,6), 7.82091664406946e-15, 1e-09); 277s assert (C(5,6), 0.546591417210693, 1e-09); 277s assert (C(6,6), 0.0845897945254446, 1e-09); 277s assert (C(7,6), 9.47436557975328e-08, 1e-09); 277s assert (C(8,6), 0.188873478781067, 1e-09); 277s assert (C(9,6), 4.08974010364197e-08, 1e-09); 277s assert (C(10,6), 4.44427348175241e-06, 1e-09); 277s assert (M(1,1), 10, 1e-09); 277s assert (M(2,1), 18, 1e-09); 277s assert (M(3,1), 19, 1e-09); 277s assert (M(4,1), 21.0001428571429, 1e-09); 277s assert (M(5,1), 29.0001111111111, 1e-09); 277s assert (M(1,2), 1.0177537954095, 1e-09); 277s assert (M(2,2), 1.28736803631001, 1e-09); 277s assert (M(3,2), 1.0177537954095, 1e-09); 277s assert (M(4,2), 1.0880245732889, 1e-09); 277s assert (M(5,2), 0.959547480416536, 1e-09); 277s 277s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 277s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 277s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 277s assert (C(1,6), 0.001247025266382, 1e-09); 277s assert (C(2,6), 0.000018037115146, 1e-09); 277s assert (C(3,6), 0.000002974595187, 1e-09); 277s assert (C(4,6), 0.000000000786046, 1e-09); 277s assert (C(5,6), 0.5693192886650109, 1e-09); 277s assert (C(6,6), 0.110501699029776, 1e-09); 277s assert (C(7,6), 0.000131226488700, 1e-09); 277s assert (C(8,6), 0.1912101409715992, 1e-09); 277s assert (C(9,6), 0.000005385256394, 1e-09); 277s 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); 278s ***** test 278s ## Test p-value adjustments compared to R stats package function p.adjust 278s ## Data from Westfall (1997) JASA. 92(437):299-306 278s p = [.005708; .023544; .024193; .044895; ... 278s .048805; .221227; .395867; .693051; .775755]; 278s padj = multcompare (p); 278s assert (padj(1), 0.051372, 1e-06); 278s assert (padj(2), 0.188352, 1e-06); 278s assert (padj(3), 0.188352, 1e-06); 278s assert (padj(4), 0.269370, 1e-06); 278s assert (padj(5), 0.269370, 1e-06); 278s assert (padj(6), 0.884908, 1e-06); 278s assert (padj(7), 1.000000, 1e-06); 278s assert (padj(8), 1.000000, 1e-06); 278s assert (padj(9), 1.000000, 1e-06); 278s padj = multcompare(p,'ctype','holm'); 278s assert (padj(1), 0.051372, 1e-06); 278s assert (padj(2), 0.188352, 1e-06); 278s assert (padj(3), 0.188352, 1e-06); 278s assert (padj(4), 0.269370, 1e-06); 278s assert (padj(5), 0.269370, 1e-06); 278s assert (padj(6), 0.884908, 1e-06); 278s assert (padj(7), 1.000000, 1e-06); 278s assert (padj(8), 1.000000, 1e-06); 278s assert (padj(9), 1.000000, 1e-06); 278s padj = multcompare(p,'ctype','hochberg'); 278s assert (padj(1), 0.051372, 1e-06); 278s assert (padj(2), 0.169351, 1e-06); 278s assert (padj(3), 0.169351, 1e-06); 278s assert (padj(4), 0.244025, 1e-06); 278s assert (padj(5), 0.244025, 1e-06); 278s assert (padj(6), 0.775755, 1e-06); 278s assert (padj(7), 0.775755, 1e-06); 278s assert (padj(8), 0.775755, 1e-06); 278s assert (padj(9), 0.775755, 1e-06); 278s padj = multcompare(p,'ctype','fdr'); 278s assert (padj(1), 0.0513720, 1e-07); 278s assert (padj(2), 0.0725790, 1e-07); 278s assert (padj(3), 0.0725790, 1e-07); 278s assert (padj(4), 0.0878490, 1e-07); 278s assert (padj(5), 0.0878490, 1e-07); 278s assert (padj(6), 0.3318405, 1e-07); 278s assert (padj(7), 0.5089719, 1e-07); 278s assert (padj(8), 0.7757550, 1e-07); 278s assert (padj(9), 0.7757550, 1e-07); 278s 8 tests, 8 passed, 0 known failure, 0 skipped 278s [inst/shadow9/median.m] 278s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/shadow9/median.m 278s ***** assert (median (1), 1) 278s ***** assert (median ([1,2,3]), 2) 278s ***** assert (median ([1,2,3]'), 2) 278s ***** assert (median (cat(3,3,1,2)), 2) 278s ***** assert (median ([3,1,2]), 2) 278s ***** assert (median ([2,4,6,8]), 5) 278s ***** assert (median ([8,2,6,4]), 5) 278s ***** assert (median (single ([1,2,3])), single (2)) 278s ***** assert (median ([1,2], 3), [1,2]) 278s ***** test 278s x = [1, 2, 3, 4, 5, 6]; 278s x2 = x'; 278s y = [1, 2, 3, 4, 5, 6, 7]; 278s y2 = y'; 278s 278s assert (median (x) == median (x2) && median (x) == 3.5); 278s assert (median (y) == median (y2) && median (y) == 4); 278s assert (median ([x2, 2 * x2]), [3.5, 7]); 278s assert (median ([y2, 3 * y2]), [4, 12]); 278s ***** test 278s in = [1 2 3]; 278s out = 2; 278s assert (median (in, "default"), median (in)); 278s assert (median (in, "default"), out); 278s ***** test 278s in = single ([1 2 3]); 278s out = 2; 278s assert (median (in, "default"), single (median (in))); 278s assert (median (in, "default"), single (out)); 278s assert (median (in, "double"), double (out)); 278s assert (median (in, "native"), single (out)); 278s ***** test 278s in = uint8 ([1 2 3]); 278s out = 2; 278s assert (median (in, "default"), double (median (in))); 278s assert (median (in, "default"), double (out)); 278s assert (median (in, "double"), out); 278s assert (median (in, "native"), uint8 (out)); 278s ***** test 278s in = logical ([1 0 1]); 278s out = 1; 278s assert (median (in, "default"), double (median (in))); 278s assert (median (in, "default"), double (out)); 278s assert (median (in, "double"), double (out)); 278s assert (median (in, "native"), double (out)); 278s ***** test 278s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 278s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 278s assert (median (x), y); 278s assert (median (x, 1), y); 278s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 278s assert (median (x, "omitnan"), y); 278s assert (median (x, 1, "omitnan"), y); 278s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 278s assert (median (x, 2, "omitnan"), y); 278s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 278s assert (median (x, 2), y); 278s assert (median (x, "all"), NaN); 278s assert (median (x, "all", "omitnan"), 2); 278s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 278s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 278s ***** test 278s assert (median (true, "all"), logical (1)); 278s assert (median (false), logical (0)); 278s assert (median ([true false true]), true); 278s assert (median ([true false true], 2), true); 278s assert (median ([true false true], 1), logical ([1 0 1])); 278s assert (median ([true false NaN], 1), [1 0 NaN]); 278s assert (median ([true false NaN], 2), NaN); 278s assert (median ([true false NaN], 2, "omitnan"), 0.5); 278s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 278s ***** test 278s x = repmat ([1:20;6:25], [5 2 6 3]); 278s assert (size (median (x, [3 2])), [10 1 1 3]); 278s assert (size (median (x, [1 2])), [1 1 6 3]); 278s assert (size (median (x, [1 2 4])), [1 1 6]); 278s assert (size (median (x, [1 4 3])), [1 40]); 278s assert (size (median (x, [1 2 3 4])), [1 1]); 278s ***** assert (median (ones (2,2), 3), ones (2,2)) 278s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 278s ***** assert (median (magic (3), 3), magic (3)) 278s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 278s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 278s ***** test 278s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 278s assert (median (x, [3 2]), [NaN NaN 1.4]'); 278s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 278s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 278s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 278s ***** assert (median (NaN), NaN) 278s ***** assert (median (NaN, "omitnan"), NaN) 278s ***** assert (median (NaN (2)), [NaN NaN]) 278s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 278s ***** assert (median ([1 NaN 3]), NaN) 278s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 278s ***** assert (median ([1 NaN 3], 2), NaN) 278s ***** assert (median ([1 NaN 3]'), NaN) 278s ***** assert (median ([1 NaN 3]', 1), NaN) 278s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 278s ***** assert (median ([1 NaN 3], "omitnan"), 2) 278s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 278s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 278s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 278s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 278s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 278s ***** assert (median ([1 2 NaN 3]), NaN) 278s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 278s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 278s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 278s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 278s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 278s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 278s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 278s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 278s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 278s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 278s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 278s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 278s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 278s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 278s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 278s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 278s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 278s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 278s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 278s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 278s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 278s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 278s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 278s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 278s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 278s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 278s ***** assert (median (NaN("single")), NaN("single")) 278s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 278s ***** assert (median (NaN("single"), "double"), NaN("double")) 278s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 278s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 278s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 278s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 278s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 278s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 278s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 278s ***** test <*64011> 278s x = [magic(3), magic(3)]; 278s x([3, 7, 11, 12, 16, 17]) = NaN; 278s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 278s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 278s assert (median (x), ynan); 278s assert (median (x, "omitnan"), yomitnan, eps); 278s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 278s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 278s ***** assert (median (Inf), Inf) 278s ***** assert (median (-Inf), -Inf) 278s ***** assert (median ([-Inf Inf]), NaN) 278s ***** assert (median ([3 Inf]), Inf) 278s ***** assert (median ([3 4 Inf]), 4) 278s ***** assert (median ([Inf 3 4]), 4) 278s ***** assert (median ([Inf 3 Inf]), Inf) 278s ***** assert (median ([1, 2, Inf]), 2) 278s ***** assert (median ([1, 2, Inf, Inf]), Inf) 278s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 278s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 278s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 278s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 278s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 278s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 278s ***** assert (median ([]), NaN) 278s ***** assert (median (ones(1,0)), NaN) 278s ***** assert (median (ones(0,1)), NaN) 278s ***** assert (median ([], 1), NaN(1,0)) 278s ***** assert (median ([], 2), NaN(0,1)) 278s ***** assert (median ([], 3), NaN(0,0)) 278s ***** assert (median (ones(1,0), 1), NaN(1,0)) 278s ***** assert (median (ones(1,0), 2), NaN(1,1)) 278s ***** assert (median (ones(1,0), 3), NaN(1,0)) 278s ***** assert (median (ones(0,1), 1), NaN(1,1)) 278s ***** assert (median (ones(0,1), 2), NaN(0,1)) 278s ***** assert (median (ones(0,1), 3), NaN(0,1)) 278s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 278s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 278s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 278s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 278s ***** assert (median([1 3 3i 2 1i]), 2) 278s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 278s ***** shared a, b, x, y 278s old_state = rand ("state"); 278s restore_state = onCleanup (@() rand ("state", old_state)); 278s rand ("state", 2); 278s a = rand (2,3,4,5); 278s b = rand (3,4,6,5); 278s x = sort (a, 4); 278s y = sort (b, 3); 278s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 278s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 278s ***** shared ## Clear shared to prevent variable echo for any later test failures 278s ***** test 278s x = ones(15,1,4); 278s x([13,15],1,:) = NaN; 278s assert (median (x, 1, "omitnan"), ones (1,1,4)) 278s ***** assert (median ([true, false]), true) 278s ***** assert (median (logical ([])), false) 278s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 278s ***** assert (median (uint8 ([])), uint8 (NaN)) 278s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 278s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 278s ***** assert (median (int8 ([])), int8 (NaN)) 278s ***** assert (median (single ([1, 3, 4])), single (3)) 278s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 278s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 278s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 278s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 278s int8 ([64 65 65 67])) 278s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 278s int8 ([126; 4])) 278s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 278s intmax ("int64") - 1) 278s ***** assert <54567> (median ( ... 278s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 278s int64([intmax("int64") - 1; 2])) 278s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 278s intmax ("uint64") - 1) 278s ***** assert <54567> (median ( ... 278s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 278s uint64([intmax("uint64") - 1; 2])) 278s ***** assert <54567> (median (... 278s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 278s int8(-1)) 278s ***** assert <54567> (median ([int8([1 2 3 4]); ... 278s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 278s int8([3;-1])) 278s ***** assert <54567> (median (... 278s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 278s int64(-1)) 278s ***** assert <54567> (median ([int64([1 2 3 4]); ... 278s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 278s int64([3;-1])) 278s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 278s intmax("uint64")-1) 278s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 278s double(intmax("uint64")-1)) 278s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 278s double(intmax("uint64")-1)) 278s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 278s intmax("uint64")-1) 278s ***** assert (median ([1 2 3], "aLL"), 2) 278s ***** assert (median ([1 2 3], "OmitNan"), 2) 278s ***** assert (median ([1 2 3], "DOUBle"), 2) 278s ***** error median () 278s ***** error median (1, 2, 3) 278s ***** error median (1, 2, 3, 4) 278s ***** error median (1, "all", 3) 278s ***** error median (1, "b") 279s ***** error median (1, 1, "foo") 279s ***** error <'all' cannot be used with> median (1, 3, "all") 279s ***** error <'all' cannot be used with> median (1, [2 3], "all") 279s ***** error median ({1:5}) 279s ***** error median ("char") 279s ***** error median(1, "double", "native") 279s ***** error median (1, ones (2,2)) 279s ***** error median (1, 1.5) 279s ***** error median (1, 0) 279s ***** error median ([1 2 3], [-1 1]) 279s ***** error median(1, [1 2 2]) 279s 159 tests, 159 passed, 0 known failure, 0 skipped 279s [inst/shadow9/var.m] 279s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/shadow9/var.m 279s ***** assert (var (13), 0) 279s ***** assert (var (single (13)), single (0)) 279s ***** assert (var ([1,2,3]), 1) 279s ***** assert (var ([1,2,3], 1), 2/3, eps) 279s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 279s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 279s ***** assert (var (5, 99), 0) 279s ***** assert (var (5, 99, 1), 0) 279s ***** assert (var (5, 99, 2), 0) 279s ***** assert (var ([5 3], [99 99], 2), 1) 279s ***** assert (var ([1:7], [1:7]), 3) 279s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 279s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 279s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 279s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 279s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 279s ***** test 279s x = [-10:10]; 279s y = [x;x+5;x-5]; 279s assert (var (x), 38.5); 279s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 279s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 279s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 279s assert (var (y, "all"), 54.19354838709678, 1e-14); 279s y(2,4) = NaN; 279s assert (var (y, "all"), NaN); 279s assert (var (y, "all", "includenan"), NaN); 279s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 279s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 279s assert (var (y, [], 2), [38.5; NaN; 38.5]); 279s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 279s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 279s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 279s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 279s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 279s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 279s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 279s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 279s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 279s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 279s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 279s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 279s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 279s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 279s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 279s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 279s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 279s 60 * ones(1,1,2)) 279s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 279s 6 * ones(1,3,2)) 279s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 279s ***** test 279s x = reshape(1:18, [3 3 2]); 279s x([2, 14]) = NaN; 279s w = ones (3,3,2); 279s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 279s ***** test 279s x = reshape(1:18, [3 3 2]); 279s w = ones (3,3,2); 279s w([2, 14]) = NaN; 279s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 279s ***** assert (var ([1 2 3], "aLl"), 1); 279s ***** assert (var ([1 2 3], "OmitNan"), 1); 279s ***** assert (var ([1 2 3], "IncludeNan"), 1); 279s ***** test 279s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 279s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 279s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 279s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 279s assert (size (var (x, 0, [1 4 3])), [1, 40]); 279s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 279s ***** assert (var (3*magic(3)), [63 144 63]) 279s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 279s ***** assert (var (3*magic(3), 1), [42 96 42]) 279s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 279s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 279s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 279s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 279s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 279s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 279s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 279s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 279s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 279s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 279s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 279s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 279s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 279s ***** test 279s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 279s v = repmat (33.38912133891213, [10, 1, 1, 3]); 279s assert (var (x, 0, [3, 2]), v, 1e-14); 279s v = repmat (33.250, [10, 1, 1, 3]); 279s assert (var (x, 1, [3, 2]), v, 1e-14); 279s x(2,5,6,3) = NaN; 279s v(2,1,1,3) = NaN; 279s assert (var (x, 1, [3, 2]), v, 4e-14); 279s v = repmat (33.38912133891213, [10 1 1 3]); 279s v(2,1,1,3) = NaN; 279s assert (var (x, [], [3, 2]), v, 4e-14); 279s v(2,1,1,3) = 33.40177912169048; 279s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 279s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 279s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 279s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 279s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 279s ***** assert (var (magic (3), [], 3), zeros (3,3)) 279s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 279s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 279s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 279s ***** assert (var ([]), NaN) 279s ***** assert (class (var (single ([]))), "single") 279s ***** assert (var ([],[],1), NaN(1,0)) 279s ***** assert (var ([],[],2), NaN(0,1)) 279s ***** assert (var ([],[],3), []) 279s ***** assert (class (var (single ([]), [], 1)), "single") 279s ***** assert (var (ones (1,0)), NaN) 279s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 279s ***** assert (var (ones (1,0), [], 2), NaN) 279s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 279s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 279s ***** assert (var (ones (0,1)), NaN) 279s ***** assert (var (ones (0,1), [], 1), NaN) 279s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 279s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 279s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 279s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 279s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 279s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 279s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 279s ***** test 279s [~, m] = var ([]); 279s assert (m, NaN); 279s ***** test <*62395> 279s [~, m] = var (13); 279s assert (m, 13); 279s [~, m] = var (single(13)); 279s assert (m, single(13)); 279s [~, m] = var ([1, 2, 3; 3 2 1], []); 279s assert (m, [2 2 2]); 279s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 279s assert (m, [2 2 2]); 279s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 279s assert (m, [2 2]'); 279s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 279s assert (m, [1 2 3; 3 2 1]); 279s ***** test <*62395> 279s [~, m] = var (5,99); 279s assert (m, 5); 279s [~, m] = var ([1:7], [1:7]); 279s assert (m, 5); 279s [~, m] = var ([eye(3)], [1:3]); 279s assert (m, [1/6, 1/3, 0.5], eps); 279s [~, m] = var (ones (2,2,2), [1:2], 3); 279s assert (m, ones (2,2)); 279s [~, m] = var ([1 2; 3 4], 0, 'all'); 279s assert (m, 2.5, eps); 279s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 279s assert (m, [3.5, 5.5], eps); 279s ***** test 279s [v, m] = var (4 * eye (2), [1, 3]); 279s assert (v, [3, 3]); 279s assert (m, [1, 3]); 279s ***** test <*62395> 279s [~, m] = var ([]); 279s assert (m, NaN); 279s ***** test <*62395> 279s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 279s [~, m] = var (x, 0, [3 2]); 279s assert (m, mean (x, [3 2])); 279s [~, m] = var (x, 0, [1 2]); 279s assert (m, mean (x, [1 2])); 279s [~, m] = var (x, 0, [1 3 4]); 279s assert (m, mean (x, [1 3 4])); 279s ***** test 279s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 279s x(2,5,6,3) = NaN; 279s [~, m] = var (x, 0, [3 2], "omitnan"); 279s assert (m, mean (x, [3 2], "omitnan")); 279s ***** test <*63203> 279s [v, m] = var (Inf); 279s assert (v, NaN); 279s assert (m, Inf); 279s ***** test <*63203> 279s [v, m] = var (NaN); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3]); 279s assert (v, NaN); 279s assert (m, Inf); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3]'); 279s assert (v, NaN); 279s assert (m, Inf); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3]); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3]'); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3], [], 1); 279s assert (v, [0, NaN, 0]); 279s assert (m, [1, Inf, 3]); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3], [], 2); 279s assert (v, NaN); 279s assert (m, Inf); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3], [], 3); 279s assert (v, [0, NaN, 0]); 279s assert (m, [1, Inf, 3]); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3], [], 1); 279s assert (v, [0, NaN, 0]); 279s assert (m, [1, NaN, 3]); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3], [], 2); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3], [], 3); 279s assert (v, [0, NaN, 0]); 279s assert (m, [1, NaN, 3]); 279s ***** test <*63203> 279s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 279s assert (v, [2, NaN, 2]); 279s assert (m, [2, Inf, 4]); 279s ***** test <*63203> 279s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 279s assert (v, [2, NaN, 2]); 279s assert (m, [2, Inf, 4]); 279s ***** test <*63203> 279s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 279s assert (v, [2, NaN, 2]); 279s assert (m, [2, NaN, 4]); 279s ***** test <*63203> 279s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 279s assert (v, [2, NaN, 2]); 279s assert (m, [2, NaN, 4]); 279s ***** test <*63203> 279s [v, m] = var ([Inf, 2, NaN]); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([Inf, 2, NaN]'); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([NaN, 2, Inf]); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([NaN, 2, Inf]'); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([Inf, 2, NaN], [], 1); 279s assert (v, [NaN, 0, NaN]); 279s assert (m, [Inf, 2, NaN]); 279s ***** test <*63203> 279s [v, m] = var ([Inf, 2, NaN], [], 2); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([NaN, 2, Inf], [], 1); 279s assert (v, [NaN, 0, NaN]); 279s assert (m, [NaN, 2, Inf]); 279s ***** test <*63203> 279s [v, m] = var ([NaN, 2, Inf], [], 2); 279s assert (v, NaN); 279s assert (m, NaN); 279s ***** test <*63203> 279s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 279s assert (v, [2, 2, NaN]); 279s assert (m, [2, 4, NaN]); 279s ***** test <*63203> 279s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 279s assert (v, [2, 2, NaN]); 279s assert (m, [2, 4, NaN]); 279s ***** test <*63291> 279s [v, m] = var (2 * eye (2)); 279s assert (v, [2, 2]); 279s assert (m, [1, 1]); 279s ***** test <*63291> 279s [v, m] = var (4 * eye (2), [1, 3]); 279s assert (v, [3, 3]); 279s assert (m, [1, 3]); 279s ***** test <*63291> 279s [v, m] = var (sparse (2 * eye (2))); 279s assert (full (v), [2, 2]); 279s assert (full (m), [1, 1]); 279s ***** test <*63291> 279s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 279s assert (full (v), [3, 3]); 279s assert (full (m), [1, 3]); 279s ***** test<*63291> 279s [v, m] = var (sparse (eye (2))); 279s assert (issparse (v)); 279s assert (issparse (m)); 279s ***** test<*63291> 279s [v, m] = var (sparse (eye (2)), [1, 3]); 279s assert (issparse (v)); 279s assert (issparse (m)); 279s ***** error var () 279s ***** error var (1, 2, "omitnan", 3) 279s ***** error var (1, 2, 3, 4) 279s ***** error var (1, 2, 3, 4, 5) 280s ***** error var (1, "foo") 280s ***** error var (1, [], "foo") 280s ***** error var ([1 2 3], 2) 280s ***** error var ([1 2], 2, "all") 280s ***** error var ([1 2],0.5, "all") 280s ***** error var (1, -1) 280s ***** error var (1, [1 -1]) 280s ***** error ... 280s var ([1 2 3], [1 -1 0]) 280s ***** error var ({1:5}) 280s ***** error var ("char") 280s ***** error var (['A'; 'B']) 280s ***** error var (1, [], ones (2,2)) 280s ***** error var (1, 0, 1.5) 280s ***** error var (1, [], 0) 280s ***** error var (1, [], 1.5) 280s ***** error var ([1 2 3], [], [-1 1]) 280s ***** error ... 280s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 280s ***** error ... 280s var ([1 2], eye (2)) 280s ***** error ... 280s var ([1 2 3 4], [1 2; 3 4]) 280s ***** error ... 280s var ([1 2 3 4], [1 2; 3 4], 1) 280s ***** error ... 280s var ([1 2 3 4], [1 2; 3 4], [2 3]) 280s ***** error ... 280s var (ones (2, 2), [1 2], [1 2]) 280s ***** error ... 280s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 280s ***** error ... 280s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 280s ***** error var ([1 2 3; 2 3 4], [1 3 4]) 280s ***** error var ([1 2], [1 2 3]) 280s ***** error var (1, [1 2]) 280s ***** error var ([1 2 3; 2 3 4], [1 3 4], 1) 280s ***** error var ([1 2 3; 2 3 4], [1 3], 2) 280s ***** error var ([1 2], [1 2], 1) 280s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 280s var (1, [], 1, "all") 280s ***** error ... 280s var ([1 2 3; 2 3 4], [1 3], "all") 280s ***** error ... 280s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 280s 162 tests, 162 passed, 0 known failure, 0 skipped 280s [inst/shadow9/mean.m] 280s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/shadow9/mean.m 280s ***** test 280s x = -10:10; 280s y = x'; 280s z = [y, y+10]; 280s assert (mean (x), 0); 280s assert (mean (y), 0); 280s assert (mean (z), [0, 10]); 280s ***** assert (mean (magic (3), 1), [5, 5, 5]) 280s ***** assert (mean (magic (3), 2), [5; 5; 5]) 280s ***** assert (mean (logical ([1 0 1 1])), 0.75) 280s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 280s ***** assert (mean ([1 2], 3), [1 2]) 280s ***** test 280s in = [1 2 3]; 280s out = 2; 280s assert (mean (in, "default"), mean (in)); 280s assert (mean (in, "default"), out); 280s assert (mean (in, "double"), out); 280s assert (mean (in, "native"), out); 280s ***** test 280s in = single ([1 2 3]); 280s out = 2; 280s assert (mean (in, "default"), mean (in)); 280s assert (mean (in, "default"), single (out)); 280s assert (mean (in, "double"), out); 280s assert (mean (in, "native"), single (out)); 280s ***** test 280s in = logical ([1 0 1]); 280s out = 2/3; 280s assert (mean (in, "default"), mean (in), eps); 280s assert (mean (in, "default"), out, eps); 280s assert (mean (in, "double"), out, eps); 280s assert (mean (in, "native"), out, eps); 280s ***** test 280s in = char ("ab"); 280s out = 97.5; 280s assert (mean (in, "default"), mean (in), eps); 280s assert (mean (in, "default"), out, eps); 280s assert (mean (in, "double"), out, eps); 280s ***** test 280s in = uint8 ([1 2 3]); 280s out = 2; 280s assert (mean (in, "default"), mean (in)); 280s assert (mean (in, "default"), out); 280s assert (mean (in, "double"), out); 280s assert (mean (in, "native"), uint8 (out)); 280s ***** test 280s in = uint8 ([0 1 2 3]); 280s out = 1.5; 280s out_u8 = 2; 280s assert (mean (in, "default"), mean (in), eps); 280s assert (mean (in, "default"), out, eps); 280s assert (mean (in, "double"), out, eps); 280s assert (mean (in, "native"), uint8 (out_u8)); 280s assert (class (mean (in, "native")), "uint8"); 280s ***** test # internal sum exceeding intmax 280s in = uint8 ([3 141 141 255]); 280s out = 135; 280s assert (mean (in, "default"), mean (in)); 280s assert (mean (in, "default"), out); 280s assert (mean (in, "double"), out); 280s assert (mean (in, "native"), uint8 (out)); 280s assert (class (mean (in, "native")), "uint8"); 280s ***** test # fractional answer with internal sum exceeding intmax 280s in = uint8 ([1 141 141 255]); 280s out = 134.5; 280s out_u8 = 135; 280s assert (mean (in, "default"), mean (in)); 280s assert (mean (in, "default"), out); 280s assert (mean (in, "double"), out); 280s assert (mean (in, "native"), uint8 (out_u8)); 280s assert (class (mean (in, "native")), "uint8"); 280s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 280s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 280s out_same = intmax ("uint64")-1; 280s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 280s out_opp = -1; 280s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 280s out_neg = intmin ("int64")+1; 280s 280s ## both positive 280s assert (mean (in_same, "default"), mean (in_same)); 280s assert (mean (in_same, "default"), double (out_same)); 280s assert (mean (in_same, "double"), double (out_same)); 280s assert (mean (in_same, "native"), uint64 (out_same)); 280s assert (class (mean (in_same, "native")), "uint64"); 280s 280s ## opposite signs 280s assert (mean (in_opp, "default"), mean (in_opp)); 280s assert (mean (in_opp, "default"), double (out_opp)); 280s assert (mean (in_opp, "double"), double (out_opp)); 280s assert (mean (in_opp, "native"), int64 (out_opp)); 280s assert (class (mean (in_opp, "native")), "int64"); 280s 280s ## both negative 280s assert (mean (in_neg, "default"), mean (in_neg)); 280s assert (mean (in_neg, "default"), double(out_neg)); 280s assert (mean (in_neg, "double"), double(out_neg)); 280s assert (mean (in_neg, "native"), int64(out_neg)); 280s assert (class (mean (in_neg, "native")), "int64"); 280s ***** test <54567> 280s in = [(intmin('int64')+5), (intmax('int64'))-5]; 280s assert (mean (in, "native"), int64(-1)); 280s assert (class (mean (in, "native")), "int64"); 280s assert (mean (double(in)), double(0) ); 280s assert (mean (in), double(-0.5) ); 280s assert (mean (in, "default"), double(-0.5) ); 280s assert (mean (in, "double"), double(-0.5) ); 280s assert (mean (in, "all", "native"), int64(-1)); 280s assert (mean (in, 2, "native"), int64(-1)); 280s assert (mean (in, [1 2], "native"), int64(-1)); 280s assert (mean (in, [2 3], "native"), int64(-1)); 280s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 280s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 280s ***** test 280s x = [-10:10]; 280s y = [x;x+5;x-5]; 280s assert (mean (x), 0); 280s assert (mean (y, 2), [0, 5, -5]'); 280s assert (mean (y, "all"), 0); 280s y(2,4) = NaN; 280s assert (mean (y', "omitnan"), [0 5.35 -5]); 280s z = y + 20; 280s assert (mean (z, "all"), NaN); 280s assert (mean (z, "all", "includenan"), NaN); 280s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 280s m = [20 NaN 15]; 280s assert (mean (z'), m); 280s assert (mean (z', "includenan"), m); 280s m = [20 25.35 15]; 280s assert (mean (z', "omitnan"), m); 280s assert (mean (z, 2, "omitnan"), m'); 280s assert (mean (z, 2, "native", "omitnan"), m'); 280s assert (mean (z, 2, "omitnan", "native"), m'); 280s ***** test 280s assert (mean (true, "all"), 1); 280s assert (mean (false), 0); 280s assert (mean ([true false true]), 2/3, 4e-14); 280s assert (mean ([true false true], 1), [1 0 1]); 280s assert (mean ([true false NaN], 1), [1 0 NaN]); 280s assert (mean ([true false NaN], 2), NaN); 280s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 280s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 280s ***** assert (mean ("abc"), double (98)) 280s ***** assert (mean ("ab"), double (97.5), eps) 280s ***** assert (mean ("abc", "double"), double (98)) 280s ***** assert (mean ("abc", "default"), double (98)) 280s ***** test 280s x = magic (4); 280s x([2, 9:12]) = NaN; 280s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 280s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 280s assert (mean (x,2), NaN(4,1), eps); 280s assert (mean (x,3), x, eps); 280s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 280s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 280s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 280s assert (mean (x, 3, 'omitnan'), x, eps); 280s ***** assert (mean ([]), NaN(1,1)) 280s ***** assert (mean (single([])), NaN(1,1,"single")) 280s ***** assert (mean ([], 1), NaN(1,0)) 280s ***** assert (mean ([], 2), NaN(0,1)) 280s ***** assert (mean ([], 3), NaN(0,0)) 280s ***** assert (mean (ones(1,0)), NaN(1,1)) 280s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 280s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 280s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 280s ***** assert (mean (ones(0,1)), NaN(1,1)) 280s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 280s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 280s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 280s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 280s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 280s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 280s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 280s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 280s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 280s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 280s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 280s ***** test 280s x = repmat ([1:20;6:25], [5 2 6 3]); 280s assert (size (mean (x, [3 2])), [10 1 1 3]); 280s assert (size (mean (x, [1 2])), [1 1 6 3]); 280s assert (size (mean (x, [1 2 4])), [1 1 6]); 280s assert (size (mean (x, [1 4 3])), [1 40]); 280s assert (size (mean (x, [1 2 3 4])), [1 1]); 280s ***** assert (mean (ones (2,2), 3), ones (2,2)) 280s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 280s ***** assert (mean (magic (3), 3), magic (3)) 280s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 280s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 280s ***** test 280s x = repmat ([1:20;6:25], [5 2 6 3]); 280s m = repmat ([10.5;15.5], [5 1 1 3]); 280s assert (mean (x, [3 2]), m, 4e-14); 280s x(2,5,6,3) = NaN; 280s m(2,1,1,3) = NaN; 280s assert (mean (x, [3 2]), m, 4e-14); 280s m(2,1,1,3) = 15.52301255230125; 280s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 280s ***** assert (mean ([1 2 3], "aLL"), 2) 280s ***** assert (mean ([1 2 3], "OmitNan"), 2) 280s ***** assert (mean ([1 2 3], "DOUBle"), 2) 280s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 280s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 281s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 281s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 281s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 282s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 282s 35184372088833-1/(2^8), eps(35184372088833)) 282s !!!!! known bug: https://octave.org/testfailure/?63848 282s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 282s 282s Location | Observed | Expected | Reason 282s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 282s ***** error mean () 282s ***** error mean (1, 2, 3) 283s ***** error mean (1, 2, 3, 4) 283s ***** error mean (1, "all", 3) 283s ***** error mean (1, "b") 283s ***** error mean (1, 1, "foo") 283s ***** error mean ("abc", "native") 283s ***** error mean ({1:5}) 283s ***** error mean (1, ones (2,2)) 283s ***** error mean (1, 1.5) 283s ***** error mean (1, 0) 283s ***** error mean (1, []) 283s ***** error mean (1, -1) 283s ***** error mean (1, -1.5) 283s ***** error mean (1, NaN) 283s ***** error mean (1, Inf) 283s ***** error mean (repmat ([1:20;6:25], [5 2]), -1) 283s ***** error mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 283s ***** error mean (1, ones(1,0)) 283s ***** error mean (1, [2 2]) 283s 80 tests, 79 passed, 0 known failure, 1 skipped 283s [inst/shadow9/std.m] 283s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/shadow9/std.m 283s ***** assert (std (13), 0) 283s ***** assert (std (single (13)), single (0)) 283s ***** assert (std ([1,2,3]), 1) 283s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 283s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 283s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 283s ***** assert (std (5, 99), 0) 283s ***** assert (std (5, 99, 1), 0) 283s ***** assert (std (5, 99, 2), 0) 283s ***** assert (std ([5 3], [99 99], 2), 1) 283s ***** assert (std ([1:7], [1:7]), sqrt (3)) 283s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 283s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 283s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 283s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 283s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 283s ***** test 283s x = [-10:10]; 283s y = [x;x+5;x-5]; 283s assert (std (x), sqrt (38.5), 1e-14); 283s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 283s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 283s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 283s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 283s y(2,4) = NaN; 283s assert (std (y, "all"), NaN); 283s assert (std (y, "all", "includenan"), NaN); 283s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 283s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 283s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 283s assert (std (y, [], 2, "omitnan"), ... 283s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 283s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 283s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 283s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 283s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 283s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 283s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 283s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 283s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 283s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 283s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 283s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 283s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 283s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 283s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 283s sqrt(5)*ones(1,3,2), eps) 283s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 283s sqrt(5)*ones(3,1,2), eps) 283s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 283s sqrt(60)*ones(1,1,2),eps) 283s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 283s sqrt(6)*ones(1,3,2),eps) 283s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 283s sqrt(969),eps) 283s ***** test 283s x = reshape(1:18, [3 3 2]); 283s x([2, 14]) = NaN; 283s w = ones (3,3,2); 283s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 283s ***** test 283s x = reshape(1:18, [3 3 2]); 283s w = ones (3,3,2); 283s w([2, 14]) = NaN; 283s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 283s ***** assert (std ([1 2 3], "aLl"), 1); 283s ***** assert (std ([1 2 3], "OmitNan"), 1); 283s ***** assert (std ([1 2 3], "IncludeNan"), 1); 283s ***** test 283s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 283s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 283s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 283s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 283s assert (size (std (x, 0, [1 4 3])), [1, 40]); 283s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 283s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 283s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 283s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 283s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 283s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 283s sqrt([42 36 42]), eps) 283s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 283s sqrt([42 36 42]), eps) 283s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 283s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 283s sqrt([42 36 42]), eps) 283s ***** test 283s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 283s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 283s assert (std (x, 0, [3, 2]), v, 1e-14); 283s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 283s assert (std (x, 1, [3, 2]), v, 1e-14); 283s x(2,5,6,3) = NaN; 283s v(2,1,1,3) = NaN; 283s assert (std (x, 1, [3, 2]), v, 1e-14); 283s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 283s v(2,1,1,3) = NaN; 283s assert (std (x, [], [3, 2]), v, 1e-14); 283s v(2,1,1,3) = sqrt (33.40177912169048); 283s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 283s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 283s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 283s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 283s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 283s ***** assert (std (magic (3), [], 3), zeros (3,3)) 283s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 283s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 283s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 283s ***** assert (std ([]), NaN) 283s ***** assert (class (var (single ([]))), "single") 283s ***** assert (std ([],[],1), NaN(1,0)) 283s ***** assert (std ([],[],2), NaN(0,1)) 283s ***** assert (std ([],[],3), []) 283s ***** assert (class (var (single ([]), [], 1)), "single") 283s ***** assert (std (ones (1,0)), NaN) 283s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 283s ***** assert (std (ones (1,0), [], 2), NaN) 283s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 283s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 283s ***** assert (std (ones (0,1)), NaN) 283s ***** assert (std (ones (0,1), [], 1), NaN) 283s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 283s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 283s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 283s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 283s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 283s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 283s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 283s ***** test 283s [~, m] = std ([]); 283s assert (m, NaN); 283s ***** test <*62395> 283s [~, m] = std (13); 283s assert (m, 13); 283s [~, m] = std (single(13)); 283s assert (m, single(13)); 283s [~, m] = std ([1, 2, 3; 3 2 1], []); 283s assert (m, [2 2 2]); 283s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 283s assert (m, [2 2 2]); 283s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 283s assert (m, [2 2]'); 283s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 283s assert (m, [1 2 3; 3 2 1]); 283s ***** test <*62395> 283s [~, m] = std (5,99); 283s assert (m, 5); 283s [~, m] = std ([1:7], [1:7]); 283s assert (m, 5); 283s [~, m] = std ([eye(3)], [1:3]); 283s assert (m, [1/6, 1/3, 0.5], eps); 283s [~, m] = std (ones (2,2,2), [1:2], 3); 283s assert (m, ones (2,2)); 283s [~, m] = std ([1 2; 3 4], 0, 'all'); 283s assert (m, 2.5, eps); 283s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 283s assert (m, [3.5, 5.5], eps); 283s ***** test 283s [v, m] = std (4 * eye (2), [1, 3]); 283s assert (v, sqrt ([3, 3]), 1e-14); 283s assert (m, [1, 3]); 283s ***** test <*62395> 283s [~, m] = std ([]); 283s assert (m, NaN); 283s ***** test 283s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 283s [~, m] = std (x, 0, [3 2]); 283s assert (m, mean (x, [3 2])); 283s [~, m] = std (x, 0, [1 2]); 283s assert (m, mean (x, [1 2])); 283s [~, m] = std (x, 0, [1 3 4]); 283s assert (m, mean (x, [1 3 4])); 283s ***** test 283s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 283s x(2,5,6,3) = NaN; 283s [~, m] = std (x, 0, [3 2], "omitnan"); 283s assert (m, mean (x, [3 2], "omitnan")); 283s ***** test <*63203> 283s [v, m] = std (Inf); 283s assert (v, NaN); 283s assert (m, Inf); 283s ***** test <*63203> 283s [v, m] = std (NaN); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3]); 283s assert (v, NaN); 283s assert (m, Inf); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3]'); 283s assert (v, NaN); 283s assert (m, Inf); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3]); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3]'); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3], [], 1); 283s assert (v, [0, NaN, 0]); 283s assert (m, [1, Inf, 3]); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3], [], 2); 283s assert (v, NaN); 283s assert (m, Inf); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3], [], 3); 283s assert (v, [0, NaN, 0]); 283s assert (m, [1, Inf, 3]); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3], [], 1); 283s assert (v, [0, NaN, 0]); 283s assert (m, [1, NaN, 3]); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3], [], 2); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3], [], 3); 283s assert (v, [0, NaN, 0]); 283s assert (m, [1, NaN, 3]); 283s ***** test <*63203> 283s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 283s assert (v, sqrt ([2, NaN, 2])); 283s assert (m, [2, Inf, 4]); 283s ***** test <*63203> 283s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 283s assert (v, sqrt ([2, NaN, 2])); 283s assert (m, [2, Inf, 4]); 283s ***** test <*63203> 283s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 283s assert (v, sqrt ([2, NaN, 2])); 283s assert (m, [2, NaN, 4]); 283s ***** test <*63203> 283s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 283s assert (v, sqrt ([2, NaN, 2])); 283s assert (m, [2, NaN, 4]); 283s ***** test <*63203> 283s [v, m] = std ([Inf, 2, NaN]); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([Inf, 2, NaN]'); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([NaN, 2, Inf]); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([NaN, 2, Inf]'); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([Inf, 2, NaN], [], 1); 283s assert (v, [NaN, 0, NaN]); 283s assert (m, [Inf, 2, NaN]); 283s ***** test <*63203> 283s [v, m] = std ([Inf, 2, NaN], [], 2); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([NaN, 2, Inf], [], 1); 283s assert (v, [NaN, 0, NaN]); 283s assert (m, [NaN, 2, Inf]); 283s ***** test <*63203> 283s [v, m] = std ([NaN, 2, Inf], [], 2); 283s assert (v, NaN); 283s assert (m, NaN); 283s ***** test <*63203> 283s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 283s assert (v, sqrt ([2, 2, NaN])); 283s assert (m, [2, 4, NaN]); 283s ***** test <*63203> 283s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 283s assert (v, sqrt ([2, 2, NaN])); 283s assert (m, [2, 4, NaN]); 283s ***** test <*63291> 283s [v, m] = std (2 * eye (2)); 283s assert (v, sqrt ([2, 2])); 283s assert (m, [1, 1]); 283s ***** test <*63291> 283s [v, m] = std (4 * eye (2), [1, 3]); 283s assert (v, sqrt ([3, 3])); 283s assert (m, [1, 3]); 283s ***** test <*63291> 283s [v, m] = std (sparse (2 * eye (2))); 283s assert (full (v), sqrt ([2, 2])); 283s assert (full (m), [1, 1]); 283s ***** test <*63291> 283s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 283s assert (full (v), sqrt ([3, 3])); 283s assert (full (m), [1, 3]); 283s ***** test <*63291> 283s [v, m] = std (sparse (eye (2))); 283s assert (issparse (v)); 283s assert (issparse (m)); 283s ***** test <*63291> 283s [v, m] = std (sparse (eye (2)), [1, 3]); 283s assert (issparse (v)); 283s assert (issparse (m)); 283s ***** error std () 283s ***** error std (1, 2, "omitnan", 3) 284s ***** error std (1, 2, 3, 4) 284s ***** error std (1, 2, 3, 4, 5) 284s ***** error std (1, "foo") 284s ***** error std (1, [], "foo") 284s ***** error std ([1 2 3], 2) 284s ***** error std ([1 2], 2, "all") 284s ***** error std ([1 2],0.5, "all") 284s ***** error std (1, -1) 284s ***** error std (1, [1 -1]) 284s ***** error ... 284s std ([1 2 3], [1 -1 0]) 284s ***** error std ({1:5}) 284s ***** error std ("char") 284s ***** error std (['A'; 'B']) 284s ***** error std (1, [], ones (2,2)) 284s ***** error std (1, 0, 1.5) 284s ***** error std (1, [], 0) 284s ***** error std (1, [], 1.5) 284s ***** error std ([1 2 3], [], [-1 1]) 284s ***** error ... 284s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 284s ***** error ... 284s std ([1 2], eye (2)) 284s ***** error ... 284s std ([1 2 3 4], [1 2; 3 4]) 284s ***** error ... 284s std ([1 2 3 4], [1 2; 3 4], 1) 284s ***** error ... 284s std ([1 2 3 4], [1 2; 3 4], [2 3]) 284s ***** error ... 284s std (ones (2, 2), [1 2], [1 2]) 284s ***** error ... 284s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 284s ***** error ... 284s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 284s ***** error std ([1 2 3; 2 3 4], [1 3 4]) 284s ***** error std ([1 2], [1 2 3]) 284s ***** error std (1, [1 2]) 284s ***** error std ([1 2 3; 2 3 4], [1 3 4], 1) 284s ***** error std ([1 2 3; 2 3 4], [1 3], 2) 284s ***** error std ([1 2], [1 2], 1) 284s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 284s std (1, [], 1, "all") 284s ***** error ... 284s std ([1 2 3; 2 3 4], [1 3], "all") 284s ***** error ... 284s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 284s 162 tests, 162 passed, 0 known failure, 0 skipped 284s [inst/cdfcalc.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cdfcalc.m 284s ***** test 284s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 284s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 284s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 284s assert (xCDF, [2, 3, 4, 5, 6]'); 284s assert (n, 10); 284s ***** shared x 284s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 284s ***** error yCDF = cdfcalc (x); 284s ***** error [yCDF, xCDF] = cdfcalc (); 284s ***** error [yCDF, xCDF] = cdfcalc (x, x); 284s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 284s 5 tests, 5 passed, 0 known failure, 0 skipped 284s [inst/bar3.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/bar3.m 284s ***** demo 284s ## Ploting 5 bars in the same series. 284s 284s z = [50; 40; 30; 20; 10]; 284s bar3 (z); 284s ***** demo 284s ## Ploting 5 bars in different groups. 284s 284s z = [50, 40, 30, 20, 10]; 284s bar3 (z); 284s ***** demo 284s ## A 3D bar graph with each series corresponding to a column in z. 284s 284s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 284s bar3 (z); 284s ***** demo 284s ## Specify y-axis locations as tick names. y must be a column vector! 284s 284s y = [1950, 1960, 1970, 1980, 1990]'; 284s z = [16, 8, 4, 2, 1]'; 284s bar3 (y, z); 284s ***** demo 284s ## Plot 3 series as a grouped plot without any space between the grouped bars 284s 284s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 284s bar3 (z, 1, 'grouped'); 284s ***** demo 284s ## Plot a stacked style 3D bar graph 284s 284s z = [19, 30, 21, 30; 40, 16, 32, 12]; 284s b = bar3 (z, 0.5, 'stacked'); 284s ***** error bar3 ("A") 284s ***** error bar3 ({2,3,4,5}) 284s ***** error ... 284s bar3 ([1,2,3]', ones (2)) 284s ***** error ... 284s bar3 ([1:5], 1.2) 284s ***** error ... 284s bar3 ([1:5]', ones (5), 1.2) 284s ***** error ... 284s bar3 ([1:5]', ones (5), [0.8, 0.7]) 284s ***** error ... 284s bar3 (ones (5), 'width') 284s ***** error ... 284s bar3 (ones (5), 'width', 1.2) 284s ***** error ... 284s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 284s ***** error ... 284s bar3 (ones (5), 'color') 284s ***** error ... 284s bar3 (ones (5), 'color', [0.8, 0.8]) 284s ***** error ... 284s bar3 (ones (5), 'color', "brown") 284s ***** error ... 284s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 284s ***** error ... 284s bar3 (ones (5), 'xlabel') 284s ***** error ... 284s bar3 (ones (5), 'xlabel', 4) 284s ***** error ... 284s bar3 (ones (5), 'ylabel') 284s ***** error ... 284s bar3 (ones (5), 'ylabel', 4) 284s ***** error bar3 (ones (5), 'this', 4) 284s ***** error ... 284s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 284s ***** error ... 284s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 284s 20 tests, 20 passed, 0 known failure, 0 skipped 284s [inst/rangesearch.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/rangesearch.m 284s ***** demo 284s ## Generate 1000 random 2D points from each of five distinct multivariate 284s ## normal distributions that form five separate classes 284s N = 1000; 284s d = 10; 284s randn ("seed", 5); 284s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 284s randn ("seed", 6); 284s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 284s randn ("seed", 7); 284s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 284s randn ("seed", 8); 284s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 284s randn ("seed", 8); 284s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 284s X = [X1; X2; X3; X4; X5]; 284s 284s ## For each point in X, find the points in X that are within a radius d 284s ## away from the points in X. 284s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 284s 284s ## Select the first point in X (corresponding to the first class) and find 284s ## its nearest neighbors within the radius d. Display these points in 284s ## one color and the remaining points in a different color. 284s x = X(1,:); 284s nearestPoints = X (Idx{1},:); 284s nonNearestIdx = true (size (X, 1), 1); 284s nonNearestIdx(Idx{1}) = false; 284s 284s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 284s hold on 284s scatter (nearestPoints(:,1),nearestPoints(:,2)) 284s scatter (x(1), x(2), "black", "filled") 284s hold off 284s 284s ## Select the last point in X (corresponding to the fifth class) and find 284s ## its nearest neighbors within the radius d. Display these points in 284s ## one color and the remaining points in a different color. 284s x = X(end,:); 284s nearestPoints = X (Idx{1},:); 284s nonNearestIdx = true (size (X, 1), 1); 284s nonNearestIdx(Idx{1}) = false; 284s 284s figure 284s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 284s hold on 284s scatter (nearestPoints(:,1),nearestPoints(:,2)) 284s scatter (x(1), x(2), "black", "filled") 284s hold off 284s ***** shared x, y, X, Y 284s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 284s y = [2, 3, 4; 1, 4, 3]; 284s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 284s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 284s ***** test 284s [idx, D] = rangesearch (x, y, 4); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 284s assert (idx, {[1, 2, 4]; [1, 4]}); 284s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 284s "SortIndices", false); 284s assert (idx, {[1, 2, 4]; [1, 4]}); 284s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 284s ***** test 284s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 284s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 284s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 284s "NSMethod", "exhaustive"); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 284s "NSMethod", "exhaustive"); 284s assert (idx, {[1, 4, 2]; [1, 4]}); 284s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 284s "NSMethod", "exhaustive", "SortIndices", false); 284s assert (idx, {[1, 2, 4]; [1, 4]}); 284s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (X, Y, 4); 284s assert (idx, {[1, 2]; [1, 2, 3]}); 284s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (X, Y, 2); 284s assert (idx, {[1]; [1, 2]}); 284s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 284s ***** test 284s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 284s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 284s assert (idx, {[1, 2]; [1, 2, 3]}); 284s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 284s assert (idx, {[1, 2]; [1, 2, 3]}); 284s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 284s ***** test 284s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 284s "NSMethod", "exhaustive"); 284s assert (idx, {[1, 2]; [1, 2, 3]}); 284s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 284s ***** error rangesearch (1) 284s ***** error ... 284s rangesearch (ones (4, 5), ones (4)) 284s ***** error ... 284s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 284s ***** error ... 284s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 284s 31 tests, 31 passed, 0 known failure, 0 skipped 284s [inst/anova1.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/anova1.m 284s ***** demo 284s x = meshgrid (1:6); 284s randn ("seed", 15); # for reproducibility 284s x = x + normrnd (0, 1, 6, 6); 284s anova1 (x, [], 'off'); 284s ***** demo 284s x = meshgrid (1:6); 284s randn ("seed", 15); # for reproducibility 284s x = x + normrnd (0, 1, 6, 6); 284s [p, atab] = anova1(x); 284s ***** demo 284s x = ones (50, 4) .* [-2, 0, 1, 5]; 284s randn ("seed", 13); # for reproducibility 284s x = x + normrnd (0, 2, 50, 4); 284s groups = {"A", "B", "C", "D"}; 284s anova1 (x, groups); 284s ***** demo 284s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 284s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 284s anova1 (y(:), g(:), "on", "unequal"); 284s ***** test 284s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 284s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 284s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 284s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 284s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 284s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 284s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 284s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 284s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 284s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 284s group = [1:10] .* ones (10,10); 284s group = group(:); 284s [p, tbl] = anova1 (data, group, "off"); 284s assert (p, 0.022661, 1e-6); 284s assert (tbl{2,5}, 2.2969, 1e-4); 284s assert (tbl{2,3}, 9, 0); 284s assert (tbl{4,2}, 0.003903, 1e-6); 284s data = reshape (data, 10, 10); 284s [p, tbl, stats] = anova1 (data, [], "off"); 284s assert (p, 0.022661, 1e-6); 284s assert (tbl{2,5}, 2.2969, 1e-4); 284s assert (tbl{2,3}, 9, 0); 284s assert (tbl{4,2}, 0.003903, 1e-6); 284s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 284s N = 10 * ones (1, 10); 284s assert (stats.means, means, 1e-6); 284s assert (length (stats.gnames), 10, 0); 284s assert (stats.n, N, 0); 284s ***** test 284s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 284s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 284s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 284s assert (p, 0.00004163, 1e-6); 284s assert (tbl{2,5}, 22.573418, 1e-6); 284s assert (tbl{2,3}, 2, 0); 284s assert (tbl{3,3}, 14, 0); 284s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 284s assert (p, 0.00208877, 1e-8); 284s assert (tbl{2,5}, 15.523192, 1e-6); 284s assert (tbl{2,3}, 2, 0); 284s assert (tbl{2,4}, 7.5786897, 1e-6); 284s 2 tests, 2 passed, 0 known failure, 0 skipped 284s [inst/chi2gof.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/chi2gof.m 284s ***** demo 284s x = normrnd (50, 5, 100, 1); 284s [h, p, stats] = chi2gof (x) 284s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 284s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 284s ***** demo 284s x = rand (100,1 ); 284s n = length (x); 284s binedges = linspace (0, 1, 11); 284s expectedCounts = n * diff (binedges); 284s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 284s ***** demo 284s bins = 0:5; 284s obsCounts = [6 16 10 12 4 2]; 284s n = sum(obsCounts); 284s lambdaHat = sum(bins.*obsCounts) / n; 284s expCounts = n * poisspdf(bins,lambdaHat); 284s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 284s "expected", expCounts, "nparams",1) 284s ***** error chi2gof () 284s ***** error chi2gof ([2,3;3,4]) 284s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 284s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 284s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 284s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 284s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 284s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 284s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 284s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 284s ***** test 284s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 284s [h, p, stats] = chi2gof (x); 284s assert (h, 0); 284s assert (p, NaN); 284s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 284s assert (stats.df, 0); 284s assert (stats.edges, [1, 2.5, 4], 1e-14); 284s assert (stats.O, [7, 5], 1e-14); 284s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 284s 11 tests, 11 passed, 0 known failure, 0 skipped 284s [inst/ppplot.m] 284s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ppplot.m 284s ***** test 284s hf = figure ("visible", "off"); 284s unwind_protect 284s 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]); 284s unwind_protect_cleanup 284s close (hf); 284s end_unwind_protect 284s ***** error ppplot () 284s ***** error ppplot (ones (2,2)) 285s ***** error ppplot (1, 2) 285s ***** error ppplot ([1 2 3 4], 2) 285s 5 tests, 5 passed, 0 known failure, 0 skipped 285s [inst/datasample.m] 285s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/datasample.m 285s ***** error datasample(); 285s ***** error datasample(1); 285s ***** error datasample({1, 2, 3}, 1); 285s ***** error datasample([1 2], -1); 285s ***** error datasample([1 2], 1.5); 285s ***** error datasample([1 2], [1 1]); 285s ***** error datasample([1 2], 'g', [1 1]); 285s ***** error datasample([1 2], 1, -1); 285s ***** error datasample([1 2], 1, 1.5); 285s ***** error datasample([1 2], 1, [1 1]); 285s ***** error datasample([1 2], 1, 1, "Replace", -2); 285s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 285s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 285s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 285s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 285s ***** test 285s dat = randn (10, 4); 285s assert (size (datasample (dat, 3, 1)), [3 4]); 285s ***** test 285s dat = randn (10, 4); 285s assert (size (datasample (dat, 3, 2)), [10 3]); 285s 17 tests, 17 passed, 0 known failure, 0 skipped 285s [inst/pdist.m] 285s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/pdist.m 285s ***** shared xy, t, eucl, x 285s xy = [0 1; 0 2; 7 6; 5 6]; 285s t = 1e-3; 285s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 285s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 285s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 285s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 285s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 285s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 285s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 285s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 285s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 285s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 285s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 285s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 285s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 285s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 285s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 285s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 285s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 285s ***** assert (pdist (x, "euclidean"), ... 285s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 285s ***** assert (pdist (x, eucl), ... 285s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 285s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 285s ***** assert (pdist (x, "seuclidean"), ... 285s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 285s ***** warning ... 285s pdist (x, "mahalanobis"); 285s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 285s ***** assert (pdist (x, "minkowski"), ... 285s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 285s ***** assert (pdist (x, "minkowski", 3), ... 285s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 285s ***** assert (pdist (x, "cosine"), ... 285s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 285s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 285s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 285s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 285s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 285s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 285s 29 tests, 29 passed, 0 known failure, 0 skipped 285s [inst/anovan.m] 285s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/anovan.m 285s ***** demo 285s 285s # Two-sample unpaired test on independent samples (equivalent to Student's 285s # t-test). Note that the absolute value of t-statistic can be obtained by 285s # taking the square root of the reported F statistic. In this example, 285s # t = sqrt (1.44) = 1.20. 285s 285s score = [54 23 45 54 45 43 34 65 77 46 65]'; 285s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 285s "female" "female" "female"}'; 285s 285s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 285s ***** demo 285s 285s # Two-sample paired test on dependent or matched samples equivalent to a 285s # paired t-test. As for the first example, the t-statistic can be obtained by 285s # taking the square root of the reported F statistic. Note that the interaction 285s # between treatment x subject was dropped from the full model by assigning 285s # subject as a random factor ('). 285s 285s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 285s treatment = {"before" "after"; "before" "after"; "before" "after"; 285s "before" "after"; "before" "after"}'; 285s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 285s 285s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 285s "model", "full", "random", 2, "sstype", 2, ... 285s "varnames", {"treatment", "subject"}, ... 285s "display", "on"); 285s ***** demo 285s 285s # One-way ANOVA on the data from a study on the strength of structural beams, 285s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 285s 285s strength = [82 86 79 83 84 85 86 87 74 82 ... 285s 78 75 76 77 79 79 77 78 82 79]'; 285s alloy = {"st","st","st","st","st","st","st","st", ... 285s "al1","al1","al1","al1","al1","al1", ... 285s "al2","al2","al2","al2","al2","al2"}'; 285s 285s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 285s "varnames", "alloy"); 285s ***** demo 285s 285s # One-way repeated measures ANOVA on the data from a study on the number of 285s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 285s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 285s # between seconds x subject was dropped from the full model by assigning 285s # subject as a random factor ('). 285s 285s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 285s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 285s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 285s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 285s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 285s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 285s 285s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 285s "model", "full", "random", 2, "sstype", 2, ... 285s "display", "on", "varnames", {"seconds", "subject"}); 285s ***** demo 285s 285s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 285s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 285s # New York: MacMillan 285s 285s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 285s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 285s brands = {"Gourmet", "National", "Generic"; ... 285s "Gourmet", "National", "Generic"; ... 285s "Gourmet", "National", "Generic"; ... 285s "Gourmet", "National", "Generic"; ... 285s "Gourmet", "National", "Generic"; ... 285s "Gourmet", "National", "Generic"}; 285s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 285s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 285s 285s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 285s "display", "on", "model", "full", ... 285s "varnames", {"brands", "popper"}); 285s ***** demo 285s 285s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 285s # gender and having a college degree on salaries of company employees, 285s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 285s 285s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 285s 25 29 27 19 18 21 20 21 22 19]'; 285s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 285s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 285s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 285s 285s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 285s "sstype", 3, "display", "on", "varnames", ... 285s {"gender", "degree"}); 285s ***** demo 285s 285s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 285s # adding sugar and/or milk on the tendency of coffee to make people babble, 285s # in from Navarro (2019): 16.10 285s 285s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 285s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 285s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 285s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 285s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 285s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 285s 285s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 285s "sstype", 3, "display", "on", ... 285s "varnames", {"sugar", "milk"}); 285s ***** demo 285s 285s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 285s # of three different drugs, biofeedback and diet on patient blood pressure, 285s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 285s # * Missing values introduced to make the sample sizes unequal to test the 285s # calculation of different types of sums-of-squares 285s 285s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 285s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 285s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 285s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 285s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 285s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 285s 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; 285s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 285s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 285s 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; 285s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 285s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 285s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 285s 173 194 197 190 176 198 164 190 169 164 176 175; 285s 186 194 201 215 219 209 164 166 159 182 187 174 ... 285s 189 194 217 206 199 195 171 173 196 199 180 NaN; 285s 180 187 199 170 204 194 162 184 183 156 180 173 ... 285s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 285s 285s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 285s "model", "full", "sstype", 3, ... 285s "display", "on", ... 285s "varnames", {"drug", "feedback", "diet"}); 285s ***** demo 285s 285s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 285s # factor. The data is from a randomized block design study on the effects 285s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 285s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 285s # Note that all interactions involving block were dropped from the full model 285s # by assigning block as a random factor ('). 285s 285s measurement = [444 614 423 625 408 856 447 719 ... 285s 764 831 586 782 609 1002 606 766]'; 285s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 285s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 285s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 285s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 285s 285s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 285s "sstype", 2, "model", "full", "random", 3, ... 285s "display", "on", ... 285s "varnames", {"strain", "treatment", "block"}); 285s ***** demo 285s 285s # One-way ANCOVA on data from a study of the additive effects of species 285s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 285s # Text eveR 285s 285s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 285s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 285s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 285s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 285s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 285s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 285s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 285s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 285s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 285s 285s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 285s "continuous", 2, "sstype", "h", "display", "on", ... 285s "varnames", {"species", "temp"}); 285s ***** demo 285s 285s # Factorial ANCOVA on data from a study of the effects of treatment and 285s # exercise on stress reduction score after adjusting for age. Data from R 285s # datarium package). 285s 285s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 285s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 285s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 285s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 285s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 285s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 285s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 285s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 285s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 285s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 285s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 285s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 285s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 285s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 285s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 285s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 285s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 285s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 285s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 285s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 285s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 285s 285s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 285s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 285s "continuous", 3, "sstype", "h", "display", "on", ... 285s "varnames", {"treatment", "exercise", "age"}); 285s ***** demo 285s 285s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 285s # relating to the contrasts are shown in the table of model parameters, and 285s # can be retrieved from the STATS.coeffs output. 285s 285s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 285s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 285s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 285s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 285s 25.694 ]'; 285s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 285s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 285s C = [ 0.4001601 0.3333333 0.5 0.0 285s 0.4001601 0.3333333 -0.5 0.0 285s 0.4001601 -0.6666667 0.0 0.0 285s -0.6002401 0.0000000 0.0 0.5 285s -0.6002401 0.0000000 0.0 -0.5]; 285s 285s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 285s "alpha", 0.05, "display", "on"); 285s ***** demo 285s 285s # One-way ANOVA with the linear model fit by weighted least squares to 285s # account for heteroskedasticity. In this example, the variance appears 285s # proportional to the outcome, so weights have been estimated by initially 285s # fitting the model without weights and regressing the absolute residuals on 285s # the fitted values. Although this data could have been analysed by Welch's 285s # ANOVA test, the approach here can generalize to ANOVA models with more than 285s # one factor. 285s 285s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 285s 2, 2, 2, 2, 2, 2, 2, 2, ... 285s 3, 3, 3, 3, 3, 3, 3, 3]'; 285s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 285s 10, 25, 66, 43, 47, 56, 6, 39, ... 285s 11, 39, 26, 35, 25, 14, 24, 17]'; 285s 285s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 285s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 285s b = polyfit (fitted, abs (STATS.resid), 1); 285s v = polyval (b, fitted); # Variance as a function of the fitted values 285s figure("Name", "Regression of the absolute residuals on the fitted values"); 285s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 285s xlabel("Fitted values"); ylabel("Absolute residuals"); 285s 285s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 285s ***** test 285s score = [54 23 45 54 45 43 34 65 77 46 65]'; 285s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 285s 'female' 'female' 'female'}'; 285s 285s [P, T, STATS] = anovan (score,gender,'display','off'); 285s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 285s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 285s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 285s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 285s ***** test 285s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 285s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 285s 'before' 'after'; 'before' 'after'}'; 285s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 285s 285s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 285s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 285s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 285s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 285s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 285s ***** test 285s strength = [82 86 79 83 84 85 86 87 74 82 ... 285s 78 75 76 77 79 79 77 78 82 79]'; 285s alloy = {'st','st','st','st','st','st','st','st', ... 285s 'al1','al1','al1','al1','al1','al1', ... 285s 'al2','al2','al2','al2','al2','al2'}'; 285s 285s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 285s assert (P(1), 0.000152643638830491, 1e-09); 285s assert (ATAB{2,6}, 15.4, 1e-09); 285s ***** test 285s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 285s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 285s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 285s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 285s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 285s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 285s 285s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 285s assert (P(1), 1.51865926758752e-07, 1e-09); 285s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 285s assert (ATAB{3,2}, 942.533333333333, 1e-09); 285s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 285s ***** test 285s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 285s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 285s brands = {'Gourmet', 'National', 'Generic'; ... 285s 'Gourmet', 'National', 'Generic'; ... 285s 'Gourmet', 'National', 'Generic'; ... 285s 'Gourmet', 'National', 'Generic'; ... 285s 'Gourmet', 'National', 'Generic'; ... 285s 'Gourmet', 'National', 'Generic'}; 285s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 285s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 285s 285s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 285s assert (P(1), 7.67895738278171e-07, 1e-09); 285s assert (P(2), 0.000100373896304998, 1e-09); 285s assert (P(3), 0.746215396636649, 1e-09); 285s assert (ATAB{2,6}, 56.7, 1e-09); 285s assert (ATAB{3,6}, 32.4, 1e-09); 285s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 285s ***** test 285s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 285s 25 29 27 19 18 21 20 21 22 19]'; 285s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 285s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 285s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 285s 285s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 285s assert (P(1), 0.747462549227232, 1e-09); 285s assert (P(2), 1.03809316857694e-08, 1e-09); 285s assert (P(3), 0.523689833702691, 1e-09); 285s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 285s assert (ATAB{3,2}, 272.391841491841, 1e-09); 285s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 285s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 285s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 285s assert (P(1), 2.53445097305047e-08, 1e-09); 285s assert (P(2), 0.00388133678528749, 1e-09); 285s assert (P(3), 0.523689833702671, 1e-09); 285s assert (ATAB{2,2}, 242.227272727273, 1e-09); 285s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 285s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 285s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 285s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 285s assert (P(1), 0.00388133678528743, 1e-09); 285s assert (P(2), 1.03809316857694e-08, 1e-09); 285s assert (P(3), 0.523689833702691, 1e-09); 285s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 285s assert (ATAB{3,2}, 272.391841491841, 1e-09); 285s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 285s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 285s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 285s assert (P(1), 0.00442898146583742, 1e-09); 285s assert (P(2), 1.30634252053587e-08, 1e-09); 285s assert (P(3), 0.523689833702691, 1e-09); 285s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 285s assert (ATAB{3,2}, 264.335664335664, 1e-09); 285s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 285s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 285s ***** test 285s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 285s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 285s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 285s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 285s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 285s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 285s 285s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 285s assert (P(1), 0.0108632139833963, 1e-09); 285s assert (P(2), 0.0810606976703546, 1e-09); 285s assert (P(3), 0.00175433329935627, 1e-09); 285s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 285s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 285s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 285s assert (ATAB{5,2}, 3.1625, 1e-09); 285s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 285s assert (P(1), 0.0373333189297505, 1e-09); 285s assert (P(2), 0.017075098787169, 1e-09); 285s assert (P(3), 0.00175433329935627, 1e-09); 285s assert (ATAB{2,2}, 1.444, 1e-09); 285s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 285s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 285s assert (ATAB{5,2}, 3.1625, 1e-09); 285s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 285s assert (P(1), 0.017075098787169, 1e-09); 285s assert (P(2), 0.0810606976703546, 1e-09); 285s assert (P(3), 0.00175433329935627, 1e-09); 285s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 285s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 285s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 285s assert (ATAB{5,2}, 3.1625, 1e-09); 285s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 285s assert (P(1), 0.0454263063473954, 1e-09); 285s assert (P(2), 0.0746719907091438, 1e-09); 285s assert (P(3), 0.00175433329935627, 1e-09); 285s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 285s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 285s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 285s assert (ATAB{5,2}, 3.1625, 1e-09); 285s ***** test 285s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 285s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 285s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 285s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 285s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 285s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 285s 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; 285s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 285s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 285s 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; 285s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 285s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 285s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 285s 173 194 197 190 176 198 164 190 169 164 176 175; 285s 186 194 201 215 219 209 164 166 159 182 187 174 ... 285s 189 194 217 206 199 195 171 173 196 199 180 NaN; 285s 180 187 199 170 204 194 162 184 183 156 180 173 ... 285s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 285s 285s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 285s assert (P(1), 7.02561843825325e-05, 1e-09); 285s assert (P(2), 0.000425806013389362, 1e-09); 285s assert (P(3), 6.16780773446401e-07, 1e-09); 285s assert (P(4), 0.261347622678438, 1e-09); 285s assert (P(5), 0.0542278432357043, 1e-09); 285s assert (P(6), 0.590353225626655, 1e-09); 285s assert (P(7), 0.0861628249564267, 1e-09); 285s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 285s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 285s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 285s assert (ATAB{5,2}, 437.066007908781, 1e-09); 285s assert (ATAB{6,2}, 976.180770397332, 1e-09); 285s assert (ATAB{7,2}, 46.616653365254, 1e-09); 285s assert (ATAB{8,2}, 814.345251396648, 1e-09); 285s assert (ATAB{9,2}, 9065.8, 1e-09); 285s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 285s assert (P(1), 9.4879638470754e-05, 1e-09); 285s assert (P(2), 0.00124177666315809, 1e-09); 285s assert (P(3), 6.86162012732911e-07, 1e-09); 285s assert (P(4), 0.260856132341256, 1e-09); 285s assert (P(5), 0.0523758623892078, 1e-09); 285s assert (P(6), 0.590353225626655, 1e-09); 285s assert (P(7), 0.0861628249564267, 1e-09); 285s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 285s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 285s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 285s assert (ATAB{5,2}, 437.693674777847, 1e-09); 285s assert (ATAB{6,2}, 988.431929811402, 1e-09); 285s assert (ATAB{7,2}, 46.616653365254, 1e-09); 285s assert (ATAB{8,2}, 814.345251396648, 1e-09); 285s assert (ATAB{9,2}, 9065.8, 1e-09); 285s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 285s assert (P(1), 0.000106518678028207, 1e-09); 285s assert (P(2), 0.00125371366571508, 1e-09); 285s assert (P(3), 5.30813260778464e-07, 1e-09); 285s assert (P(4), 0.308353667232981, 1e-09); 285s assert (P(5), 0.0562901327343161, 1e-09); 285s assert (P(6), 0.599091042141092, 1e-09); 285s assert (P(7), 0.0861628249564267, 1e-09); 285s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 285s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 285s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 285s assert (ATAB{5,2}, 382.07709497207, 1e-09); 285s assert (ATAB{6,2}, 963.037988826813, 1e-09); 285s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 285s assert (ATAB{8,2}, 814.345251396648, 1e-09); 285s assert (ATAB{9,2}, 9065.8, 1e-09); 285s ***** test 285s measurement = [444 614 423 625 408 856 447 719 ... 285s 764 831 586 782 609 1002 606 766]'; 285s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 285s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 285s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 285s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 285s 285s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 285s assert (P(1), 0.0914352969909372, 1e-09); 285s assert (P(2), 5.04077373924908e-05, 1e-09); 285s assert (P(4), 0.0283196918836667, 1e-09); 285s assert (ATAB{2,2}, 286.132500000002, 1e-09); 285s assert (ATAB{3,2}, 2275.29, 1e-09); 285s assert (ATAB{4,2}, 1242.5625, 1e-09); 285s assert (ATAB{5,2}, 495.905000000001, 1e-09); 285s assert (ATAB{6,2}, 207.007499999999, 1e-09); 285s ***** test 285s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 285s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 285s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 285s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 285s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 285s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 285s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 285s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 285s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 285s 285s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 285s assert (P(1), 6.27153318786007e-14, 1e-09); 285s assert (P(2), 2.48773241196644e-25, 1e-09); 285s assert (ATAB{2,2}, 598.003953318404, 1e-09); 285s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 285s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 285s assert (ATAB{2,6}, 187.399388123951, 1e-09); 285s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 285s ***** test 285s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 285s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 285s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 285s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 285s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 285s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 285s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 285s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 285s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 285s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 285s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 285s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 285s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 285s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 285s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 285s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 285s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 285s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 285s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 285s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 285s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 285s 285s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 285s assert (P(5), 0.9245630968248468, 1e-09); 285s assert (P(6), 0.791115159521822, 1e-09); 285s assert (P(7), 0.9296668751457956, 1e-09); 285s [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'); 285s assert (P(1), 0.00158132928938933, 1e-09); 285s assert (P(2), 2.12537505039986e-07, 1e-09); 285s assert (P(3), 0.00390292555160047, 1e-09); 285s assert (P(4), 0.0164086580775543, 1e-09); 285s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 285s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 285s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 285s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 285s ***** test 285s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 285s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 285s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 285s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 285s 25.694 ]'; 285s 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]'; 285s C = [ 0.4001601 0.3333333 0.5 0.0 285s 0.4001601 0.3333333 -0.5 0.0 285s 0.4001601 -0.6666667 0.0 0.0 285s -0.6002401 0.0000000 0.0 0.5 285s -0.6002401 0.0000000 0.0 -0.5]; 285s 285s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 285s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 285s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 285s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 285s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 285s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 285s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 285s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 285s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 285s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 285s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 285s assert (STATS.coeffs(1,5), 40.161, 1e-03); 285s assert (STATS.coeffs(2,5), -9.624, 1e-03); 285s assert (STATS.coeffs(3,5), -3.825, 1e-03); 285s assert (STATS.coeffs(4,5), -4.875, 1e-03); 285s assert (STATS.coeffs(5,5), -5.515, 1e-03); 285s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 285s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 285s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 285s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 285s 12 tests, 12 passed, 0 known failure, 0 skipped 285s [inst/violin.m] 285s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/violin.m 285s ***** demo 285s clf 285s x = zeros (9e2, 10); 285s for i=1:10 285s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 285s endfor 285s h = violin (x, "color", "c"); 285s axis tight 285s set (h.violin, "linewidth", 2); 285s set (gca, "xgrid", "on"); 285s xlabel ("Variables") 285s ylabel ("Values") 285s ***** demo 285s clf 285s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 285s subplot (1,2,1) 285s title ("Grade 3 heights - vertical"); 285s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 285s violin (data, "Nbins", 10); 285s axis tight 285s 285s subplot(1,2,2) 285s title ("Grade 3 heights - horizontal"); 285s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 285s violin (data, "horizontal", "Nbins", 10); 285s axis tight 285s ***** demo 285s clf 285s data = exprnd (0.1, 500,4); 285s violin (data, "nbins", {5,10,50,100}); 285s axis ([0 5 0 max(data(:))]) 285s ***** demo 285s clf 285s data = exprnd (0.1, 500,4); 285s violin (data, "color", jet(4)); 285s axis ([0 5 0 max(data(:))]) 285s ***** demo 285s clf 285s data = repmat(exprnd (0.1, 500,1), 1, 4); 285s violin (data, "width", linspace (0.1,0.5,4)); 285s axis ([0 5 0 max(data(:))]) 285s ***** demo 285s clf 285s data = repmat(exprnd (0.1, 500,1), 1, 4); 285s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 285s axis ([0 5 0 max(data(:))]) 285s ***** test 285s hf = figure ("visible", "off"); 285s unwind_protect 285s data = exprnd (0.1, 500,4); 285s violin (data, "color", jet(4)); 285s axis ([0 5 0 max(data(:))]) 285s unwind_protect_cleanup 285s close (hf); 285s end_unwind_protect 286s ***** test 286s hf = figure ("visible", "off"); 286s unwind_protect 286s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 286s subplot (1,2,1) 286s title ("Grade 3 heights - vertical"); 286s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 286s violin (data, "Nbins", 10); 286s axis tight 286s unwind_protect_cleanup 286s close (hf); 286s end_unwind_protect 286s ***** test 286s hf = figure ("visible", "off"); 286s unwind_protect 286s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 286s subplot (1,2,1) 286s title ("Grade 3 heights - vertical"); 286s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 286s violin (data, "Nbins", 10); 286s axis tight 286s subplot(1,2,2) 286s title ("Grade 3 heights - horizontal"); 286s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 286s violin (data, "horizontal", "Nbins", 10); 286s axis tight 286s unwind_protect_cleanup 286s close (hf); 286s end_unwind_protect 286s ***** test 286s hf = figure ("visible", "off"); 286s unwind_protect 286s data = repmat(exprnd (0.1, 500,1), 1, 4); 286s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 286s axis ([0 5 0 max(data(:))]) 286s unwind_protect_cleanup 286s close (hf); 286s end_unwind_protect 286s ***** test 286s hf = figure ("visible", "off"); 286s unwind_protect 286s data = repmat(exprnd (0.1, 500,1), 1, 4); 286s violin (data, "width", linspace (0.1,0.5,4)); 286s axis ([0 5 0 max(data(:))]) 286s unwind_protect_cleanup 286s close (hf); 286s end_unwind_protect 287s 5 tests, 5 passed, 0 known failure, 0 skipped 287s [inst/manova1.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/manova1.m 287s ***** demo 287s load carbig 287s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 287s ***** test 287s load carbig 287s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 287s assert (d, 3); 287s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 287s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 287s ***** test 287s load carbig 287s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 287s assert (d, 2); 287s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 287s [1e-12, 1e-12, 1e-12]'); 287s 2 tests, 2 passed, 0 known failure, 0 skipped 287s [inst/fitrgam.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitrgam.m 287s ***** demo 287s # Train a RegressionGAM Model for synthetic values 287s 287s f1 = @(x) cos (3 *x); 287s f2 = @(x) x .^ 3; 287s 287s # generate x1 and x2 for f1 and f2 287s x1 = 2 * rand (50, 1) - 1; 287s x2 = 2 * rand (50, 1) - 1; 287s 287s # calculate y 287s y = f1(x1) + f2(x2); 287s 287s # add noise 287s y = y + y .* 0.2 .* rand (50,1); 287s X = [x1, x2]; 287s 287s # create an object 287s a = fitrgam (X, y, "tol", 1e-3) 287s ***** test 287s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 287s y = [1; 2; 3; 4]; 287s a = fitrgam (x, y); 287s assert ({a.X, a.Y}, {x, y}) 287s assert ({a.BaseModel.Intercept}, {2.5000}) 287s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 287s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 287s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 287s assert ({a.Formula}, {[]}) 287s ***** test 287s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 287s y = [1; 2; 3; 4]; 287s pnames = {"A", "B", "C", "D"}; 287s formula = "Y ~ A + B + C + D + A:C"; 287s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 287s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 287s assert ({a.IntMatrix}, {intMat}) 287s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 287s assert ({a.Formula}, {formula}) 287s ***** error fitrgam () 287s ***** error fitrgam (ones(10,2)) 287s ***** error 287s fitrgam (ones (4,2), ones (4, 1), "K") 287s ***** error 287s fitrgam (ones (4,2), ones (3, 1)) 287s ***** error 287s fitrgam (ones (4,2), ones (3, 1), "K", 2) 287s 7 tests, 7 passed, 0 known failure, 0 skipped 287s [inst/cophenet.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cophenet.m 287s ***** demo 287s randn ("seed", 5) # for reproducibility 287s X = randn (10,2); 287s y = pdist (X); 287s Z = linkage (y, "average"); 287s cophenet (Z, y) 287s ***** error cophenet () 287s ***** error cophenet (1) 287s ***** error ... 287s cophenet (ones (2,2), 1) 287s ***** error ... 287s cophenet ([1 2 1], "a") 287s ***** error ... 287s cophenet ([1 2 1], [1 2]) 287s 5 tests, 5 passed, 0 known failure, 0 skipped 287s [inst/crosstab.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/crosstab.m 287s ***** error crosstab () 287s ***** error crosstab (1) 287s ***** error crosstab (ones (2), [1 1]) 287s ***** error crosstab ([1 1], ones (2)) 287s ***** error crosstab ([1], [1 2]) 287s ***** error crosstab ([1 2], [1]) 287s ***** test 287s load carbig 287s [table, chisq, p, labels] = crosstab (cyl4, when, org); 287s assert (table(2,3,1), 38); 287s assert (labels{3,3}, "Japan"); 287s ***** test 287s load carbig 287s [table, chisq, p, labels] = crosstab (cyl4, when, org); 287s assert (table(2,3,2), 17); 287s assert (labels{1,3}, "USA"); 287s 8 tests, 8 passed, 0 known failure, 0 skipped 287s [inst/vartest2.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/vartest2.m 287s ***** error vartest2 (); 287s ***** error vartest2 (ones (20,1)); 287s ***** error ... 287s vartest2 (rand (20,1), 5); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 287s ***** error ... 287s vartest2 (rand (20,1), rand (25,1)*2, "some"); 287s ***** test 287s load carsmall 287s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 287s assert (h, 0); 287s assert (pval, 0.6288022362718455, 1e-13); 287s assert (ci, [0.4139; 1.7193], 1e-4); 287s assert (stat.fstat, 0.8384, 1e-4); 287s assert (stat.df1, 30); 287s assert (stat.df2, 33); 287s 14 tests, 14 passed, 0 known failure, 0 skipped 287s [inst/gscatter.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/gscatter.m 287s ***** demo 287s load fisheriris; 287s X = meas(:,3:4); 287s cidcs = kmeans (X, 3, "Replicates", 5); 287s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 287s title ("Fisher's iris data"); 287s ***** shared visibility_setting 287s visibility_setting = get (0, "DefaultFigureVisible"); 287s ***** test 287s hf = figure ("visible", "off"); 287s unwind_protect 287s load fisheriris; 287s X = meas(:,3:4); 287s cidcs = kmeans (X, 3, "Replicates", 5); 287s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 287s title ("Fisher's iris data"); 287s unwind_protect_cleanup 287s close (hf); 287s end_unwind_protect 287s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 287s ***** error gscatter (); 287s ***** error gscatter ([1]); 287s ***** error gscatter ([1], [2]); 287s ***** error gscatter ('abc', [1 2 3], [1]); 287s ***** error gscatter ([1 2 3], [1 2], [1]); 287s ***** error gscatter ([1 2 3], 'abc', [1]); 287s ***** error gscatter ([1 2], [1 2], [1]); 287s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 287s 9 tests, 9 passed, 0 known failure, 0 skipped 287s [inst/kmeans.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/kmeans.m 287s ***** demo 287s ## Generate a two-cluster problem 287s randn ("seed", 31) # for reproducibility 287s C1 = randn (100, 2) + 1; 287s randn ("seed", 32) # for reproducibility 287s C2 = randn (100, 2) - 1; 287s data = [C1; C2]; 287s 287s ## Perform clustering 287s rand ("seed", 1) # for reproducibility 287s [idx, centers] = kmeans (data, 2); 287s 287s ## Plot the result 287s figure; 287s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 287s hold on; 287s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 287s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 287s hold off; 287s ***** demo 287s ## Cluster data using k-means clustering, then plot the cluster regions 287s ## Load Fisher's iris data set and use the petal lengths and widths as 287s ## predictors 287s 287s load fisheriris 287s X = meas(:,3:4); 287s 287s figure; 287s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 287s title ("Fisher's Iris Data"); 287s xlabel ("Petal Lengths (cm)"); 287s ylabel ("Petal Widths (cm)"); 287s 287s ## Cluster the data. Specify k = 3 clusters 287s rand ("seed", 1) # for reproducibility 287s [idx, C] = kmeans (X, 3); 287s x1 = min (X(:,1)):0.01:max (X(:,1)); 287s x2 = min (X(:,2)):0.01:max (X(:,2)); 287s [x1G, x2G] = meshgrid (x1, x2); 287s XGrid = [x1G(:), x2G(:)]; 287s 287s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 287s figure; 287s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 287s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 287s hold on; 287s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 287s title ("Fisher's Iris Data"); 287s xlabel ("Petal Lengths (cm)"); 287s ylabel ("Petal Widths (cm)"); 287s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 287s hold off 287s ***** demo 287s ## Partition Data into Two Clusters 287s 287s randn ("seed", 1) # for reproducibility 287s r1 = randn (100, 2) * 0.75 + ones (100, 2); 287s randn ("seed", 2) # for reproducibility 287s r2 = randn (100, 2) * 0.5 - ones (100, 2); 287s X = [r1; r2]; 287s 287s figure; 287s plot (X(:,1), X(:,2), "."); 287s title ("Randomly Generated Data"); 287s rand ("seed", 1) # for reproducibility 287s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 287s "Replicates", 5, "Display", "final"); 287s figure; 287s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 287s hold on 287s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 287s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 287s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 287s title ("Cluster Assignments and Centroids"); 287s hold off 287s ***** demo 287s ## Assign New Data to Existing Clusters 287s 287s ## Generate a training data set using three distributions 287s randn ("seed", 5) # for reproducibility 287s r1 = randn (100, 2) * 0.75 + ones (100, 2); 287s randn ("seed", 7) # for reproducibility 287s r2 = randn (100, 2) * 0.5 - ones (100, 2); 287s randn ("seed", 9) # for reproducibility 287s r3 = randn (100, 2) * 0.75; 287s X = [r1; r2; r3]; 287s 287s ## Partition the training data into three clusters by using kmeans 287s 287s rand ("seed", 1) # for reproducibility 287s [idx, C] = kmeans (X, 3); 287s 287s ## Plot the clusters and the cluster centroids 287s 287s figure 287s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 287s hold on 287s plot (C(:,1), C(:,2), "kx"); 287s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 287s 287s ## Generate a test data set 287s randn ("seed", 25) # for reproducibility 287s r1 = randn (100, 2) * 0.75 + ones (100, 2); 287s randn ("seed", 27) # for reproducibility 287s r2 = randn (100, 2) * 0.5 - ones (100, 2); 287s randn ("seed", 29) # for reproducibility 287s r3 = randn (100, 2) * 0.75; 287s Xtest = [r1; r2; r3]; 287s 287s ## Classify the test data set using the existing clusters 287s ## Find the nearest centroid from each test data point by using pdist2 287s 287s D = pdist2 (C, Xtest, "euclidean"); 287s [group, ~] = find (D == min (D)); 287s 287s ## Plot the test data and label the test data using idx_test with gscatter 287s 287s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 287s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 287s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 287s "Data classified to Cluster 3", "Location", "NorthWest"); 287s title ("Assign New Data to Existing Clusters"); 287s ***** test 287s samples = 4; 287s dims = 3; 287s k = 2; 287s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 287s "emptyAction", "singleton"); 287s assert (size (cls), [samples, 1]); 287s assert (size (c), [k, dims]); 287s assert (size (d), [k, 1]); 287s assert (size (z), [samples, k]); 287s ***** test 287s samples = 4; 287s dims = 3; 287s k = 2; 287s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 287s "emptyAction", "singleton"); 287s assert (size (cls), [samples, 1]); 287s assert (size (c), [k, dims]); 287s assert (size (d), [k, 1]); 287s assert (size (z), [samples, k]); 287s ***** test 287s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 287s assert (cls, [1; 1]); 287s assert (c, [1.5, 0; NA, NA]); 287s ***** test 287s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 287s "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 287s ***** test 287s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 287s ***** test 287s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 287s ***** error kmeans (rand (3,2), 4); 287s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 287s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 287s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 287s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 287s ***** error kmeans (rand (3,4), 2, "start", "normal"); 287s ***** error kmeans (rand (4,3), 2, "replicates", i); 287s ***** error kmeans (rand (4,3), 2, "replicates", -1); 287s ***** error kmeans (rand (4,3), 2, "replicates", []); 287s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 287s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 287s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 287s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 287s ***** error kmeans (rand (4,3), 2, "maxiter", []); 287s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 287s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 287s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 287s 31 tests, 31 passed, 0 known failure, 0 skipped 287s [inst/fishertest.m] 287s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fishertest.m 287s ***** demo 287s ## A Fisher's exact test example 287s 287s x = [3, 1; 1, 3] 287s [h, p, stats] = fishertest(x) 287s ***** assert (fishertest ([3, 4; 5, 7]), false); 287s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 287s ***** test 287s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 287s assert (pval, 1, 1e-14); 287s assert (stats.OddsRatio, 1.05); 287s CI = [0.159222057151289, 6.92429189601808]; 287s assert (stats.ConfidenceInterval, CI, 1e-14) 287s ***** test 287s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 287s assert (pval, 0.08080808080808080, 1e-14); 287s assert (stats.OddsRatio, 0); 287s assert (stats.ConfidenceInterval, [-Inf, Inf]) 288s ***** error fishertest (); 288s ***** error fishertest (1, 2, 3, 4, 5, 6); 288s ***** error ... 288s fishertest (ones (2, 2, 2)); 288s ***** error ... 288s fishertest ([1, 2; -3, 4]); 288s ***** error ... 288s fishertest ([1, 2; 3, 4+i]); 288s ***** error ... 288s fishertest ([1, 2; 3, 4.2]); 288s ***** error ... 288s fishertest ([NaN, 2; 3, 4]); 288s ***** error ... 288s fishertest ([1, Inf; 3, 4]); 288s ***** error ... 288s fishertest (ones (2) * 1e8); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "alpha", 0); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "alpha", 1.2); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "alpha", "val"); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "tail", "val"); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 288s ***** error ... 288s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 288s 19 tests, 19 passed, 0 known failure, 0 skipped 288s [inst/Clustering/SilhouetteEvaluation.m] 288s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Clustering/SilhouetteEvaluation.m 288s ***** test 288s load fisheriris 288s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 288s assert (class (eva), "SilhouetteEvaluation"); 288s 1 test, 1 passed, 0 known failure, 0 skipped 288s [inst/Clustering/GapEvaluation.m] 288s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Clustering/GapEvaluation.m 288s ***** test 288s load fisheriris 288s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 288s "referencedistribution", "uniform"); 288s assert (class (eva), "GapEvaluation"); 290s 1 test, 1 passed, 0 known failure, 0 skipped 290s [inst/Clustering/CalinskiHarabaszEvaluation.m] 290s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Clustering/CalinskiHarabaszEvaluation.m 290s ***** test 290s load fisheriris 290s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 290s assert (class (eva), "CalinskiHarabaszEvaluation"); 290s 1 test, 1 passed, 0 known failure, 0 skipped 290s [inst/Clustering/DaviesBouldinEvaluation.m] 290s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Clustering/DaviesBouldinEvaluation.m 290s ***** test 290s load fisheriris 290s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 290s assert (class (eva), "DaviesBouldinEvaluation"); 290s 1 test, 1 passed, 0 known failure, 0 skipped 290s [inst/Clustering/ClusterCriterion.m] 290s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Clustering/ClusterCriterion.m 290s ***** error ... 290s ClusterCriterion ("1", "kmeans", [1:6]) 290s ***** error ... 290s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 290s ***** error ... 290s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 290s ***** error ... 290s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 290s 4 tests, 4 passed, 0 known failure, 0 skipped 291s [inst/ttest.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ttest.m 291s ***** test 291s x = 8:0.1:12; 291s [h, pval, ci] = ttest (x, 10); 291s assert (h, 0) 291s assert (pval, 1, 10*eps) 291s assert (ci, [9.6219 10.3781], 1E-5) 291s [h, pval, ci0] = ttest (x, 0); 291s assert (h, 1) 291s assert (pval, 0) 291s assert (ci0, ci, 2e-15) 291s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 291s assert (h, 0) 291s assert (pval, 0.5, 10*eps) 291s assert (ci, [9.68498 Inf], 1E-5) 291s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 291s ***** error ttest ([8:0.1:12], 10, "tail", 25); 291s 3 tests, 3 passed, 0 known failure, 0 skipped 291s [inst/cluster.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cluster.m 291s ***** error cluster () 291s ***** error cluster ([1 1], "Cutoff", 1) 291s ***** error cluster ([1 2 1], "Bogus", 1) 291s ***** error cluster ([1 2 1], "Cutoff", -1) 291s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 291s ***** test 291s 6 tests, 6 passed, 0 known failure, 0 skipped 291s [inst/pcares.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/pcares.m 291s ***** demo 291s x = [ 7 26 6 60; 291s 1 29 15 52; 291s 11 56 8 20; 291s 11 31 8 47; 291s 7 52 6 33; 291s 11 55 9 22; 291s 3 71 17 6; 291s 1 31 22 44; 291s 2 54 18 22; 291s 21 47 4 26; 291s 1 40 23 34; 291s 11 66 9 12; 291s 10 68 8 12]; 291s 291s ## As we increase the number of principal components, the norm 291s ## of the residuals matrix will decrease 291s r1 = pcares (x,1); 291s n1 = norm (r1) 291s r2 = pcares (x,2); 291s n2 = norm (r2) 291s r3 = pcares (x,3); 291s n3 = norm (r3) 291s r4 = pcares (x,4); 291s n4 = norm (r4) 291s ***** test 291s load hald 291s r1 = pcares (ingredients,1); 291s r2 = pcares (ingredients,2); 291s r3 = pcares (ingredients,3); 291s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 291s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 291s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 291s ***** error pcares (ones (20, 3)) 291s ***** error ... 291s pcares (ones (30, 2), 3) 291s 3 tests, 3 passed, 0 known failure, 0 skipped 291s [inst/manovacluster.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/manovacluster.m 291s ***** demo 291s load carbig 291s X = [MPG Acceleration Weight Displacement]; 291s [d, p, stats] = manova1 (X, Origin); 291s manovacluster (stats) 291s ***** test 291s hf = figure ("visible", "off"); 291s unwind_protect 291s load carbig 291s X = [MPG Acceleration Weight Displacement]; 291s [d, p, stats] = manova1 (X, Origin); 291s manovacluster (stats); 291s unwind_protect_cleanup 291s close (hf); 291s end_unwind_protect 291s ***** error manovacluster (stats, "some"); 291s 2 tests, 2 passed, 0 known failure, 0 skipped 291s [inst/stepwisefit.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/stepwisefit.m 291s ***** test 291s % Sample data from Draper and Smith (n = 13, k = 4) 291s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 291s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 291s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 291s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 291s 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]'; 291s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 291s assert(X_use, [4 1]) 291s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 291s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 291s assert(X_use, [4 1]) 291s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 291s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 291s assert(X_use, [4 1]) 291s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 291s 1 test, 1 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/ricestat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/ricestat.m 291s ***** error ricestat () 291s ***** error ricestat (1) 291s ***** error ricestat ({}, 2) 291s ***** error ricestat (1, "") 291s ***** error ricestat (i, 2) 291s ***** error ricestat (1, i) 291s ***** error ... 291s ricestat (ones (3), ones (2)) 291s ***** error ... 291s ricestat (ones (2), ones (3)) 291s ***** shared s, sigma 291s s = [2, 0, -1, 1, 4]; 291s sigma = [1, NaN, 3, -1, 2]; 291s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 291s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 291s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 291s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 291s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 291s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 291s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 291s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 291s 16 tests, 16 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/normstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/normstat.m 291s ***** error normstat () 291s ***** error normstat (1) 291s ***** error normstat ({}, 2) 291s ***** error normstat (1, "") 291s ***** error normstat (i, 2) 291s ***** error normstat (1, i) 291s ***** error ... 291s normstat (ones (3), ones (2)) 291s ***** error ... 291s normstat (ones (2), ones (3)) 291s ***** test 291s mu = 1:6; 291s sigma = 0.2:0.2:1.2; 291s [m, v] = normstat (mu, sigma); 291s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 291s assert (m, mu); 291s assert (v, expected_v, 0.001); 291s ***** test 291s sigma = 0.2:0.2:1.2; 291s [m, v] = normstat (0, sigma); 291s expected_mn = [0, 0, 0, 0, 0, 0]; 291s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 291s assert (m, expected_mn, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/tlsstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/tlsstat.m 291s ***** error tlsstat () 291s ***** error tlsstat (1) 291s ***** error tlsstat (1, 2) 291s ***** error tlsstat ({}, 2, 3) 291s ***** error tlsstat (1, "", 3) 291s ***** error tlsstat (1, 2, ["d"]) 291s ***** error tlsstat (i, 2, 3) 291s ***** error tlsstat (1, i, 3) 291s ***** error tlsstat (1, 2, i) 291s ***** error ... 291s tlsstat (ones (3), ones (2), 1) 291s ***** error ... 291s tlsstat (ones (2), 1, ones (3)) 291s ***** error ... 291s tlsstat (1, ones (2), ones (3)) 291s ***** test 291s [m, v] = tlsstat (0, 1, 0); 291s assert (m, NaN); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (0, 1, 1); 291s assert (m, NaN); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (2, 1, 1); 291s assert (m, NaN); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (-2, 1, 1); 291s assert (m, NaN); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (0, 1, 2); 291s assert (m, 0); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (2, 1, 2); 291s assert (m, 2); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (-2, 1, 2); 291s assert (m, -2); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (0, 2, 2); 291s assert (m, 0); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (2, 2, 2); 291s assert (m, 2); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (-2, 2, 2); 291s assert (m, -2); 291s assert (v, NaN); 291s ***** test 291s [m, v] = tlsstat (0, 1, 3); 291s assert (m, 0); 291s assert (v, 3); 291s ***** test 291s [m, v] = tlsstat (0, 2, 3); 291s assert (m, 0); 291s assert (v, 6); 291s ***** test 291s [m, v] = tlsstat (2, 1, 3); 291s assert (m, 2); 291s assert (v, 3); 291s ***** test 291s [m, v] = tlsstat (2, 2, 3); 291s assert (m, 2); 291s assert (v, 6); 291s ***** test 291s [m, v] = tlsstat (-2, 1, 3); 291s assert (m, -2); 291s assert (v, 3); 291s ***** test 291s [m, v] = tlsstat (-2, 2, 3); 291s assert (m, -2); 291s assert (v, 6); 291s 28 tests, 28 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/tstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/tstat.m 291s ***** error tstat () 291s ***** error tstat ({}) 291s ***** error tstat ("") 291s ***** error tstat (i) 291s ***** test 291s df = 3:8; 291s [m, v] = tstat (df); 291s expected_m = [0, 0, 0, 0, 0, 0]; 291s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 291s assert (m, expected_m); 291s assert (v, expected_v, 0.001); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/gevstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/gevstat.m 291s ***** error gevstat () 291s ***** error gevstat (1) 291s ***** error gevstat (1, 2) 291s ***** error gevstat ({}, 2, 3) 291s ***** error gevstat (1, "", 3) 291s ***** error gevstat (1, 2, "") 291s ***** error gevstat (i, 2, 3) 291s ***** error gevstat (1, i, 3) 291s ***** error gevstat (1, 2, i) 291s ***** error ... 291s gevstat (ones (3), ones (2), 3) 291s ***** error ... 291s gevstat (ones (2), 2, ones (3)) 291s ***** error ... 291s gevstat (1, ones (2), ones (3)) 291s ***** test 291s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 291s sigma = 2; 291s mu = 1; 291s [m, v] = gevstat (k, sigma, mu); 291s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 291s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 291s assert (m, expected_m, -0.001); 291s assert (v, expected_v, -0.001); 291s 13 tests, 13 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/betastat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/betastat.m 291s ***** error betastat () 291s ***** error betastat (1) 291s ***** error betastat ({}, 2) 291s ***** error betastat (1, "") 291s ***** error betastat (i, 2) 291s ***** error betastat (1, i) 291s ***** error ... 291s betastat (ones (3), ones (2)) 291s ***** error ... 291s betastat (ones (2), ones (3)) 291s ***** test 291s a = -2:6; 291s b = 0.4:0.2:2; 291s [m, v] = betastat (a, b); 291s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 291s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 291s assert (m, expected_m, eps*100); 291s assert (v, expected_v, 0.001); 291s ***** test 291s a = -2:1:6; 291s [m, v] = betastat (a, 1.5); 291s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 291s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 291s assert (m, expected_m); 291s assert (v, expected_v, 0.001); 291s ***** test 291s a = [14 Inf 10 NaN 10]; 291s b = [12 9 NaN Inf 12]; 291s [m, v] = betastat (a, b); 291s expected_m = [14/26 NaN NaN NaN 10/22]; 291s expected_v = [168/18252 NaN NaN NaN 120/11132]; 291s assert (m, expected_m); 291s assert (v, expected_v); 291s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 291s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 291s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 291s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 291s 15 tests, 15 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/ncx2stat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/ncx2stat.m 291s ***** error ncx2stat () 291s ***** error ncx2stat (1) 291s ***** error ncx2stat ({}, 2) 291s ***** error ncx2stat (1, "") 291s ***** error ncx2stat (i, 2) 291s ***** error ncx2stat (1, i) 291s ***** error ... 291s ncx2stat (ones (3), ones (2)) 291s ***** error ... 291s ncx2stat (ones (2), ones (3)) 291s ***** shared df, d1 291s df = [2, 0, -1, 1, 4]; 291s d1 = [1, NaN, 3, -1, 2]; 291s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 291s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 291s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 291s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 291s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 291s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 291s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 291s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 291s 16 tests, 16 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/logistat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/logistat.m 291s ***** error logistat () 291s ***** error logistat (1) 291s ***** error logistat ({}, 2) 291s ***** error logistat (1, "") 291s ***** error logistat (i, 2) 291s ***** error logistat (1, i) 291s ***** error ... 291s logistat (ones (3), ones (2)) 291s ***** error ... 291s logistat (ones (2), ones (3)) 291s ***** test 291s [m, v] = logistat (0, 1); 291s assert (m, 0); 291s assert (v, 3.2899, 0.001); 291s ***** test 291s [m, v] = logistat (0, 0.8); 291s assert (m, 0); 291s assert (v, 2.1055, 0.001); 291s ***** test 291s [m, v] = logistat (1, 0.6); 291s assert (m, 1); 291s assert (v, 1.1844, 0.001); 291s ***** test 291s [m, v] = logistat (0, 0.4); 291s assert (m, 0); 291s assert (v, 0.5264, 0.001); 291s ***** test 291s [m, v] = logistat (-1, 0.2); 291s assert (m, -1); 291s assert (v, 0.1316, 0.001); 291s 13 tests, 13 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/hnstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/hnstat.m 291s ***** error hnstat () 291s ***** error hnstat (1) 291s ***** error hnstat ({}, 2) 291s ***** error hnstat (1, "") 291s ***** error hnstat (i, 2) 291s ***** error hnstat (1, i) 291s ***** error ... 291s hnstat (ones (3), ones (2)) 291s ***** error ... 291s hnstat (ones (2), ones (3)) 291s ***** test 291s [m, v] = hnstat (0, 1); 291s assert (m, 0.7979, 1e-4); 291s assert (v, 0.3634, 1e-4); 291s ***** test 291s [m, v] = hnstat (2, 1); 291s assert (m, 2.7979, 1e-4); 291s assert (v, 0.3634, 1e-4); 291s ***** test 291s [m, v] = hnstat (2, 2); 291s assert (m, 3.5958, 1e-4); 291s assert (v, 1.4535, 1e-4); 291s ***** test 291s [m, v] = hnstat (2, 2.5); 291s assert (m, 3.9947, 1e-4); 291s assert (v, 2.2711, 1e-4); 291s ***** test 291s [m, v] = hnstat (1.5, 0.5); 291s assert (m, 1.8989, 1e-4); 291s assert (v, 0.0908, 1e-4); 291s ***** test 291s [m, v] = hnstat (-1.5, 0.5); 291s assert (m, -1.1011, 1e-4); 291s assert (v, 0.0908, 1e-4); 291s 14 tests, 14 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/gamstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/gamstat.m 291s ***** error gamstat () 291s ***** error gamstat (1) 291s ***** error gamstat ({}, 2) 291s ***** error gamstat (1, "") 291s ***** error gamstat (i, 2) 291s ***** error gamstat (1, i) 291s ***** error ... 291s gamstat (ones (3), ones (2)) 291s ***** error ... 291s gamstat (ones (2), ones (3)) 291s ***** test 291s a = 1:6; 291s b = 1:0.2:2; 291s [m, v] = gamstat (a, b); 291s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 291s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s a = 1:6; 291s [m, v] = gamstat (a, 1.5); 291s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 291s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/lognstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/lognstat.m 291s ***** error lognstat () 291s ***** error lognstat (1) 291s ***** error lognstat ({}, 2) 291s ***** error lognstat (1, "") 291s ***** error lognstat (i, 2) 291s ***** error lognstat (1, i) 291s ***** error ... 291s lognstat (ones (3), ones (2)) 291s ***** error ... 291s lognstat (ones (2), ones (3)) 291s ***** test 291s mu = 0:0.2:1; 291s sigma = 0.2:0.2:1.2; 291s [m, v] = lognstat (mu, sigma); 291s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 291s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s sigma = 0.2:0.2:1.2; 291s [m, v] = lognstat (0, sigma); 291s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 291s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/unidstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/unidstat.m 291s ***** error unidstat () 291s ***** error unidstat ({}) 291s ***** error unidstat ("") 291s ***** error unidstat (i) 291s ***** test 291s N = 1:6; 291s [m, v] = unidstat (N); 291s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 291s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/unifstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/unifstat.m 291s ***** error unifstat () 291s ***** error unifstat (1) 291s ***** error unifstat ({}, 2) 291s ***** error unifstat (1, "") 291s ***** error unifstat (i, 2) 291s ***** error unifstat (1, i) 291s ***** error ... 291s unifstat (ones (3), ones (2)) 291s ***** error ... 291s unifstat (ones (2), ones (3)) 291s ***** test 291s a = 1:6; 291s b = 2:2:12; 291s [m, v] = unifstat (a, b); 291s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 291s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s a = 1:6; 291s [m, v] = unifstat (a, 10); 291s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 291s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/evstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/evstat.m 291s ***** error evstat () 291s ***** error evstat (1) 291s ***** error evstat ({}, 2) 291s ***** error evstat (1, "") 291s ***** error evstat (i, 2) 291s ***** error evstat (1, i) 291s ***** error ... 291s evstat (ones (3), ones (2)) 291s ***** error ... 291s evstat (ones (2), ones (3)) 291s ***** shared x, y0, y1 291s x = [-5, 0, 1, 2, 3]; 291s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 291s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 291s ***** assert (evstat (x, x), y0, 1e-4) 291s ***** assert (evstat (x, x+6), y1, 1e-4) 291s ***** assert (evstat (x, x-6), NaN (1,5)) 291s 11 tests, 11 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/ncfstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/ncfstat.m 291s ***** error ncfstat () 291s ***** error ncfstat (1) 291s ***** error ncfstat (1, 2) 291s ***** error ncfstat ({}, 2, 3) 291s ***** error ncfstat (1, "", 3) 291s ***** error ncfstat (1, 2, "") 291s ***** error ncfstat (i, 2, 3) 291s ***** error ncfstat (1, i, 3) 291s ***** error ncfstat (1, 2, i) 291s ***** error ... 291s ncfstat (ones (3), ones (2), 3) 291s ***** error ... 291s ncfstat (ones (2), 2, ones (3)) 291s ***** error ... 291s ncfstat (1, ones (2), ones (3)) 291s ***** shared df1, df2, lambda 291s df1 = [2, 0, -1, 1, 4, 5]; 291s df2 = [2, 4, -1, 5, 6, 7]; 291s lambda = [1, NaN, 3, 0, 2, -1]; 291s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 291s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 291s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 291s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 291s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 291s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 291s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 291s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 291s 20 tests, 20 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/tristat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/tristat.m 291s ***** error tristat () 291s ***** error tristat (1) 291s ***** error tristat (1, 2) 291s ***** error tristat ("i", 2, 1) 291s ***** error tristat (0, "d", 1) 291s ***** error tristat (0, 3, {}) 291s ***** error tristat (i, 2, 1) 291s ***** error tristat (0, i, 1) 291s ***** error tristat (0, 3, i) 291s ***** test 291s a = 1:5; 291s b = 3:7; 291s c = 5:9; 291s [m, v] = tristat (a, b, c); 291s expected_m = [3, 4, 5, 6, 7]; 291s assert (m, expected_m); 291s assert (v, ones (1, 5) * (2/3)); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/chi2stat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/chi2stat.m 291s ***** error chi2stat () 291s ***** error chi2stat ({}) 291s ***** error chi2stat ("") 291s ***** error chi2stat (i) 291s ***** test 291s df = 1:6; 291s [m, v] = chi2stat (df); 291s assert (m, df); 291s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/burrstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/burrstat.m 291s ***** error burrstat () 291s ***** error burrstat (1) 291s ***** error burrstat (1, 2) 291s ***** error burrstat ({}, 2, 3) 291s ***** error burrstat (1, "", 3) 291s ***** error burrstat (1, 2, "") 291s ***** error burrstat (i, 2, 3) 291s ***** error burrstat (1, i, 3) 291s ***** error burrstat (1, 2, i) 291s ***** error ... 291s burrstat (ones (3), ones (2), 3) 291s ***** error ... 291s burrstat (ones (2), 2, ones (3)) 291s ***** error ... 291s burrstat (1, ones (2), ones (3)) 291s ***** test 291s [m, v] = burrstat (1, 2, 5); 291s assert (m, 0.4295, 1e-4); 291s assert (v, 0.0655, 1e-4); 291s ***** test 291s [m, v] = burrstat (1, 1, 1); 291s assert (m, Inf); 291s assert (v, Inf); 291s ***** test 291s [m, v] = burrstat (2, 4, 1); 291s assert (m, 2.2214, 1e-4); 291s assert (v, 1.3484, 1e-4); 291s 15 tests, 15 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/nctstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/nctstat.m 291s ***** error nctstat () 291s ***** error nctstat (1) 291s ***** error nctstat ({}, 2) 291s ***** error nctstat (1, "") 291s ***** error nctstat (i, 2) 291s ***** error nctstat (1, i) 291s ***** error ... 291s nctstat (ones (3), ones (2)) 291s ***** error ... 291s nctstat (ones (2), ones (3)) 291s ***** shared df, mu 291s df = [2, 0, -1, 1, 4]; 291s mu = [1, NaN, 3, -1, 2]; 291s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 291s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 291s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 291s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 291s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 291s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 291s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 291s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 291s 16 tests, 16 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/geostat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/geostat.m 291s ***** error geostat () 291s ***** error geostat ({}) 291s ***** error geostat ("") 291s ***** error geostat (i) 291s ***** test 291s ps = 1 ./ (1:6); 291s [m, v] = geostat (ps); 291s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 291s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/fstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/fstat.m 291s ***** error fstat () 291s ***** error fstat (1) 291s ***** error fstat ({}, 2) 291s ***** error fstat (1, "") 291s ***** error fstat (i, 2) 291s ***** error fstat (1, i) 291s ***** error ... 291s fstat (ones (3), ones (2)) 291s ***** error ... 291s fstat (ones (2), ones (3)) 291s ***** test 291s df1 = 1:6; 291s df2 = 5:10; 291s [m, v] = fstat (df1, df2); 291s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 291s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 291s assert (m, expected_mn, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s df1 = 1:6; 291s [m, v] = fstat (df1, 5); 291s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 291s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 291s assert (m, expected_mn, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/expstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/expstat.m 291s ***** error expstat () 291s ***** error expstat ({}) 291s ***** error expstat ("") 291s ***** error expstat (i) 291s ***** test 291s mu = 1:6; 291s [m, v] = expstat (mu); 291s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 291s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/wblstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/wblstat.m 291s ***** error wblstat () 291s ***** error wblstat (1) 291s ***** error wblstat ({}, 2) 291s ***** error wblstat (1, "") 291s ***** error wblstat (i, 2) 291s ***** error wblstat (1, i) 291s ***** error ... 291s wblstat (ones (3), ones (2)) 291s ***** error ... 291s wblstat (ones (2), ones (3)) 291s ***** test 291s lambda = 3:8; 291s k = 1:6; 291s [m, v] = wblstat (lambda, k); 291s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 291s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s k = 1:6; 291s [m, v] = wblstat (6, k); 291s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 291s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/gpstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/gpstat.m 291s ***** error gpstat () 291s ***** error gpstat (1) 291s ***** error gpstat (1, 2) 291s ***** error gpstat ({}, 2, 3) 291s ***** error gpstat (1, "", 3) 291s ***** error gpstat (1, 2, "") 291s ***** error gpstat (i, 2, 3) 291s ***** error gpstat (1, i, 3) 291s ***** error gpstat (1, 2, i) 291s ***** error ... 291s gpstat (ones (3), ones (2), 3) 291s ***** error ... 291s gpstat (ones (2), 2, ones (3)) 291s ***** error ... 291s gpstat (1, ones (2), ones (3)) 291s ***** shared x, y 291s x = [-Inf, -1, 0, 1/2, 1, Inf]; 291s y = [0, 0.5, 1, 2, Inf, Inf]; 291s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 291s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 291s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 291s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 291s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 291s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 291s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 291s 19 tests, 19 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/binostat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/binostat.m 291s ***** error binostat () 291s ***** error binostat (1) 291s ***** error binostat ({}, 2) 291s ***** error binostat (1, "") 291s ***** error binostat (i, 2) 291s ***** error binostat (1, i) 291s ***** error ... 291s binostat (ones (3), ones (2)) 291s ***** error ... 291s binostat (ones (2), ones (3)) 291s ***** test 291s n = 1:6; 291s ps = 0:0.2:1; 291s [m, v] = binostat (n, ps); 291s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 291s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s n = 1:6; 291s [m, v] = binostat (n, 0.5); 291s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 291s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 291s assert (m, expected_m, 0.001); 291s assert (v, expected_v, 0.001); 291s ***** test 291s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 291s [m, v] = binostat (n, 0.5); 291s assert (isnan (m), [true true false true false true false false]) 291s assert (isnan (v), [true true false true false true false false]) 291s assert (m(end), Inf); 291s assert (v(end), Inf); 291s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 291s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 291s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 291s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 291s 15 tests, 15 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/loglstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/loglstat.m 291s ***** error loglstat () 291s ***** error loglstat (1) 291s ***** error loglstat ({}, 2) 291s ***** error loglstat (1, "") 291s ***** error loglstat (i, 2) 291s ***** error loglstat (1, i) 291s ***** error ... 291s loglstat (ones (3), ones (2)) 291s ***** error ... 291s loglstat (ones (2), ones (3)) 291s ***** test 291s [m, v] = loglstat (0, 1); 291s assert (m, Inf, 0.001); 291s assert (v, Inf, 0.001); 291s ***** test 291s [m, v] = loglstat (0, 0.8); 291s assert (m, 4.2758, 0.001); 291s assert (v, Inf, 0.001); 291s ***** test 291s [m, v] = loglstat (0, 0.6); 291s assert (m, 1.9820, 0.001); 291s assert (v, Inf, 0.001); 291s ***** test 291s [m, v] = loglstat (0, 0.4); 291s assert (m, 1.3213, 0.001); 291s assert (v, 2.5300, 0.001); 291s ***** test 291s [m, v] = loglstat (0, 0.2); 291s assert (m, 1.0690, 0.001); 291s assert (v, 0.1786, 0.001); 291s 13 tests, 13 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/plstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/plstat.m 291s ***** shared x, Fx 291s x = [0, 1, 3, 4, 7, 10]; 291s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 291s ***** assert (plstat (x, Fx), 4.15) 291s ***** test 291s [m, v] = plstat (x, Fx); 291s assert (v, 10.3775, 1e-14) 291s ***** error plstat () 291s ***** error plstat (1) 291s ***** error ... 291s plstat ([0, 1, 2], [0, 1]) 291s ***** error ... 291s plstat ([0], [1]) 291s ***** error ... 291s plstat ([0, 1, 2], [0, 1, 1.5]) 291s ***** error ... 291s plstat ([0, 1, 2], [0, i, 1]) 291s ***** error ... 291s plstat ([0, i, 2], [0, 0.5, 1]) 291s ***** error ... 291s plstat ([0, i, 2], [0, 0.5i, 1]) 291s 10 tests, 10 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/poisstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/poisstat.m 291s ***** error poisstat () 291s ***** error poisstat ({}) 291s ***** error poisstat ("") 291s ***** error poisstat (i) 291s ***** test 291s lambda = 1 ./ (1:6); 291s [m, v] = poisstat (lambda); 291s assert (m, lambda); 291s assert (v, lambda); 291s 5 tests, 5 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/invgstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/invgstat.m 291s ***** error invgstat () 291s ***** error invgstat (1) 291s ***** error invgstat ({}, 2) 291s ***** error invgstat (1, "") 291s ***** error invgstat (i, 2) 291s ***** error invgstat (1, i) 291s ***** error ... 291s invgstat (ones (3), ones (2)) 291s ***** error ... 291s invgstat (ones (2), ones (3)) 291s ***** test 291s [m, v] = invgstat (1, 1); 291s assert (m, 1); 291s assert (v, 1); 291s ***** test 291s [m, v] = invgstat (2, 1); 291s assert (m, 2); 291s assert (v, 8); 291s ***** test 291s [m, v] = invgstat (2, 2); 291s assert (m, 2); 291s assert (v, 4); 291s ***** test 291s [m, v] = invgstat (2, 2.5); 291s assert (m, 2); 291s assert (v, 3.2); 291s ***** test 291s [m, v] = invgstat (1.5, 0.5); 291s assert (m, 1.5); 291s assert (v, 6.75); 291s 13 tests, 13 passed, 0 known failure, 0 skipped 291s [inst/dist_stat/nbinstat.m] 291s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/nbinstat.m 291s ***** error nbinstat () 291s ***** error nbinstat (1) 291s ***** error nbinstat ({}, 2) 291s ***** error nbinstat (1, "") 291s ***** error nbinstat (i, 2) 292s ***** error nbinstat (1, i) 292s ***** error ... 292s nbinstat (ones (3), ones (2)) 292s ***** error ... 292s nbinstat (ones (2), ones (3)) 292s ***** test 292s r = 1:4; 292s ps = 0.2:0.2:0.8; 292s [m, v] = nbinstat (r, ps); 292s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 292s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 292s assert (m, expected_m, 0.001); 292s assert (v, expected_v, 0.001); 292s ***** test 292s r = 1:4; 292s [m, v] = nbinstat (r, 0.5); 292s expected_m = [1, 2, 3, 4]; 292s expected_v = [2, 4, 6, 8]; 292s assert (m, expected_m, 0.001); 292s assert (v, expected_v, 0.001); 292s 10 tests, 10 passed, 0 known failure, 0 skipped 292s [inst/dist_stat/raylstat.m] 292s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/raylstat.m 292s ***** error raylstat () 292s ***** error raylstat ({}) 292s ***** error raylstat ("") 292s ***** error raylstat (i) 292s ***** test 292s sigma = 1:6; 292s [m, v] = raylstat (sigma); 292s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 292s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 292s assert (m, expected_m, 0.001); 292s assert (v, expected_v, 0.001); 292s 5 tests, 5 passed, 0 known failure, 0 skipped 292s [inst/dist_stat/bisastat.m] 292s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/bisastat.m 292s ***** error bisastat () 292s ***** error bisastat (1) 292s ***** error bisastat ({}, 2) 292s ***** error bisastat (1, "") 292s ***** error bisastat (i, 2) 292s ***** error bisastat (1, i) 292s ***** error ... 292s bisastat (ones (3), ones (2)) 292s ***** error ... 292s bisastat (ones (2), ones (3)) 292s ***** test 292s beta = 1:6; 292s gamma = 1:0.2:2; 292s [m, v] = bisastat (beta, gamma); 292s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 292s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 292s assert (m, expected_m, 1e-2); 292s assert (v, expected_v, 1e-3); 292s ***** test 292s beta = 1:6; 292s [m, v] = bisastat (beta, 1.5); 292s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 292s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 292s assert (m, expected_m, 1e-3); 292s assert (v, expected_v, 1e-4); 292s 10 tests, 10 passed, 0 known failure, 0 skipped 292s [inst/dist_stat/hygestat.m] 292s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/hygestat.m 292s ***** error hygestat () 292s ***** error hygestat (1) 292s ***** error hygestat (1, 2) 292s ***** error hygestat ({}, 2, 3) 292s ***** error hygestat (1, "", 3) 292s ***** error hygestat (1, 2, "") 292s ***** error hygestat (i, 2, 3) 292s ***** error hygestat (1, i, 3) 292s ***** error hygestat (1, 2, i) 292s ***** error ... 292s hygestat (ones (3), ones (2), 3) 292s ***** error ... 292s hygestat (ones (2), 2, ones (3)) 292s ***** error ... 292s hygestat (1, ones (2), ones (3)) 292s ***** test 292s m = 4:9; 292s k = 0:5; 292s n = 1:6; 292s [mn, v] = hygestat (m, k, n); 292s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 292s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 292s assert (mn, expected_mn, 0.001); 292s assert (v, expected_v, 0.001); 292s ***** test 292s m = 4:9; 292s k = 0:5; 292s [mn, v] = hygestat (m, k, 2); 292s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 292s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 292s assert (mn, expected_mn, 0.001); 292s assert (v, expected_v, 0.001); 292s 14 tests, 14 passed, 0 known failure, 0 skipped 292s [inst/dist_stat/nakastat.m] 292s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_stat/nakastat.m 292s ***** error nakastat () 292s ***** error nakastat (1) 292s ***** error nakastat ({}, 2) 292s ***** error nakastat (1, "") 292s ***** error nakastat (i, 2) 292s ***** error nakastat (1, i) 292s ***** error ... 292s nakastat (ones (3), ones (2)) 292s ***** error ... 292s nakastat (ones (2), ones (3)) 292s ***** test 292s [m, v] = nakastat (1, 1); 292s assert (m, 0.8862269254, 1e-10); 292s assert (v, 0.2146018366, 1e-10); 292s ***** test 292s [m, v] = nakastat (1, 2); 292s assert (m, 1.25331413731, 1e-10); 292s assert (v, 0.42920367321, 1e-10); 292s ***** test 292s [m, v] = nakastat (2, 1); 292s assert (m, 0.93998560299, 1e-10); 292s assert (v, 0.11642706618, 1e-10); 292s 11 tests, 11 passed, 0 known failure, 0 skipped 292s [inst/ranksum.m] 292s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ranksum.m 292s ***** test 292s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 292s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 292s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 292s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 292s assert (p, 0.004329004329004329, 1e-14); 292s assert (h, true); 292s assert (stats.ranksum, 21.5); 292s ***** test 292s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 292s 49 47 50 60 59 60 62 61 71]'; 292s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 292s 54 50 53 62 62 62 72 60 67]'; 292s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 292s assert (p, 0.1270832752950605, 1e-14); 292s assert (h, false); 292s assert (stats.ranksum, 837.5); 292s assert (stats.zval, -1.140287483634606, 1e-14); 292s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 292s "method", "exact"); 292s assert (p, 0.127343916432862, 1e-14); 292s assert (h, false); 292s assert (stats.ranksum, 837.5); 298s 2 tests, 2 passed, 0 known failure, 0 skipped 298s [inst/ztest2.m] 298s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ztest2.m 298s ***** error ztest2 (); 298s ***** error ztest2 (1); 299s ***** error ztest2 (1, 2); 299s ***** error ztest2 (1, 2, 3); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha") 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha", 0); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha", 1.2); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha", "val"); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "tail", "val"); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 299s ***** error ... 299s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 299s 11 tests, 11 passed, 0 known failure, 0 skipped 299s [inst/signrank.m] 299s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/signrank.m 299s ***** test 299s load gradespaired.mat 299s [p, h, stats] = signrank (gradespaired(:,1), ... 299s gradespaired(:,2), 'tail', 'left'); 299s assert (p, 0.0047, 1e-4); 299s assert (h, true); 299s assert (stats.zval, -2.5982, 1e-4); 299s assert (stats.signedrank, 2017.5); 299s ***** test 299s load ('gradespaired.mat'); 299s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 299s 'tail', 'left', 'method', 'exact'); 299s assert (p, 0.0045, 1e-4); 299s assert (h, true); 299s assert (stats.zval, NaN); 299s assert (stats.signedrank, 2017.5); 299s ***** test 299s load mileage 299s [p, h, stats] = signrank (mileage(:,2), 33); 299s assert (p, 0.0312, 1e-4); 299s assert (h, true); 299s assert (stats.zval, NaN); 299s assert (stats.signedrank, 21); 299s ***** test 299s load mileage 299s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 299s assert (p, 0.0156, 1e-4); 299s assert (h, true); 299s assert (stats.zval, NaN); 299s assert (stats.signedrank, 21); 299s ***** test 299s load mileage 299s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 299s 'alpha', 0.01, 'method', 'approximate'); 299s assert (p, 0.0180, 1e-4); 299s assert (h, false); 299s assert (stats.zval, 2.0966, 1e-4); 299s assert (stats.signedrank, 21); 299s ***** error signrank (ones (2)) 299s ***** error ... 299s signrank ([1, 2, 3, 4], ones (2)) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [1, 2, 3]) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'tail') 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'alpha', 0) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'alpha', "a") 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'tail', "some") 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'method', 0.01) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'method', "some") 299s ***** error ... 299s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 299s 22 tests, 22 passed, 0 known failure, 0 skipped 299s [inst/qqplot.m] 299s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/qqplot.m 299s ***** test 299s hf = figure ("visible", "off"); 299s unwind_protect 299s 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]); 299s unwind_protect_cleanup 299s close (hf); 299s end_unwind_protect 299s ***** error qqplot () 299s ***** error qqplot ({1}) 299s ***** error qqplot (ones (2,2)) 299s ***** error qqplot (1, "foobar") 299s ***** error qqplot ([1 2 3], "foobar") 299s 6 tests, 6 passed, 0 known failure, 0 skipped 299s [inst/mahal.m] 299s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/mahal.m 299s ***** error mahal () 299s ***** error mahal (1, 2, 3) 299s ***** error mahal ("A", "B") 299s ***** error mahal ([1, 2], ["A", "B"]) 299s ***** error mahal (ones (2, 2, 2)) 299s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 299s ***** error mahal (ones (2, 2), ones (2, 3)) 299s ***** test 299s X = [1 0; 0 1; 1 1; 0 0]; 299s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 299s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 299s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 299s 9 tests, 9 passed, 0 known failure, 0 skipped 299s [inst/standardizeMissing.m] 299s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/standardizeMissing.m 299s ***** assert (standardizeMissing (1, 1), NaN) 299s ***** assert (standardizeMissing (1, 0), 1) 299s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 299s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 299s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 299s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 299s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 299s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 299s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 299s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 299s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 299s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 299s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 299s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 299s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 299s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 299s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 299s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 299s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 299s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 299s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 299s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 299s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 299s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 299s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 299s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 299s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 299s ***** assert (standardizeMissing (single (1), true), single (NaN)) 299s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 299s ***** assert (standardizeMissing (true, true), true) 299s ***** assert (standardizeMissing (true, 1), true) 299s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 299s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 299s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 299s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 299s ***** error standardizeMissing (); 299s ***** error standardizeMissing (1); 300s ***** error standardizeMissing (1,2,3); 300s ***** error standardizeMissing ({'abc', 1}, 1); 300s ***** error standardizeMissing (struct ('a','b'), 1); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 300s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 300s 49 tests, 49 passed, 0 known failure, 0 skipped 300s [inst/squareform.m] 300s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/squareform.m 300s ***** shared v, m 300s v = 1:6; 300s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 300s ***** assert (squareform (v), m) 300s ***** assert (squareform (squareform (v)), v) 300s ***** assert (squareform (m), v) 300s ***** assert (squareform (v'), m) 300s ***** assert (squareform (1), [0 1;1 0]) 300s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 300s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 300s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 300s ***** test 300s for c = {@single, @double, @uint8, @uint32, @uint64} 300s f = c{1}; 300s assert (squareform (f (v)), f (m)) 300s assert (squareform (f (m)), f (v)) 300s endfor 300s 9 tests, 9 passed, 0 known failure, 0 skipped 300s [inst/inconsistent.m] 300s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/inconsistent.m 300s ***** error inconsistent () 300s ***** error inconsistent ([1 2 1], 2, 3) 300s ***** error inconsistent (ones (2, 2)) 300s ***** error inconsistent ([1 2 1], -1) 300s ***** error inconsistent ([1 2 1], 1.3) 300s ***** error inconsistent ([1 2 1], [1 1]) 300s ***** error inconsistent (ones (2, 3)) 300s ***** test 300s load fisheriris; 300s Z = linkage(meas, 'average', 'chebychev'); 300s assert (cond (inconsistent (Z)), 39.9, 1e-3); 300s 8 tests, 8 passed, 0 known failure, 0 skipped 300s [inst/hotelling_t2test2.m] 300s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hotelling_t2test2.m 300s ***** error hotelling_t2test2 (); 300s ***** error ... 300s hotelling_t2test2 ([2, 3, 4, 5, 6]); 300s ***** error ... 300s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 300s ***** error ... 300s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 300s ***** error ... 300s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 300s ***** error ... 300s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 300s ***** error ... 300s hotelling_t2test2 (ones (20,1), ones (20,2)); 300s ***** error ... 300s hotelling_t2test2 (ones (20,2), ones (25,3)); 300s ***** test 300s randn ("seed", 1); 300s x1 = randn (60000, 5); 300s randn ("seed", 5); 300s x2 = randn (30000, 5); 300s [h, pval, stats] = hotelling_t2test2 (x1, x2); 300s assert (h, 0); 300s assert (stats.df1, 5); 300s assert (stats.df2, 89994); 300s 14 tests, 14 passed, 0 known failure, 0 skipped 300s [inst/grp2idx.m] 300s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/grp2idx.m 300s ***** test 300s in = [true false false true]; 300s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 300s assert (nthargout (1:3, @grp2idx, in), out) 300s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 300s ***** test 300s assert (nthargout (1:3, @grp2idx, [false, true]), 300s {[1; 2] {"0"; "1"} [false; true]}); 300s assert (nthargout (1:3, @grp2idx, [true, false]), 300s {[1; 2] {"1"; "0"} [true; false]}); 300s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 300s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 300s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 300s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 300s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 300s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 300s [1; -3; -2; 2; -1; 3]}); 300s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 300s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 300s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 300s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 300s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 300s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 300s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 300s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 300s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 300s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 300s 10 tests, 10 passed, 0 known failure, 0 skipped 300s [inst/dist_wrap/makedist.m] 300s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/makedist.m 300s ***** test 300s pd = makedist ("beta"); 300s assert (class (pd), "BetaDistribution"); 300s assert (pd.a, 1); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("beta", "a", 5); 300s assert (pd.a, 5); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("beta", "b", 5); 300s assert (pd.a, 1); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("beta", "a", 3, "b", 5); 300s assert (pd.a, 3); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("binomial"); 300s assert (class (pd), "BinomialDistribution"); 300s assert (pd.N, 1); 300s assert (pd.p, 0.5); 300s ***** test 300s pd = makedist ("binomial", "N", 5); 300s assert (pd.N, 5); 300s assert (pd.p, 0.5); 300s ***** test 300s pd = makedist ("binomial", "p", 0.2); 300s assert (pd.N, 1); 300s assert (pd.p, 0.2); 300s ***** test 300s pd = makedist ("binomial", "N", 3, "p", 0.3); 300s assert (pd.N, 3); 300s assert (pd.p, 0.3); 300s ***** test 300s pd = makedist ("birnbaumsaunders"); 300s assert (class (pd), "BirnbaumSaundersDistribution"); 300s assert (pd.beta, 1); 300s assert (pd.gamma, 1); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "beta", 5); 300s assert (pd.beta, 5); 300s assert (pd.gamma, 1); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "gamma", 5); 300s assert (pd.beta, 1); 300s assert (pd.gamma, 5); 300s ***** test 300s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 300s assert (pd.beta, 3); 300s assert (pd.gamma, 5); 300s ***** test 300s pd = makedist ("burr"); 300s assert (class (pd), "BurrDistribution"); 300s assert (pd.alpha, 1); 300s assert (pd.c, 1); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "k", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 1); 300s assert (pd.k, 5); 300s ***** test 300s pd = makedist ("burr", "c", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 5); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "alpha", 3, "c", 5); 300s assert (pd.alpha, 3); 300s assert (pd.c, 5); 300s assert (pd.k, 1); 300s ***** test 300s pd = makedist ("burr", "k", 3, "c", 5); 300s assert (pd.alpha, 1); 300s assert (pd.c, 5); 300s assert (pd.k, 3); 300s ***** test 300s pd = makedist ("exponential"); 300s assert (class (pd), "ExponentialDistribution"); 300s assert (pd.mu, 1); 300s ***** test 300s pd = makedist ("exponential", "mu", 5); 300s assert (pd.mu, 5); 300s ***** test 300s pd = makedist ("extremevalue"); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("extremevalue", "mu", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("ev", "sigma", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("ev", "mu", -3, "sigma", 5); 300s assert (class (pd), "ExtremeValueDistribution"); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("gamma"); 300s assert (class (pd), "GammaDistribution"); 300s assert (pd.a, 1); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("gamma", "a", 5); 300s assert (pd.a, 5); 300s assert (pd.b, 1); 300s ***** test 300s pd = makedist ("gamma", "b", 5); 300s assert (pd.a, 1); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("gamma", "a", 3, "b", 5); 300s assert (pd.a, 3); 300s assert (pd.b, 5); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue"); 300s assert (class (pd), "GeneralizedExtremeValueDistribution"); 300s assert (pd.k, 0); 300s assert (pd.sigma, 1); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "k", 5); 300s assert (pd.k, 5); 300s assert (pd.sigma, 1); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 300s assert (pd.k, 0); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 300s assert (pd.k, 3); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 0); 300s ***** test 300s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 300s assert (pd.k, 0); 300s assert (pd.sigma, 5); 300s assert (pd.mu, 3); 300s ***** test 300s pd = makedist ("GeneralizedPareto"); 300s assert (class (pd), "GeneralizedParetoDistribution"); 300s assert (pd.k, 1); 300s assert (pd.sigma, 1); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "k", 5); 300s assert (pd.k, 5); 300s assert (pd.sigma, 1); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "sigma", 5); 300s assert (pd.k, 1); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 300s assert (pd.k, 3); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 1); 300s ***** test 300s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 300s assert (pd.k, 1); 300s assert (pd.sigma, 5); 300s assert (pd.theta, 3); 300s ***** test 300s pd = makedist ("HalfNormal"); 300s assert (class (pd), "HalfNormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("HalfNormal", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("HalfNormal", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("InverseGaussian"); 300s assert (class (pd), "InverseGaussianDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("InverseGaussian", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("InverseGaussian", "lambda", 5); 300s assert (pd.mu, 1); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 300s assert (pd.mu, 3); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("logistic"); 300s assert (class (pd), "LogisticDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("logistic", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("logistic", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("logistic", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("loglogistic"); 300s assert (class (pd), "LoglogisticDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("loglogistic", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("loglogistic", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 300s assert (pd.mu, 3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Lognormal"); 300s assert (class (pd), "LognormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Lognormal", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Lognormal", "sigma", 5); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Loguniform"); 300s assert (class (pd), "LoguniformDistribution"); 300s assert (pd.Lower, 1); 300s assert (pd.Upper, 4); 300s ***** test 300s pd = makedist ("Loguniform", "Lower", 2); 300s assert (pd.Lower, 2); 300s assert (pd.Upper, 4); 300s ***** test 300s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 300s assert (pd.Lower, 1); 300s assert (pd.Upper, 3); 300s ***** test 300s pd = makedist ("Multinomial"); 300s assert (class (pd), "MultinomialDistribution"); 300s assert (pd.Probabilities, [0.5, 0.5]); 300s ***** test 300s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 300s assert (class (pd), "MultinomialDistribution"); 300s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 300s ***** test 300s pd = makedist ("Nakagami"); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.omega, 1); 300s ***** test 300s pd = makedist ("Nakagami", "mu", 5); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.omega, 1); 300s ***** test 300s pd = makedist ("Nakagami", "omega", 0.3); 300s assert (class (pd), "NakagamiDistribution"); 300s assert (pd.mu, 1); 300s assert (pd.omega, 0.3); 300s ***** test 300s pd = makedist ("NegativeBinomial"); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 1); 300s assert (pd.P, 0.5); 300s ***** test 300s pd = makedist ("NegativeBinomial", "R", 5); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 5); 300s assert (pd.P, 0.5); 300s ***** test 300s pd = makedist ("NegativeBinomial", "p", 0.3); 300s assert (class (pd), "NegativeBinomialDistribution"); 300s assert (pd.R, 1); 300s assert (pd.P, 0.3); 300s ***** test 300s pd = makedist ("Normal"); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Normal", "mu", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Normal", "sigma", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Normal", "mu", -3, "sigma", 5); 300s assert (class (pd), "NormalDistribution"); 300s assert (pd.mu, -3); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("PiecewiseLinear"); 300s assert (class (pd), "PiecewiseLinearDistribution"); 300s assert (pd.x, [0; 1]); 300s assert (pd.Fx, [0; 1]); 300s ***** test 300s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 300s assert (pd.x, [0; 1; 2]); 300s assert (pd.Fx, [0; 0.5; 1]); 300s ***** test 300s pd = makedist ("Poisson"); 300s assert (class (pd), "PoissonDistribution"); 300s assert (pd.lambda, 1); 300s ***** test 300s pd = makedist ("Poisson", "lambda", 5); 300s assert (pd.lambda, 5); 300s ***** test 300s pd = makedist ("Rayleigh"); 300s assert (class (pd), "RayleighDistribution"); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rayleigh", "sigma", 5); 300s assert (pd.sigma, 5); 300s ***** test 300s pd = makedist ("Rician"); 300s assert (class (pd), "RicianDistribution"); 300s assert (pd.s, 1); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rician", "s", 3); 300s assert (pd.s, 3); 300s assert (pd.sigma, 1); 300s ***** test 300s pd = makedist ("Rician", "sigma", 3); 300s assert (pd.s, 1); 300s assert (pd.sigma, 3); 300s ***** test 300s pd = makedist ("Rician", "s", 2, "sigma", 3); 300s assert (pd.s, 2); 300s assert (pd.sigma, 3); 300s ***** warning 300s pd = makedist ("stable"); 300s assert (class (pd), "double"); 300s assert (isempty (pd), true); 300s ***** test 300s pd = makedist ("tlocationscale"); 300s assert (class (pd), "tLocationScaleDistribution"); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 1); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", 5); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 1); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "sigma", 2); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 300s assert (pd.mu, 5); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 5); 300s ***** test 300s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 300s assert (pd.mu, 0); 300s assert (pd.sigma, 2); 300s assert (pd.nu, 1); 300s ***** test 300s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 300s assert (pd.mu, -2); 300s assert (pd.sigma, 3); 300s assert (pd.nu, 1); 300s ***** test 300s pd = makedist ("Triangular"); 300s assert (class (pd), "TriangularDistribution"); 300s assert (pd.A, 0); 300s assert (pd.B, 0.5); 300s assert (pd.C, 1); 301s ***** test 301s pd = makedist ("Triangular", "A", -2); 301s assert (pd.A, -2); 301s assert (pd.B, 0.5); 301s assert (pd.C, 1); 301s ***** test 301s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 301s assert (pd.A, 0.5); 301s assert (pd.B, 0.9); 301s assert (pd.C, 1); 301s ***** test 301s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 301s assert (pd.A, 1); 301s assert (pd.B, 2); 301s assert (pd.C, 5); 301s ***** test 301s pd = makedist ("Uniform"); 301s assert (class (pd), "UniformDistribution"); 301s assert (pd.Lower, 0); 301s assert (pd.Upper, 1); 301s ***** test 301s pd = makedist ("Uniform", "Lower", -2); 301s assert (pd.Lower, -2); 301s assert (pd.Upper, 1); 301s ***** test 301s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 301s assert (pd.Lower, 1); 301s assert (pd.Upper, 3); 301s ***** test 301s pd = makedist ("Weibull"); 301s assert (class (pd), "WeibullDistribution"); 301s assert (pd.lambda, 1); 301s assert (pd.k, 1); 301s ***** test 301s pd = makedist ("Weibull", "lambda", 3); 301s assert (pd.lambda, 3); 301s assert (pd.k, 1); 301s ***** test 301s pd = makedist ("Weibull", "lambda", 3, "k", 2); 301s assert (pd.lambda, 3); 301s assert (pd.k, 2); 301s ***** error makedist (1) 301s ***** error makedist (["as";"sd"]) 301s ***** error makedist ("some") 301s ***** error ... 301s makedist ("Beta", "a") 301s ***** error ... 301s makedist ("Beta", "a", 1, "Q", 23) 301s ***** error ... 301s makedist ("Binomial", "N", 1, "Q", 23) 301s ***** error ... 301s makedist ("BirnbaumSaunders", "N", 1) 301s ***** error ... 301s makedist ("Burr", "lambda", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("extremevalue", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("exponential", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Gamma", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("HalfNormal", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Logistic", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Loglogistic", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Lognormal", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Loguniform", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Multinomial", "k", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Nakagami", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Normal", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Poisson", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Rician", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Stable", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Triangular", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Uniform", "mu", 1, "sdfs", 34) 301s ***** error ... 301s makedist ("Weibull", "mu", 1, "sdfs", 34) 301s 131 tests, 131 passed, 0 known failure, 0 skipped 301s [inst/dist_wrap/icdf.m] 301s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/icdf.m 301s ***** shared p 301s p = [0.05:0.05:0.5]; 301s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 301s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 301s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 301s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 301s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 301s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 301s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 301s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 301s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 301s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 301s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 301s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 301s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 301s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 301s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 301s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 301s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 301s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 301s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 301s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 301s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 301s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 301s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 301s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 301s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 301s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 301s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 301s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 301s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 301s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 301s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 301s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 301s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 301s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 301s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 301s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 301s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 301s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 301s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 301s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 301s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 301s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 301s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 301s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 301s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 301s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 301s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 301s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 301s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 301s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 302s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 302s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 302s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 302s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 302s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 302s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 302s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 302s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 302s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 303s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 303s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 303s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 303s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 303s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 303s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 303s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 303s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 303s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 303s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 303s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 303s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 307s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 312s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 312s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 312s ***** error icdf (1) 312s ***** error icdf ({"beta"}) 312s ***** error icdf ("beta", {[1 2 3 4 5]}) 312s ***** error icdf ("beta", "text") 312s ***** error icdf ("beta", 1+i) 312s ***** error ... 312s icdf ("Beta", p, "a", 2) 312s ***** error ... 312s icdf ("Beta", p, 5, "") 312s ***** error ... 312s icdf ("Beta", p, 5, {2}) 312s ***** error icdf ("chi2", p) 312s ***** error icdf ("Beta", p, 5) 312s ***** error icdf ("Burr", p, 5) 312s ***** error icdf ("Burr", p, 5, 2) 312s 86 tests, 86 passed, 0 known failure, 0 skipped 312s [inst/dist_wrap/pdf.m] 312s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/pdf.m 312s ***** shared x 312s x = [1:5]; 312s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 312s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 312s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 312s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 312s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 312s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 312s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 312s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 312s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 312s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 312s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 312s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 312s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 312s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 312s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 312s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 312s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 312s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 312s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 312s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 312s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 312s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 312s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 312s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 312s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 312s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 312s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 312s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 312s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 312s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 312s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 312s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 312s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 312s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 312s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 312s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 312s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 312s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 312s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 312s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 312s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 312s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 312s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 312s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 312s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 312s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 312s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 312s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 312s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 312s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 312s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 312s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 312s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 312s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 312s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 312s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 312s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 312s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 312s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 312s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 312s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 312s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 312s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 312s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 312s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 312s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 312s ***** error pdf (1) 312s ***** error pdf ({"beta"}) 312s ***** error pdf ("beta", {[1 2 3 4 5]}) 312s ***** error pdf ("beta", "text") 312s ***** error pdf ("beta", 1+i) 312s ***** error ... 312s pdf ("Beta", x, "a", 2) 312s ***** error ... 312s pdf ("Beta", x, 5, "") 312s ***** error ... 312s pdf ("Beta", x, 5, {2}) 312s ***** error pdf ("chi2", x) 312s ***** error pdf ("Beta", x, 5) 312s ***** error pdf ("Burr", x, 5) 312s ***** error pdf ("Burr", x, 5, 2) 312s 86 tests, 86 passed, 0 known failure, 0 skipped 312s [inst/dist_wrap/random.m] 312s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/random.m 312s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 312s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 312s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 312s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 312s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 312s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 312s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 312s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 312s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 312s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 312s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 312s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 312s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 312s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 312s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 312s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 312s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 312s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 312s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 312s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 312s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 312s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 312s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 312s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 312s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 312s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 312s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 312s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 312s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 312s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 312s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 312s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 312s ***** error random (1) 312s ***** error random ({"beta"}) 312s ***** error ... 312s random ("Beta", "a", 2) 312s ***** error ... 312s random ("Beta", 5, "") 312s ***** error ... 312s random ("Beta", 5, {2}) 312s ***** error ... 312s random ("Beta", "a", 2, 2, 10) 312s ***** error ... 312s random ("Beta", 5, "", 2, 10) 312s ***** error ... 312s random ("Beta", 5, {2}, 2, 10) 312s ***** error ... 312s random ("Beta", 5, "", 2, 10) 312s ***** error random ("chi2") 312s ***** error random ("Beta", 5) 312s ***** error random ("Burr", 5) 312s ***** error random ("Burr", 5, 2) 312s 87 tests, 87 passed, 0 known failure, 0 skipped 312s [inst/dist_wrap/fitdist.m] 312s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/fitdist.m 312s ***** test 312s x = betarnd (1, 1, 100, 1); 312s pd = fitdist (x, "Beta"); 312s [phat, pci] = betafit (x); 312s assert ([pd.a, pd.b], phat); 312s assert (paramci (pd), pci); 312s ***** test 312s x1 = betarnd (1, 1, 100, 1); 312s x2 = betarnd (5, 2, 100, 1); 312s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = betafit (x1); 312s assert ([pd(1).a, pd(1).b], phat); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = betafit (x2); 312s assert ([pd(2).a, pd(2).b], phat); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s N = 1; 312s x = binornd (N, 0.5, 100, 1); 312s pd = fitdist (x, "binomial"); 312s [phat, pci] = binofit (sum (x), numel (x)); 312s assert ([pd.N, pd.p], [N, phat]); 312s assert (paramci (pd), pci); 312s ***** test 312s N = 3; 312s x = binornd (N, 0.4, 100, 1); 312s pd = fitdist (x, "binomial", "ntrials", N); 312s [phat, pci] = binofit (sum (x), numel (x) * N); 312s assert ([pd.N, pd.p], [N, phat]); 312s assert (paramci (pd), pci); 312s ***** test 312s N = 1; 312s x1 = binornd (N, 0.5, 100, 1); 312s x2 = binornd (N, 0.7, 100, 1); 312s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = binofit (sum (x1), numel (x1)); 312s assert ([pd(1).N, pd(1).p], [N, phat]); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = binofit (sum (x2), numel (x2)); 312s assert ([pd(2).N, pd(2).p], [N, phat]); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s N = 5; 312s x1 = binornd (N, 0.5, 100, 1); 312s x2 = binornd (N, 0.8, 100, 1); 312s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 312s "By", [ones(100,1); 2*ones(100,1)]); 312s [phat, pci] = binofit (sum (x1), numel (x1) * N); 312s assert ([pd(1).N, pd(1).p], [N, phat]); 312s assert (paramci (pd(1)), pci); 312s [phat, pci] = binofit (sum (x2), numel (x2) * N); 312s assert ([pd(2).N, pd(2).p], [N, phat]); 312s assert (paramci (pd(2)), pci); 312s ***** test 312s x = bisarnd (1, 1, 100, 1); 312s pd = fitdist (x, "BirnbaumSaunders"); 312s [phat, pci] = bisafit (x); 312s assert ([pd.beta, pd.gamma], phat); 312s assert (paramci (pd), pci); 313s ***** test 313s x1 = bisarnd (1, 1, 100, 1); 313s x2 = bisarnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = bisafit (x1); 313s assert ([pd(1).beta, pd(1).gamma], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = bisafit (x2); 313s assert ([pd(2).beta, pd(2).gamma], phat); 313s assert (paramci (pd(2)), pci); 313s ***** test 313s x = burrrnd (1, 2, 1, 100, 1); 313s pd = fitdist (x, "Burr"); 313s [phat, pci] = burrfit (x); 313s assert ([pd.alpha, pd.c, pd.k], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = burrrnd (1, 2, 1, 100, 1); 313s x2 = burrrnd (1, 0.5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = burrfit (x1); 313s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = burrfit (x2); 313s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 313s assert (paramci (pd(2)), pci); 313s ***** test 313s x = exprnd (1, 100, 1); 313s pd = fitdist (x, "exponential"); 313s [muhat, muci] = expfit (x); 313s assert ([pd.mu], muhat); 313s assert (paramci (pd), muci); 313s ***** test 313s x1 = exprnd (1, 100, 1); 313s x2 = exprnd (5, 100, 1); 313s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 313s [muhat, muci] = expfit (x1); 313s assert ([pd(1).mu], muhat); 313s assert (paramci (pd(1)), muci); 313s [muhat, muci] = expfit (x2); 313s assert ([pd(2).mu], muhat); 313s assert (paramci (pd(2)), muci); 313s ***** test 313s x = evrnd (1, 1, 100, 1); 313s pd = fitdist (x, "ev"); 313s [phat, pci] = evfit (x); 313s assert ([pd.mu, pd.sigma], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = evrnd (1, 1, 100, 1); 313s x2 = evrnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = evfit (x1); 313s assert ([pd(1).mu, pd(1).sigma], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = evfit (x2); 313s assert ([pd(2).mu, pd(2).sigma], phat); 313s assert (paramci (pd(2)), pci); 313s ***** test 313s x = gamrnd (1, 1, 100, 1); 313s pd = fitdist (x, "Gamma"); 313s [phat, pci] = gamfit (x); 313s assert ([pd.a, pd.b], phat); 313s assert (paramci (pd), pci); 313s ***** test 313s x1 = gamrnd (1, 1, 100, 1); 313s x2 = gamrnd (5, 2, 100, 1); 313s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 313s [phat, pci] = gamfit (x1); 313s assert ([pd(1).a, pd(1).b], phat); 313s assert (paramci (pd(1)), pci); 313s [phat, pci] = gamfit (x2); 313s assert ([pd(2).a, pd(2).b], phat); 313s assert (paramci (pd(2)), pci); 314s ***** test 314s rand ("seed", 4); # for reproducibility 314s x = gevrnd (-0.5, 1, 2, 1000, 1); 314s pd = fitdist (x, "generalizedextremevalue"); 314s [phat, pci] = gevfit (x); 314s assert ([pd.k, pd.sigma, pd.mu], phat); 314s assert (paramci (pd), pci); 314s ***** test 314s rand ("seed", 5); # for reproducibility 314s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 314s rand ("seed", 9); # for reproducibility 314s x2 = gevrnd (0, 1, -4, 1000, 1); 314s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 314s [phat, pci] = gevfit (x1); 314s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = gevfit (x2); 314s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 314s assert (paramci (pd(2)), pci); 314s ***** test 314s x = gprnd (1, 1, 1, 100, 1); 314s pd = fitdist (x, "GeneralizedPareto"); 314s [phat, pci] = gpfit (x, 1); 314s assert ([pd.k, pd.sigma, pd.theta], phat); 314s assert (paramci (pd), pci); 314s ***** test 314s x = gprnd (1, 1, 2, 100, 1); 314s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 314s [phat, pci] = gpfit (x, 2); 314s assert ([pd.k, pd.sigma, pd.theta], phat); 314s assert (paramci (pd), pci); 314s ***** test 314s x1 = gprnd (1, 1, 1, 100, 1); 314s x2 = gprnd (0, 2, 1, 100, 1); 314s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = gpfit (x1, 1); 314s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = gpfit (x2, 1); 314s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 314s assert (paramci (pd(2)), pci); 314s ***** test 314s x1 = gprnd (3, 2, 2, 100, 1); 314s x2 = gprnd (2, 3, 2, 100, 1); 314s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 314s "By", [ones(100,1); 2*ones(100,1)]); 314s [phat, pci] = gpfit (x1, 2); 314s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 314s assert (paramci (pd(1)), pci); 314s [phat, pci] = gpfit (x2, 2); 314s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 314s assert (paramci (pd(2)), pci); 314s ***** test 314s x = hnrnd (0, 1, 100, 1); 314s pd = fitdist (x, "HalfNormal"); 314s [phat, pci] = hnfit (x, 0); 314s assert ([pd.mu, pd.sigma], phat); 314s assert (paramci (pd), pci); 315s ***** test 315s x = hnrnd (1, 1, 100, 1); 315s pd = fitdist (x, "HalfNormal", "mu", 1); 315s [phat, pci] = hnfit (x, 1); 315s assert ([pd.mu, pd.sigma], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = hnrnd (0, 1, 100, 1); 315s x2 = hnrnd (0, 2, 100, 1); 315s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = hnfit (x1, 0); 315s assert ([pd(1).mu, pd(1).sigma], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = hnfit (x2, 0); 315s assert ([pd(2).mu, pd(2).sigma], phat); 315s assert (paramci (pd(2)), pci); 315s ***** test 315s x1 = hnrnd (2, 1, 100, 1); 315s x2 = hnrnd (2, 2, 100, 1); 315s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 315s "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = hnfit (x1, 2); 315s assert ([pd(1).mu, pd(1).sigma], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = hnfit (x2, 2); 315s assert ([pd(2).mu, pd(2).sigma], phat); 315s assert (paramci (pd(2)), pci); 315s ***** test 315s x = invgrnd (1, 1, 100, 1); 315s pd = fitdist (x, "InverseGaussian"); 315s [phat, pci] = invgfit (x); 315s assert ([pd.mu, pd.lambda], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = invgrnd (1, 1, 100, 1); 315s x2 = invgrnd (5, 2, 100, 1); 315s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = invgfit (x1); 315s assert ([pd(1).mu, pd(1).lambda], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = invgfit (x2); 315s assert ([pd(2).mu, pd(2).lambda], phat); 315s assert (paramci (pd(2)), pci); 315s ***** test 315s x = logirnd (1, 1, 100, 1); 315s pd = fitdist (x, "logistic"); 315s [phat, pci] = logifit (x); 315s assert ([pd.mu, pd.sigma], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = logirnd (1, 1, 100, 1); 315s x2 = logirnd (5, 2, 100, 1); 315s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = logifit (x1); 315s assert ([pd(1).mu, pd(1).sigma], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = logifit (x2); 315s assert ([pd(2).mu, pd(2).sigma], phat); 315s assert (paramci (pd(2)), pci); 315s ***** test 315s x = loglrnd (1, 1, 100, 1); 315s pd = fitdist (x, "loglogistic"); 315s [phat, pci] = loglfit (x); 315s assert ([pd.mu, pd.sigma], phat); 315s assert (paramci (pd), pci); 315s ***** test 315s x1 = loglrnd (1, 1, 100, 1); 315s x2 = loglrnd (5, 2, 100, 1); 315s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 315s [phat, pci] = loglfit (x1); 315s assert ([pd(1).mu, pd(1).sigma], phat); 315s assert (paramci (pd(1)), pci); 315s [phat, pci] = loglfit (x2); 315s assert ([pd(2).mu, pd(2).sigma], phat); 315s assert (paramci (pd(2)), pci); 315s ***** test 315s x = lognrnd (1, 1, 100, 1); 315s pd = fitdist (x, "lognormal"); 315s [phat, pci] = lognfit (x); 315s assert ([pd.mu, pd.sigma], phat); 315s assert (paramci (pd), pci); 316s ***** test 316s x1 = lognrnd (1, 1, 100, 1); 316s x2 = lognrnd (5, 2, 100, 1); 316s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 316s [phat, pci] = lognfit (x1); 316s assert ([pd(1).mu, pd(1).sigma], phat); 316s assert (paramci (pd(1)), pci); 316s [phat, pci] = lognfit (x2); 316s assert ([pd(2).mu, pd(2).sigma], phat); 316s assert (paramci (pd(2)), pci); 316s ***** test 316s x = nakarnd (2, 0.5, 100, 1); 316s pd = fitdist (x, "Nakagami"); 316s [phat, pci] = nakafit (x); 316s assert ([pd.mu, pd.omega], phat); 316s assert (paramci (pd), pci); 316s ***** test 316s x1 = nakarnd (2, 0.5, 100, 1); 316s x2 = nakarnd (5, 0.8, 100, 1); 316s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 316s [phat, pci] = nakafit (x1); 316s assert ([pd(1).mu, pd(1).omega], phat); 316s assert (paramci (pd(1)), pci); 316s [phat, pci] = nakafit (x2); 316s assert ([pd(2).mu, pd(2).omega], phat); 316s assert (paramci (pd(2)), pci); 316s ***** test 316s randp ("seed", 123); 316s randg ("seed", 321); 316s x = nbinrnd (2, 0.5, 100, 1); 316s pd = fitdist (x, "negativebinomial"); 316s [phat, pci] = nbinfit (x); 316s assert ([pd.R, pd.P], phat); 316s assert (paramci (pd), pci); 316s ***** test 316s randp ("seed", 345); 316s randg ("seed", 543); 316s x1 = nbinrnd (2, 0.5, 100, 1); 316s randp ("seed", 432); 316s randg ("seed", 234); 316s x2 = nbinrnd (5, 0.8, 100, 1); 316s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 316s [phat, pci] = nbinfit (x1); 316s assert ([pd(1).R, pd(1).P], phat); 316s assert (paramci (pd(1)), pci); 316s [phat, pci] = nbinfit (x2); 316s assert ([pd(2).R, pd(2).P], phat); 316s assert (paramci (pd(2)), pci); 316s ***** test 316s x = normrnd (1, 1, 100, 1); 316s pd = fitdist (x, "normal"); 316s [muhat, sigmahat, muci, sigmaci] = normfit (x); 316s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 316s assert (paramci (pd), [muci, sigmaci]); 316s ***** test 316s x1 = normrnd (1, 1, 100, 1); 316s x2 = normrnd (5, 2, 100, 1); 316s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 316s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 316s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 316s assert (paramci (pd(1)), [muci, sigmaci]); 316s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 316s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 316s assert (paramci (pd(2)), [muci, sigmaci]); 317s ***** test 317s x = poissrnd (1, 100, 1); 317s pd = fitdist (x, "poisson"); 317s [phat, pci] = poissfit (x); 317s assert (pd.lambda, phat); 317s assert (paramci (pd), pci); 317s ***** test 317s x1 = poissrnd (1, 100, 1); 317s x2 = poissrnd (5, 100, 1); 317s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 317s [phat, pci] = poissfit (x1); 317s assert (pd(1).lambda, phat); 317s assert (paramci (pd(1)), pci); 317s [phat, pci] = poissfit (x2); 317s assert (pd(2).lambda, phat); 317s assert (paramci (pd(2)), pci); 317s ***** test 317s x = raylrnd (1, 100, 1); 317s pd = fitdist (x, "rayleigh"); 317s [phat, pci] = raylfit (x); 317s assert (pd.sigma, phat); 317s assert (paramci (pd), pci); 317s ***** test 317s x1 = raylrnd (1, 100, 1); 317s x2 = raylrnd (5, 100, 1); 317s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 317s [phat, pci] = raylfit (x1); 317s assert ( pd(1).sigma, phat); 317s assert (paramci (pd(1)), pci); 317s [phat, pci] = raylfit (x2); 317s assert (pd(2).sigma, phat); 317s assert (paramci (pd(2)), pci); 317s ***** test 317s x = ricernd (1, 1, 100, 1); 317s pd = fitdist (x, "rician"); 317s [phat, pci] = ricefit (x); 317s assert ([pd.s, pd.sigma], phat); 317s assert (paramci (pd), pci); 317s ***** test 317s x1 = ricernd (1, 1, 100, 1); 317s x2 = ricernd (5, 2, 100, 1); 317s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 317s [phat, pci] = ricefit (x1); 317s assert ([pd(1).s, pd(1).sigma], phat); 317s assert (paramci (pd(1)), pci); 317s [phat, pci] = ricefit (x2); 317s assert ([pd(2).s, pd(2).sigma], phat); 317s assert (paramci (pd(2)), pci); 317s ***** warning ... 317s fitdist ([1 2 3 4 5], "Stable"); 317s ***** test 317s x = tlsrnd (0, 1, 1, 100, 1); 317s pd = fitdist (x, "tlocationscale"); 317s [phat, pci] = tlsfit (x); 317s assert ([pd.mu, pd.sigma, pd.nu], phat); 317s assert (paramci (pd), pci); 317s ***** test 317s x1 = tlsrnd (0, 1, 1, 100, 1); 317s x2 = tlsrnd (5, 2, 1, 100, 1); 317s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 317s [phat, pci] = tlsfit (x1); 317s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 317s assert (paramci (pd(1)), pci); 317s [phat, pci] = tlsfit (x2); 317s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 317s assert (paramci (pd(2)), pci); 318s ***** test 318s x = [1 2 3 4 5]; 318s pd = fitdist (x, "weibull"); 318s [phat, pci] = wblfit (x); 318s assert ([pd.lambda, pd.k], phat); 318s assert (paramci (pd), pci); 318s ***** test 318s x = [1 2 3 4 5 6 7 8 9 10]; 318s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 318s [phat, pci] = wblfit (x(1:5)); 318s assert ([pd(1).lambda, pd(1).k], phat); 318s assert (paramci (pd(1)), pci); 318s [phat, pci] = wblfit (x(6:10)); 318s assert ([pd(2).lambda, pd(2).k], phat); 318s assert (paramci (pd(2)), pci); 318s ***** error fitdist (1) 318s ***** error fitdist (1, ["as";"sd"]) 318s ***** error fitdist (1, "some") 318s ***** error ... 318s fitdist (ones (2), "normal") 318s ***** error ... 318s fitdist ([i, 2, 3], "normal") 318s ***** error ... 318s fitdist (["a", "s", "d"], "normal") 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "By") 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", i) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "ntrials", 0) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "options", 0) 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 318s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 318s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 318s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 318s ***** error ... 318s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 318s ***** error ... 318s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 318s ***** error ... 318s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 318s ***** error ... 318s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 318s 77 tests, 77 passed, 0 known failure, 0 skipped 318s [inst/dist_wrap/mle.m] 318s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/mle.m 318s ***** error mle (ones (2)) 318s ***** error mle ("text") 318s ***** error mle ([1, 2, 3, i, 5]) 318s ***** error ... 318s mle ([1:50], "distribution") 318s ***** error ... 318s mle ([1:50], "censoring", logical ([1,0,1,0])) 318s ***** error ... 318s mle ([1:50], "frequency", [1,0,1,0]) 318s ***** error ... 318s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 318s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 318s ***** error mle ([1:50], "alpha", 1) 318s ***** error mle ([1:50], "alpha", -1) 318s ***** error mle ([1:50], "alpha", i) 318s ***** error ... 318s mle ([1:50], "ntrials", -1) 318s ***** error ... 318s mle ([1:50], "ntrials", [20, 50]) 318s ***** error ... 318s mle ([1:50], "ntrials", [20.3]) 318s ***** error ... 318s mle ([1:50], "ntrials", 3i) 318s ***** error ... 318s mle ([1:50], "options", 4) 318s ***** error ... 318s mle ([1:50], "options", struct ("x", 3)) 318s ***** error mle ([1:50], "NAME", "value") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 2 1 0], "distribution", "bernoulli") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "bino") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 -1 0], "distribution", "gp") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 -1 0], "distribution", "hn") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 318s ***** error mle ([1:50], "distribution", "value") 318s ***** error ... 318s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 318s 36 tests, 36 passed, 0 known failure, 0 skipped 318s [inst/dist_wrap/cdf.m] 318s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_wrap/cdf.m 318s ***** shared x 318s x = [1:5]; 318s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 318s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 318s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 318s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 318s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 318s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 318s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 318s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 318s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 318s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 318s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 318s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 318s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 318s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 318s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 318s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 318s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 318s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 318s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 318s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 318s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 318s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 318s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 318s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 318s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 318s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 318s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 318s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 318s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 318s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 318s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 318s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 318s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 318s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 318s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 318s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 318s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 318s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 318s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 318s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 318s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 318s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 318s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 318s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 318s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 318s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 318s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 318s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 319s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 319s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 319s ***** error cdf (1) 319s ***** error cdf ({"beta"}) 319s ***** error cdf ("beta", {[1 2 3 4 5]}) 319s ***** error cdf ("beta", "text") 319s ***** error cdf ("beta", 1+i) 319s ***** error ... 319s cdf ("Beta", x, "a", 2) 319s ***** error ... 319s cdf ("Beta", x, 5, "") 319s ***** error ... 319s cdf ("Beta", x, 5, {2}) 319s ***** error cdf ("chi2", x) 319s ***** error cdf ("Beta", x, 5) 319s ***** error cdf ("Burr", x, 5) 319s ***** error cdf ("Burr", x, 5, 2) 319s 86 tests, 86 passed, 0 known failure, 0 skipped 319s [inst/x2fx.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/x2fx.m 319s ***** test 319s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 319s D = x2fx(X,'quadratic'); 319s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 319s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 319s ***** test 319s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 319s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 319s D = x2fx(X,model); 319s assert (D(1,:) , [1, 1, 10, 10, 1]); 319s assert (D(2,:) , [1, 2, 20, 40, 4]); 319s assert (D(4,:) , [1, 4, 20, 80, 16]); 319s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 319s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 319s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 319s 5 tests, 5 passed, 0 known failure, 0 skipped 319s [inst/barttest.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/barttest.m 319s ***** error barttest () 319s ***** error barttest ([2,NaN;3,4]) 319s ***** error barttest (ones (30, 4), "alpha") 319s ***** error barttest (ones (30, 4), 0) 319s ***** error barttest (ones (30, 4), 1.2) 319s ***** error barttest (ones (30, 4), [0.2, 0.05]) 319s ***** error barttest (ones (30, 1)) 319s ***** error barttest (ones (30, 1), 0.05) 319s ***** test 319s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 319s [ndim, pval, chisq] = barttest (x); 319s assert (ndim, 2); 319s assert (pval, 0); 319s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 319s ***** test 319s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 319s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 319s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 319s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 319s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 319s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 319s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 319s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 319s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 319s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 319s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 319s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 319s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 319s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 319s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 319s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 319s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 319s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 319s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 319s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 319s [ndim, pval, chisq] = barttest (x); 319s assert (ndim, 3); 319s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 319s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 319s assert (chisq, chisq_out, 1e-4); 319s 10 tests, 10 passed, 0 known failure, 0 skipped 319s [inst/ismissing.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ismissing.m 319s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 319s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 319s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 319s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 319s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 319s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 319s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 319s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 319s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 319s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 319s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 319s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 319s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 319s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 319s ***** assert (ismissing (double (NaN)), true) 319s ***** assert (ismissing (single (NaN)), true) 319s ***** assert (ismissing (' '), true) 319s ***** assert (ismissing ({''}), true) 319s ***** assert (ismissing ({' '}), false) 319s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 319s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 319s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 319s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 319s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 319s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 319s ***** assert (ismissing ({'123', '', 123}), [false false false]) 319s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 319s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 319s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 319s ***** assert (ismissing ({1, 2, 3}), [false false false]) 319s ***** assert (ismissing ([struct struct struct]), [false false false]) 319s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 319s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 319s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 319s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 319s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 319s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 319s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 319s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 319s ***** assert (ismissing ([]), logical([])) 319s ***** assert (ismissing (''), logical([])) 319s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 319s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 319s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 319s ***** error ismissing () 319s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 319s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 319s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 319s ***** error ismissing (struct, 1) 319s 49 tests, 49 passed, 0 known failure, 0 skipped 319s [inst/gmdistribution.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/gmdistribution.m 319s ***** test 319s mu = eye(2); 319s Sigma = eye(2); 319s GM = gmdistribution (mu, Sigma); 319s density = GM.pdf ([0 0; 1 1]); 319s assert (density(1) - density(2), 0, 1e-6); 319s 319s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 319s assert (idx, [1; 2]); 319s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 319s assert (nlogl - nlogl2, 0, 1e-6); 319s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 319s assert (P - P3, zeros (2), 1e-6); 319s [idx4,nlogl4] = cluster (GM, eye(2)); 319s assert (size (nlogl4), [1 1]); 319s idx5 = cluster (GM, eye(2)); 319s assert (idx - idx5, zeros (2,1)); 319s 319s D = GM.mahal ([1;0]); 319s assert (D - M(1,:), zeros (1,2), 1e-6); 319s 319s P = GM.posterior ([0 1]); 319s assert (P - P2(2,:), zeros (1,2), 1e-6); 319s 319s R = GM.random(20); 319s assert (size(R), [20, 2]); 319s 319s R = GM.random(); 319s assert (size(R), [1, 2]); 319s 1 test, 1 passed, 0 known failure, 0 skipped 319s [inst/fitcknn.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitcknn.m 319s ***** demo 319s ## Train a k-nearest neighbor classifier for k = 10 319s ## and plot the decision boundaries. 319s 319s load fisheriris 319s idx = ! strcmp (species, "setosa"); 319s X = meas(idx,3:4); 319s Y = cast (strcmpi (species(idx), "virginica"), "double"); 319s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 319s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 319s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 319s [x1G, x2G] = meshgrid (x1, x2); 319s XGrid = [x1G(:), x2G(:)]; 319s pred = predict (obj, XGrid); 319s gidx = logical (str2num (cell2mat (pred))); 319s 319s figure 319s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 319s hold on 319s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 319s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 319s xlabel ("Petal length (cm)"); 319s ylabel ("Petal width (cm)"); 319s title ("5-Nearest Neighbor Classifier Decision Boundary"); 319s legend ({"Versicolor Region", "Virginica Region", ... 319s "Sampled Versicolor", "Sampled Virginica"}, ... 319s "location", "northwest") 319s axis tight 319s hold off 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "NSMethod", "exhaustive"); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s k = 10; 319s a = fitcknn (x, y, "NumNeighbors" ,k); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = ones (4, 11); 319s y = ["a"; "a"; "b"; "b"]; 319s k = 10; 319s a = fitcknn (x, y, "NumNeighbors" ,k); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s k = 10; 319s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s k = 10; 319s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s weights = ones (4,1); 319s a = fitcknn (x, y, "Standardize", 1); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.Standardize}, {true}) 319s assert ({a.Sigma}, {std(x, [], 1)}) 319s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s weights = ones (4,1); 319s a = fitcknn (x, y, "Standardize", false); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.Standardize}, {false}) 319s assert ({a.Sigma}, {[]}) 319s assert ({a.Mu}, {[]}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s s = ones (1, 3); 319s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.DistParameter}, {s}) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 319s assert (class (a), "ClassificationKNN"); 319s assert (a.DistParameter, 5) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 319s "NSMethod", "exhaustive"); 319s assert (class (a), "ClassificationKNN"); 319s assert (a.DistParameter, 5) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 319s assert (class (a), "ClassificationKNN"); 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 319s assert ({a.BucketSize}, {20}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "IncludeTies", true); 319s assert (class (a), "ClassificationKNN"); 319s assert (a.IncludeTies, true); 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y); 319s assert (class (a), "ClassificationKNN"); 319s assert (a.IncludeTies, false); 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Prior, [0.5; 0.5]) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s prior = [0.5; 0.5]; 319s a = fitcknn (x, y, "Prior", "empirical"); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Prior, prior) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "a"; "b"]; 319s prior = [0.75; 0.25]; 319s a = fitcknn (x, y, "Prior", "empirical"); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Prior, prior) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "a"; "b"]; 319s prior = [0.5; 0.5]; 319s a = fitcknn (x, y, "Prior", "uniform"); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Prior, prior) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s cost = eye (2); 319s a = fitcknn (x, y, "Cost", cost); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Cost, [1, 0; 0, 1]) 319s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s cost = eye (2); 319s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 319s assert (class (a), "ClassificationKNN") 319s assert (a.Cost, [1, 0; 0, 1]) 319s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 319s assert ({a.BucketSize}, {50}) 319s ***** test 319s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 319s y = ["a"; "a"; "b"; "b"]; 319s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 319s assert (class (a), "ClassificationPartitionedModel"); 319s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 319s assert (a.ModelParameters.NSMethod, "exhaustive") 319s assert (a.ModelParameters.Distance, "euclidean") 319s assert ({a.Trained{1}.BucketSize}, {50}) 319s ***** error fitcknn () 319s ***** error fitcknn (ones (4,1)) 319s ***** error 319s fitcknn (ones (4,2), ones (4, 1), "K") 319s ***** error 319s fitcknn (ones (4,2), ones (3, 1)) 319s ***** error 319s fitcknn (ones (4,2), ones (3, 1), "K", 2) 319s ***** error 319s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 319s ***** error 319s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 319s ***** error ... 319s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 319s 29 tests, 29 passed, 0 known failure, 0 skipped 319s [inst/hist3.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hist3.m 319s ***** demo 319s X = [ 319s 1 1 319s 1 1 319s 1 10 319s 1 10 319s 5 5 319s 5 5 319s 5 5 319s 5 5 319s 5 5 319s 7 3 319s 7 3 319s 7 3 319s 10 10 319s 10 10]; 319s hist3 (X) 319s ***** test 319s N_exp = [ 0 0 0 5 20 319s 0 0 10 15 0 319s 0 15 10 0 0 319s 20 5 0 0 0]; 319s 319s n = 100; 319s x = [1:n]'; 319s y = [n:-1:1]'; 319s D = [x y]; 319s N = hist3 (D, [4 5]); 319s assert (N, N_exp); 319s ***** test 319s N_exp = [0 0 0 0 1 319s 0 0 0 0 1 319s 0 0 0 0 1 319s 1 1 1 1 93]; 319s 319s n = 100; 319s x = [1:n]'; 319s y = [n:-1:1]'; 319s D = [x y]; 319s C{1} = [1 1.7 3 4]; 319s C{2} = [1:5]; 319s N = hist3 (D, C); 319s assert (N, N_exp); 319s ***** test 319s D = [1 1; 3 1; 3 3; 3 1]; 319s [c, nn] = hist3 (D, {0:4, 0:4}); 319s exp_c = zeros (5); 319s exp_c([7 9 19]) = [1 2 1]; 319s assert (c, exp_c); 319s assert (nn, {0:4, 0:4}); 319s ***** test 319s for i = 10 319s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 319s endfor 319s ***** test 319s edge_1 = linspace (0, 10, 10); 319s edge_2 = linspace (0, 50, 10); 319s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 319s exp_c = zeros (10, 10); 319s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 319s assert (c, exp_c); 319s 319s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 319s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 319s ***** shared X 319s X = [ 319s 5 2 319s 5 3 319s 1 4 319s 5 3 319s 4 4 319s 1 2 319s 2 3 319s 3 3 319s 5 4 319s 5 3]; 319s ***** test 319s N = zeros (10); 319s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 319s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 319s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 319s ***** test 319s N = zeros (5, 7); 319s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 319s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 319s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 319s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 319s ***** test 319s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 319s C = {(2:5), (2.5:1:4.5)}; 319s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 319s ***** test 319s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 319s C = {(1.2:3.2), (0:5)}; 319s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 319s assert (nthargout ([1 2], @hist3, X, C), {N C}) 319s ***** test 319s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 319s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 319s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 319s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 319s assert (C, C_exp, eps*10^2) 319s ***** test 319s Xv = repmat ([1:10]', [1 2]); 319s 319s ## Test Centers 319s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 319s 319s N_exp = eye (6); 319s N_exp([1 end]) = 3; 319s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 319s 319s N_exp = zeros (8, 6); 319s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 319s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 319s 319s ## Test Edges 319s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 319s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 319s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 319s 319s N_exp = zeros (14); 319s N_exp(3:12, 3:12) = eye (10); 319s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 319s 319s ## Test for Nbins 319s assert (hist3 (Xv), eye (10)) 319s assert (hist3 (Xv, [10 10]), eye (10)) 319s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 319s assert (hist3 (Xv, [5 5]), eye (5) * 2) 319s 319s N_exp = zeros (7, 5); 319s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 319s assert (hist3 (Xv, [7 5]), N_exp) 319s ***** test # bug #51059 319s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 319s [c, nn] = hist3 (D, {0:4, 0:4}); 319s exp_c = zeros (5); 319s exp_c([7 9 19]) = [1 2 1]; 319s assert (c, exp_c) 319s assert (nn, {0:4, 0:4}) 319s ***** test 319s [c, nn] = hist3 ([1 8]); 319s exp_c = zeros (10, 10); 319s exp_c(6, 6) = 1; 319s exp_nn = {-4:5, 3:12}; 319s assert (c, exp_c) 319s assert (nn, exp_nn, eps) 319s 319s [c, nn] = hist3 ([1 8], [10 11]); 319s exp_c = zeros (10, 11); 319s exp_c(6, 6) = 1; 319s exp_nn = {-4:5, 3:13}; 319s assert (c, exp_c) 319s assert (nn, exp_nn, eps) 319s ***** test 319s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 319s exp_c = zeros (10, 10); 319s exp_c(2, 1) = 1; 319s exp_c(8, 10) = 1; 319s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 319s assert (c, exp_c) 319s assert (nn, exp_nn, eps*100) 319s ***** test 319s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 319s exp_c = zeros (10, 10); 319s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 319s assert (c, exp_c) 319s assert (nn, exp_nn, eps*100) 319s ***** test 319s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 319s exp_c = zeros (10, 10); 319s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 319s assert (c, exp_c) 319s assert (nn, exp_nn, eps*100) 319s 16 tests, 16 passed, 0 known failure, 0 skipped 319s [inst/qrandn.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/qrandn.m 319s ***** demo 319s z = qrandn (-5, 5e6); 319s [c x] = hist (z,linspace(-1.5,1.5,200),1); 319s figure(1) 319s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 319s 319s z = qrandn (-0.14286, 5e6); 319s [c x] = hist (z,linspace(-2,2,200),1); 319s figure(2) 319s plot(x,c,"r."); axis tight; axis([-2,2]); 319s 319s z = qrandn (2.75, 5e6); 319s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 319s figure(3) 319s semilogy(x,c,"r."); axis tight; axis([-100,100]); 319s 319s # --------- 319s # Figures from the reference paper. 319s ***** error qrandn ([1 2], 1) 319s ***** error qrandn (4, 1) 319s ***** error qrandn (3, 1) 319s ***** error qrandn (2.5, 1, 2, 3) 319s ***** error qrandn (2.5) 319s ***** test 319s q = 1.5; 319s s = [2, 3]; 319s z = qrandn (q, s); 319s assert (isnumeric (z) && isequal (size (z), s)); 319s 6 tests, 6 passed, 0 known failure, 0 skipped 319s [inst/fullfact.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fullfact.m 319s ***** demo 319s ## Full factorial design with 3 binary variables 319s fullfact (3) 319s ***** demo 319s ## Full factorial design with 3 ordinal variables 319s fullfact ([2, 3, 4]) 319s ***** error fullfact (); 319s ***** error fullfact (2, 5); 319s ***** error fullfact (2.5); 319s ***** error fullfact (0); 319s ***** error fullfact (-3); 319s ***** error fullfact (3+2i); 319s ***** error fullfact (Inf); 319s ***** error fullfact (NaN); 319s ***** error fullfact ([1, 2, -3]); 319s ***** error fullfact ([0, 1, 2]); 319s ***** error fullfact ([1, 2, NaN]); 319s ***** error fullfact ([1, 2, Inf]); 319s ***** test 319s A = fullfact (2); 319s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 319s ***** test 319s A = fullfact ([1, 2]); 319s assert (A, [1, 1; 1, 2]); 319s ***** test 319s A = fullfact ([1, 2, 4]); 319s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 319s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 319s assert (A, A_out); 319s 15 tests, 15 passed, 0 known failure, 0 skipped 319s [inst/silhouette.m] 319s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/silhouette.m 319s ***** demo 319s load fisheriris; 319s X = meas(:,3:4); 319s cidcs = kmeans (X, 3, "Replicates", 5); 319s silhouette (X, cidcs); 319s y_labels(cidcs([1 51 101])) = unique (species); 319s set (gca, "yticklabel", y_labels); 319s title ("Fisher's iris data"); 319s ***** error silhouette (); 319s ***** error silhouette ([1 2; 1 1]); 320s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 320s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 320s 4 tests, 4 passed, 0 known failure, 0 skipped 320s [inst/logistic_regression.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/logistic_regression.m 320s ***** test 320s # Output compared to following MATLAB commands 320s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 320s # P = mnrval(B,X) 320s X = [1.489381332449196, 1.1534152241851305; ... 320s 1.8110085304863965, 0.9449666896938425; ... 320s -0.04453299665130296, 0.34278203449678646; ... 320s -0.36616019468850347, 1.130254275908322; ... 320s 0.15339143291005095, -0.7921044310668951; ... 320s -1.6031878794469698, -1.8343471035233376; ... 320s -0.14349521143198166, -0.6762996896828459; ... 320s -0.4403818557740143, -0.7921044310668951; ... 320s -0.7372685001160434, -0.027793137932169563; ... 320s -0.11875465773681024, 0.5512305689880763]; 320s Y = [1,1,1,1,1,0,0,0,0,0]'; 320s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 320s ***** test 320s # Output compared to following MATLAB commands 320s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 320s load carbig 320s X = [Acceleration Displacement Horsepower Weight]; 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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, ... 320s 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]'; 320s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 320s assert (DEV, 433.197174495549, 1e-05); 320s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 320s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 320s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 320s assert (SLOPE(1), 0.104762463756714, 1e-05); 320s assert (SLOPE(2), 0.0103357623191891, 1e-05); 320s assert (SLOPE(3), 0.0645199313242276, 1e-05); 320s assert (SLOPE(4), 0.00166377028388103, 1e-05); 320s 2 tests, 2 passed, 0 known failure, 0 skipped 320s [inst/pcacov.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/pcacov.m 320s ***** demo 320s x = [ 7 26 6 60; 320s 1 29 15 52; 320s 11 56 8 20; 320s 11 31 8 47; 320s 7 52 6 33; 320s 11 55 9 22; 320s 3 71 17 6; 320s 1 31 22 44; 320s 2 54 18 22; 320s 21 47 4 26; 320s 1 40 23 34; 320s 11 66 9 12; 320s 10 68 8 12 320s ]; 320s Kxx = cov (x); 320s [coeff, latent, explained] = pcacov (Kxx) 320s ***** test 320s load hald 320s Kxx = cov (ingredients); 320s [coeff,latent,explained] = pcacov(Kxx); 320s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 320s -0.6785, -0.0200, -0.5440, 0.4933; ... 320s 0.0290, 0.7553, 0.4036, 0.5156; ... 320s 0.7309, -0.1085, -0.4684, 0.4844]; 320s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 320s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 320s assert (coeff, c_out, 1e-4); 320s assert (latent, l_out, 1e-4); 320s assert (explained, e_out, 1e-4); 320s ***** error pcacov (ones (2,3)) 320s ***** error pcacov (ones (3,3,3)) 320s 3 tests, 3 passed, 0 known failure, 0 skipped 320s [inst/correlation_test.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/correlation_test.m 320s ***** error correlation_test (); 320s ***** error correlation_test (1); 320s ***** error ... 320s correlation_test ([1 2 NaN]', [2 3 4]'); 320s ***** error ... 320s correlation_test ([1 2 Inf]', [2 3 4]'); 320s ***** error ... 320s correlation_test ([1 2 3+i]', [2 3 4]'); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 NaN]'); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 Inf]'); 320s ***** error ... 320s correlation_test ([1 2 3]', [3 4 3+i]'); 320s ***** error ... 320s correlation_test ([1 2 3]', [3 4 4 5]'); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 320s ***** error ... 320s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 320s ***** test 320s x = [6 7 7 9 10 12 13 14 15 17]; 320s y = [19 22 27 25 30 28 30 29 25 32]; 320s [h, pval, stats] = correlation_test (x, y); 320s assert (stats.corrcoef, corr (x', y'), 1e-14); 320s assert (pval, 0.0223, 1e-4); 320s ***** test 320s x = [6 7 7 9 10 12 13 14 15 17]'; 320s y = [19 22 27 25 30 28 30 29 25 32]'; 320s [h, pval, stats] = correlation_test (x, y); 320s assert (stats.corrcoef, corr (x, y), 1e-14); 320s assert (pval, 0.0223, 1e-4); 320s 20 tests, 20 passed, 0 known failure, 0 skipped 320s [inst/cholcov.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cholcov.m 320s ***** demo 320s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 320s T = cholcov (C1) 320s C2 = T'*T 320s ***** test 320s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 320s T = cholcov (C1); 320s assert (C1, T'*T, 1e-15 * ones (size (C1))); 320s 1 test, 1 passed, 0 known failure, 0 skipped 320s [inst/wblplot.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/wblplot.m 320s ***** demo 320s x = [16 34 53 75 93 120]; 320s wblplot (x); 320s ***** demo 320s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 320s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 320s [h, p] = wblplot (x, c); 320s p 320s ***** demo 320s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 320s [h, p] = wblplot (x, [], [], 0.05); 320s p 320s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 320s ***** demo 320s x = [46 64 83 105 123 150 150]; 320s c = [0 0 0 0 0 0 1]; 320s f = [1 1 1 1 1 1 4]; 320s wblplot (x, c, f, 0.05); 320s ***** demo 320s x = [46 64 83 105 123 150 150]; 320s c = [0 0 0 0 0 0 1]; 320s f = [1 1 1 1 1 1 4]; 320s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 320s wblplot (x - 30.92, c, f, 0.05); 320s ***** test 320s hf = figure ("visible", "off"); 320s unwind_protect 320s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 320s [h, p] = wblplot (x, [], [], 0.05); 320s assert (numel (h), 4) 320s assert (p(1), 146.2545, 1E-4) 320s assert (p(2), 1.1973, 1E-4) 320s assert (p(3), 0.9999, 5E-5) 320s unwind_protect_cleanup 320s close (hf); 320s end_unwind_protect 320s 1 test, 1 passed, 0 known failure, 0 skipped 320s [inst/cmdscale.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cmdscale.m 320s ***** shared m, n, X, D 320s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 320s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 320s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 320s 2 tests, 2 passed, 0 known failure, 0 skipped 320s [inst/regression_ftest.m] 320s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/regression_ftest.m 320s ***** error regression_ftest (); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 321s ***** error ... 321s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 321s ***** error ... 321s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 321s 18 tests, 18 passed, 0 known failure, 0 skipped 321s [inst/logit.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/logit.m 321s ***** test 321s p = [0.01:0.01:0.99]; 321s assert (logit (p), log (p ./ (1-p)), 25*eps); 321s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 321s ***** error logit () 321s ***** error logit (1, 2) 321s 4 tests, 4 passed, 0 known failure, 0 skipped 321s [inst/nanmax.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/nanmax.m 321s ***** demo 321s ## Find the column maximum values and their indices 321s ## for matrix data with missing values. 321s 321s x = magic (3); 321s x([1, 6:9]) = NaN 321s [y, ind] = nanmax (x) 321s ***** demo 321s ## Find the maximum of all the values in an array, ignoring missing values. 321s ## Create a 2-by-5-by-3 array x with some missing values. 321s 321s x = reshape (1:30, [2, 5, 3]); 321s x([10:12, 25]) = NaN 321s 321s ## Find the maximum of the elements of x. 321s 321s y = nanmax (x, [], 'all') 321s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 321s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 321s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 321s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 321s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 321s ***** shared x, y 321s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 321s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 321s y = x; 321s y(2,3,1) = 0.51; 321s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 321s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 321s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 321s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 321s ***** assert (nanmax (x, [], 'all'), 6.77) 321s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 321s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 321s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 321s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 321s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 321s ***** test 321s xx = repmat ([1:20;6:25], [5 2 6 3]); 321s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 321s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 321s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 321s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 321s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 321s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 321s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 321s ***** assert (nanmax (magic (3), [], 3), magic (3)) 321s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 321s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 321s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 321s ***** error ... 321s nanmax (y, [], [1, 1, 2]) 321s ***** error ... 321s [v, idx] = nanmax(x, y, [1 2]) 321s 24 tests, 24 passed, 0 known failure, 0 skipped 321s [inst/probit.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/probit.m 321s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 321s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 321s ***** error probit () 321s ***** error probit (1, 2) 321s 4 tests, 4 passed, 0 known failure, 0 skipped 321s [inst/bartlett_test.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/bartlett_test.m 321s ***** error bartlett_test () 321s ***** error ... 321s bartlett_test (1, 2, 3, 4); 321s ***** error bartlett_test (randn (50, 2), 0); 321s ***** error ... 321s bartlett_test (randn (50, 2), [1, 2, 3]); 321s ***** error ... 321s bartlett_test (randn (50, 1), ones (55, 1)); 321s ***** error ... 321s bartlett_test (randn (50, 1), ones (50, 2)); 321s ***** error ... 321s bartlett_test (randn (50, 2), [], 1.2); 321s ***** error ... 321s bartlett_test (randn (50, 2), [], "alpha"); 321s ***** error ... 321s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 321s ***** error ... 321s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 321s ***** warning ... 321s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 321s ***** test 321s load examgrades 321s [h, pval, chisq, df] = bartlett_test (grades); 321s assert (h, 1); 321s assert (pval, 7.908647337018238e-08, 1e-14); 321s assert (chisq, 38.73324, 1e-5); 321s assert (df, 4); 321s ***** test 321s load examgrades 321s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 321s assert (h, 1); 321s assert (pval, 0.01172, 1e-5); 321s assert (chisq, 8.89274, 1e-5); 321s assert (df, 2); 321s ***** test 321s load examgrades 321s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 321s assert (h, 0); 321s assert (pval, 0.88118, 1e-5); 321s assert (chisq, 0.02234, 1e-5); 321s assert (df, 1); 321s ***** test 321s load examgrades 321s grades = [grades; nan(10, 5)]; 321s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 321s assert (h, 0); 321s assert (pval, 0.88118, 1e-5); 321s assert (chisq, 0.02234, 1e-5); 321s assert (df, 1); 321s ***** test 321s load examgrades 321s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 321s assert (h, 0); 321s assert (pval, 0.01791, 1e-5); 321s assert (chisq, 5.60486, 1e-5); 321s assert (df, 1); 321s 16 tests, 16 passed, 0 known failure, 0 skipped 321s [inst/hmmestimate.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hmmestimate.m 321s ***** test 321s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 321s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 321s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 321s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 321s [transprobest, outprobest] = hmmestimate (sequence, states); 321s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 321s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 321s assert (transprobest, expectedtransprob, 0.001); 321s assert (outprobest, expectedoutprob, 0.001); 321s ***** test 321s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 321s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 321s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 321s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 321s "Two", "One", "One", "One", "One", "One", "One"}; 321s symbols = {"A", "B", "C"}; 321s statenames = {"One", "Two"}; 321s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 321s symbols, "statenames", statenames); 321s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 321s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 321s assert (transprobest, expectedtransprob, 0.001); 321s assert (outprobest, expectedoutprob, 0.001); 321s ***** test 321s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 321s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 321s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 321s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 321s pseudotransitions = [8, 2; 4, 6]; 321s pseudoemissions = [2, 4, 4; 7, 2, 1]; 321s [transprobest, outprobest] = hmmestimate (sequence, states, ... 321s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 321s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 321s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 321s 0.823529, 0.117647, 0.058824]; 321s assert (transprobest, expectedtransprob, 0.001); 321s assert (outprobest, expectedoutprob, 0.001); 321s 3 tests, 3 passed, 0 known failure, 0 skipped 321s [inst/regress.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/regress.m 321s ***** test 321s % Longley data from the NIST Statistical Reference Dataset 321s Z = [ 60323 83.0 234289 2356 1590 107608 1947 321s 61122 88.5 259426 2325 1456 108632 1948 321s 60171 88.2 258054 3682 1616 109773 1949 321s 61187 89.5 284599 3351 1650 110929 1950 321s 63221 96.2 328975 2099 3099 112075 1951 321s 63639 98.1 346999 1932 3594 113270 1952 321s 64989 99.0 365385 1870 3547 115094 1953 321s 63761 100.0 363112 3578 3350 116219 1954 321s 66019 101.2 397469 2904 3048 117388 1955 321s 67857 104.6 419180 2822 2857 118734 1956 321s 68169 108.4 442769 2936 2798 120445 1957 321s 66513 110.8 444546 4681 2637 121950 1958 321s 68655 112.6 482704 3813 2552 123366 1959 321s 69564 114.2 502601 3931 2514 125368 1960 321s 69331 115.7 518173 4806 2572 127852 1961 321s 70551 116.9 554894 4007 2827 130081 1962 ]; 321s % Results certified by NIST using 500 digit arithmetic 321s % b and standard error in b 321s V = [ -3482258.63459582 890420.383607373 321s 15.0618722713733 84.9149257747669 321s -0.358191792925910E-01 0.334910077722432E-01 321s -2.02022980381683 0.488399681651699 321s -1.03322686717359 0.214274163161675 321s -0.511041056535807E-01 0.226073200069370 321s 1829.15146461355 455.478499142212 ]; 321s Rsq = 0.995479004577296; 321s F = 330.285339234588; 321s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 321s alpha = 0.05; 321s [b, bint, r, rint, stats] = regress (y, X, alpha); 321s assert(b,V(:,1),4e-6); 321s assert(stats(1),Rsq,1e-12); 321s assert(stats(2),F,3e-8); 321s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 321s warning: matrix singular to machine precision, rcond = 3.50566e-20 321s warning: called from 321s regress at line 131 column 7 321s __test__ at line 33 column 28 321s test at line 682 column 11 321s /tmp/tmp.E7ZhlmvBNk at line 1702 column 31 321s 321s 1 test, 1 passed, 0 known failure, 0 skipped 321s [inst/hmmviterbi.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/hmmviterbi.m 321s ***** test 321s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 321s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 321s transprob = [0.8, 0.2; 0.4, 0.6]; 321s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 321s vpath = hmmviterbi (sequence, transprob, outprob); 321s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 321s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 321s assert (vpath, expected); 321s ***** test 321s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 321s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 321s transprob = [0.8, 0.2; 0.4, 0.6]; 321s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 321s symbols = {"A", "B", "C"}; 321s statenames = {"One", "Two"}; 321s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 321s "statenames", statenames); 321s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 321s "One", "One", "One", "One", "One", "One", "One", "Two", ... 321s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 321s assert (vpath, expected); 321s 2 tests, 2 passed, 0 known failure, 0 skipped 321s [inst/fitcsvm.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitcsvm.m 321s ***** demo 321s ## Use a subset of Fisher's iris data set 321s 321s load fisheriris 321s inds = ! strcmp (species, 'setosa'); 321s X = meas(inds, [3,4]); 321s Y = species(inds); 321s 321s ## Train a linear SVM classifier 321s SVMModel = fitcsvm (X, Y) 321s 321s ## Plot a scatter diagram of the data and circle the support vectors. 321s sv = SVMModel.SupportVectors; 321s figure 321s gscatter (X(:,1), X(:,2), Y) 321s hold on 321s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 321s legend ('versicolor', 'virginica', 'Support Vector') 321s hold off 321s ***** test 321s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 321s y = {"a"; "a"; "b"; "b"}; 321s a = fitcsvm (x, y); 321s assert (class (a), "ClassificationSVM"); 321s assert ({a.X, a.Y}, {x, y}) 321s assert (a.NumObservations, 4) 321s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 321s assert (a.ModelParameters.SVMtype, "c_svc") 321s assert (a.ClassNames, {"a"; "b"}) 321s ***** test 321s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 321s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 321s a = fitcsvm (x, y); 321s assert (class (a), "ClassificationSVM"); 321s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 321s assert (a.ModelParameters.BoxConstraint, 1) 321s assert (a.ModelParameters.KernelOffset, 0) 321s assert (a.ClassNames, [1; -1]) 321s ***** test 321s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 321s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 321s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 321s "KernelOffset", 2); 321s assert (class (a), "ClassificationSVM"); 321s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 321s assert (a.ModelParameters.BoxConstraint, 2) 321s assert (a.ModelParameters.KernelOffset, 2) 321s assert (isempty (a.Alpha), true) 321s assert (isempty (a.Beta), false) 321s ***** test 321s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 321s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 321s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 321s assert (class (a), "ClassificationSVM"); 321s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 321s assert (a.ModelParameters.PolynomialOrder, 3) 321s assert (isempty (a.Alpha), true) 321s assert (isempty (a.Beta), false) 321s ***** test 321s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 321s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 321s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 321s assert (class (a), "ClassificationSVM"); 321s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 321s assert (a.ModelParameters.PolynomialOrder, 3) 321s assert (isempty (a.Alpha), false) 321s assert (isempty (a.Beta), true) 321s ***** test 321s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 321s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 321s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 321s assert (class (a), "ClassificationPartitionedModel"); 321s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 321s assert (a.ModelParameters.PolynomialOrder, 3) 321s assert (isempty (a.Trained{1}.Alpha), false) 321s assert (isempty (a.Trained{1}.Beta), true) 321s ***** error fitcsvm () 321s ***** error fitcsvm (ones (4,1)) 321s ***** error 321s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 321s ***** error 321s fitcsvm (ones (4,2), ones (3, 1)) 321s ***** error 321s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 321s ***** error 321s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 321s ***** error 321s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 321s ***** error ... 321s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 321s 14 tests, 14 passed, 0 known failure, 0 skipped 321s [inst/ztest.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ztest.m 321s ***** error ztest (); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 2, -0.5); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 321s ***** error ... 321s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 321s ***** test 321s load carsmall 321s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 321s assert (h, 0); 321s assert (pval, 1, 1e-14); 321s assert (ci, [22.094; 25.343], 1e-3); 321s ***** test 321s load carsmall 321s [h, pval, ci] = ztest (MPG, 26, 8); 321s assert (h, 1); 321s assert (pval, 0.00568359158544743, 1e-14); 321s assert (ci, [22.101; 25.335], 1e-3); 321s ***** test 321s load carsmall 321s [h, pval, ci] = ztest (MPG, 26, 4); 321s assert (h, 1); 321s assert (pval, 3.184168011941316e-08, 1e-14); 321s assert (ci, [22.909; 24.527], 1e-3); 321s 13 tests, 13 passed, 0 known failure, 0 skipped 321s [inst/chi2test.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/chi2test.m 321s ***** error chi2test (); 321s ***** error chi2test ([1, 2, 3, 4, 5]); 321s ***** error chi2test ([1, 2; 2, 1+3i]); 321s ***** error chi2test ([NaN, 6; 34, 12]); 321s ***** error ... 321s p = chi2test (ones (3, 3), "mutual", []); 321s ***** error ... 321s p = chi2test (ones (3, 3, 3), "testtype", 2); 321s ***** error ... 321s p = chi2test (ones (3, 3, 3), "mutual"); 321s ***** error ... 321s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 321s ***** error ... 321s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 321s ***** error ... 321s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 321s ***** warning p = chi2test (ones (2)); 321s ***** warning p = chi2test (ones (3, 2)); 321s ***** warning p = chi2test (0.4 * ones (3)); 321s ***** test 321s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 321s p = chi2test (x); 321s assert (p, 0.017787, 1e-6); 321s ***** test 321s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 321s [p, chisq] = chi2test (x); 321s assert (chisq, 11.9421, 1e-4); 321s ***** test 321s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 321s [p, chisq, df] = chi2test (x); 321s assert (df, 4); 321s ***** test 321s ***** shared x 321s x(:,:,1) = [59, 32; 9,16]; 321s x(:,:,2) = [55, 24;12,33]; 321s x(:,:,3) = [107,80;17,56];%! 321s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 321s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 321s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 321s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 321s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 321s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 321s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 321s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 321s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 321s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 321s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 321s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 321s ***** test 321s [pval, chisq, df, E] = chi2test (x); 321s assert (chisq, 64.0982, 1e-4); 321s assert (df, 7); 321s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 321s ***** test 321s [pval, chisq, df, E] = chi2test (x, "joint", 2); 321s assert (chisq, 56.0943, 1e-4); 321s assert (df, 5); 321s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 321s ***** test 321s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 321s assert (chisq, 146.6058, 1e-4); 321s assert (df, 9); 321s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 321s ***** test 321s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 321s assert (chisq, 52.2509, 1e-4); 321s assert (df, 3); 321s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 321s ***** test 321s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 321s assert (chisq, 1.6034, 1e-4); 321s assert (df, 2); 321s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 321s 34 tests, 34 passed, 0 known failure, 0 skipped 321s [inst/histfit.m] 321s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/histfit.m 321s ***** demo 321s histfit (randn (100, 1)) 321s ***** demo 321s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 321s ***** demo 321s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 321s ***** test 321s hf = figure ("visible", "off"); 321s unwind_protect 321s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 321s histfit (x); 321s unwind_protect_cleanup 321s close (hf); 321s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 322s histfit (x); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 322s histfit (x, 3); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s histfit (randn (100, 1)); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s ax = gca (); 322s histfit (ax, randn (100, 1)); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s ax = gca (); 322s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s ax = gca (); 322s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s ax = axes ("parent", hf); 322s fail ("histfit (ax)", "histfit: too few input arguments."); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** error ... 322s histfit ('wer') 322s ***** error histfit ([NaN, NaN, NaN]); 322s ***** error ... 322s histfit (randn (100, 1), 5.6) 322s ***** error ... 322s histfit (randn (100, 1), 8, 5) 322s ***** error ... 322s histfit (randn (100, 1), 8, {'normal'}) 322s ***** error ... 322s histfit (randn (100, 1), 8, 'Kernel') 322s ***** error ... 322s histfit (randn (100, 1), 8, 'ASDASDASD') 322s 17 tests, 17 passed, 0 known failure, 0 skipped 322s [inst/normplot.m] 322s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/normplot.m 322s ***** demo 322s h = normplot([1:20]); 322s ***** demo 322s h = normplot([1:20;5:2:44]'); 322s ***** demo 322s ax = newplot(); 322s h = normplot(ax, [1:20]); 322s ax = gca; 322s h = normplot(ax, [-10:10]); 322s set (ax, "xlim", [-11, 21]); 322s ***** error normplot (); 322s ***** error normplot (23); 322s ***** error normplot (23, [1:20]); 322s ***** error normplot (ones(3,4,5)); 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s ax = newplot (hf); 322s h = normplot (ax, [1:20]); 322s ax = gca; 322s h = normplot(ax, [-10:10]); 322s set (ax, "xlim", [-11, 21]); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s ***** test 322s hf = figure ("visible", "off"); 322s unwind_protect 322s h = normplot([1:20;5:2:44]'); 322s unwind_protect_cleanup 322s close (hf); 322s end_unwind_protect 322s 6 tests, 6 passed, 0 known failure, 0 skipped 322s [inst/normalise_distribution.m] 322s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/normalise_distribution.m 322s ***** test 322s v = normalise_distribution ([1 2 3], [], 1); 322s assert (v, [0 0 0]) 322s ***** test 322s v = normalise_distribution ([1 2 3], [], 2); 322s assert (v, norminv ([1 3 5] / 6), 3 * eps) 322s ***** test 322s v = normalise_distribution ([1 2 3]', [], 2); 322s assert (v, [0 0 0]') 323s ***** test 323s v = normalise_distribution ([1 2 3]', [], 1); 323s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 323s ***** test 323s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 323s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 323s ***** test 323s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 323s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 323s ***** test 323s A = randn ( 10 ); 323s N = normalise_distribution (A, @normcdf); 323s assert (A, N, 10000 * eps) 323s ***** test 323s A = exprnd (1, 100); 323s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 323s assert (mean (vec (N)), 0, 0.1) 323s assert (std (vec (N)), 1, 0.1) 323s ***** test 323s A = rand (1000,1); 323s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 323s assert (mean (vec (N)), 0, 0.2) 323s assert (std (vec (N)), 1, 0.1) 323s ***** test 323s A = [rand(1000,1), randn(1000, 1)]; 323s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 323s assert (mean (N), [0, 0], 0.2) 323s assert (std (N), [1, 1], 0.1) 323s ***** test 323s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 323s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 323s assert (mean (N, 2), [0, 0, 0]', 0.2); 323s assert (std (N, [], 2), [1, 1, 1]', 0.1); 323s ***** xtest 323s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 323s N = normalise_distribution (A); 323s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 323s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 323s ***** test 323s ***** error normalise_distribution (zeros (3, 4), ... 323s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 323s 14 tests, 14 passed, 0 known failure, 0 skipped 323s [inst/pca.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/pca.m 323s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 323s ***** test 323s x=[7 4 3 323s 4 1 8 323s 6 3 5 323s 8 6 1 323s 8 5 7 323s 7 2 9 323s 5 3 3 323s 9 5 8 323s 7 4 5 323s 8 2 2]; 323s R = corrcoef (x); 323s [V, lambda] = eig (R); 323s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 323s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 323s ***** 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 323s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 323s F = zscore(x)*B; 323s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 323s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 323s ***** test 323s x=[1,2,3;2,1,3]'; 323s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 323s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 323s m(:,1) = m(:,1)*sign(COEFF(1,1)); 323s m(:,2) = m(:,2)*sign(COEFF(1,2)); 323s ***** assert(COEFF,m(1:2,:),10*eps); 323s ***** assert(SCORE,-m,10*eps); 323s ***** assert(latent,[1.5;.5],10*eps); 323s ***** assert(tsquare,[4;4;4]/3,10*eps); 323s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 323s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 323s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 323s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 323s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 323s !!!!! known failure 323s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 323s 323s Location | Observed | Expected | Reason 323s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 323s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 323s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 323s ***** test 323s x=x'; 323s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 323s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 323s m(:,1) = m(:,1)*sign(COEFF(1,1)); 323s m(:,2) = m(:,2)*sign(COEFF(1,2)); 323s m(:,3) = m(:,3)*sign(COEFF(3,3)); 323s ***** assert(COEFF,m,10*eps); 323s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 323s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 323s ***** assert(latent,[1;0;0],10*eps); 323s ***** assert(tsquare,[0.5;0.5],10*eps) 323s ***** test 323s [COEFF,SCORE,latent,tsquare] = pca(x); 323s ***** assert(COEFF,m(:, 1),10*eps); 323s ***** assert(SCORE,-m(1:2,1),10*eps); 323s ***** assert(latent,[1],10*eps); 323s ***** assert(tsquare,[0.5;0.5],10*eps) 323s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 323s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 323s ***** error pca([1 2; 3 4], "NumComponents", -4) 323s ***** error pca([1 2; 3 4], "Rows", 1) 323s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 323s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 323s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 323s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 323s ***** error pca([1 2; 3 4], "XXX", 1) 323s 32 tests, 31 passed, 1 known failure, 0 skipped 323s [inst/mnrfit.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/mnrfit.m 323s ***** error mnrfit (ones (50,1)) 323s ***** error ... 323s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 323s ***** error ... 323s mnrfit (ones (50, 4, 2), ones (50, 1)) 323s ***** error ... 323s mnrfit (ones (50, 4), ones (50, 1, 3)) 323s ***** error ... 323s mnrfit (ones (50, 4), ones (45,1)) 323s ***** error ... 323s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 323s ***** error ... 323s mnrfit (ones (5, 4), ones (5, 1), "model") 323s ***** error ... 323s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 323s ***** error ... 323s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 323s ***** error ... 323s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 323s ***** error ... 323s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 323s ***** error ... 323s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 323s ***** error ... 323s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 323s 13 tests, 13 passed, 0 known failure, 0 skipped 323s [inst/dcov.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dcov.m 323s ***** demo 323s base=@(x) (x- min(x))./(max(x)-min(x)); 323s N = 5e2; 323s x = randn (N,1); x = base (x); 323s z = randn (N,1); z = base (z); 323s # Linear relations 323s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 323s ly = x .* cy; 323s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 323s # Correlated Gaussian 323s cz = 1 - abs (cy); 323s gy = base ( ly + cz.*z); 323s # Shapes 323s sx = repmat (x,1,7); 323s sy = zeros (size (ly)); 323s v = 2 * rand (size(x,1),2) - 1; 323s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 323s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 323s tmp = R(35) * v.'; 323s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 323s tmp = R(45) * v.'; 323s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 323s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 323s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 323s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 323s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 323s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 323s sy = base (sy); 323s sx = base (sx); 323s # scaled shape 323s sc = 1/3; 323s ssy = (sy-0.5) * sc + 0.5; 323s n = size (ly,2); 323s ym = 1.2; 323s xm = 0.5; 323s fmt={'horizontalalignment','center'}; 323s ff = "% .2f"; 323s figure (1) 323s for i=1:n 323s subplot(4,n,i); 323s plot (x, gy(:,i), '.b'); 323s axis tight 323s axis off 323s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 323s 323s subplot(4,n,i+n); 323s plot (x, ly(:,i), '.b'); 323s axis tight 323s axis off 323s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 323s 323s subplot(4,n,i+2*n); 323s plot (sx(:,i), sy(:,i), '.b'); 323s axis tight 323s axis off 323s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 323s v = axis (); 323s 323s subplot(4,n,i+3*n); 323s plot (sx(:,i), ssy(:,i), '.b'); 323s axis (v) 323s axis off 323s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 323s endfor 323s ***** error dcov (randn (30, 5), randn (25,5)) 323s 1 test, 1 passed, 0 known failure, 0 skipped 323s [inst/pdist2.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/pdist2.m 323s ***** shared x, y, xx 323s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 323s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 323s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 323s ***** test 323s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 323s assert (pdist2 (x, y), d); 323s ***** test 323s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 323s 3.4641, 2.2361, 3.3166, 5.4772]; 323s i = [3, 1, 1, 1; 2, 3, 3, 2]; 323s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 323s 3.4641, 2.2361, 3.3166, 5.4772]; 323s i = [1, 2, 2, 3;2, 1, 1, 2]; 323s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s yy = [1 2 3;5 6 7;9 5 1]; 323s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 323s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 323s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 323s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s yy = [1 2 3;5 6 7;9 5 1]; 323s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 323s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 323s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s yy = [1 2 3;5 6 7;9 5 1]; 323s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 323s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 323s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 323s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 323s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 323s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 323s ***** test 323s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 323s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 323s i = [2, 2, 2; 3, 4, 4]; 323s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 323s i = [1, 1, 3; 4, 3, 1]; 323s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 323s assert ({D, I}, {d, i}, 1e-4); 323s ***** test 323s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 323s assert (pdist2 (x, y, "cityblock"), d); 323s ***** test 323s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 323s assert (pdist2 (x, y, "chebychev"), d); 323s ***** test 323s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 323s assert (pdist2 (x, y, "cosine"), d, 1e-4); 323s ***** test 323s yy = [1 2 3;5 6 7;9 5 1]; 323s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 323s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 323s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 323s assert ({D, I}, {d, i}, eps); 323s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 323s assert ({D, I}, {d, i}, eps); 323s ***** test 323s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 323s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 323s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 323s assert ({D, I}, {d, i}, eps); 323s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 323s assert ({D, I}, {d, i}, eps); 323s ***** test 323s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 323s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 323s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 323s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 323s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 323s assert ({D, I}, {d, i}); 323s ***** warning ... 323s pdist2 (xx, xx, "mahalanobis"); 323s ***** error pdist2 (1) 323s ***** error ... 323s pdist2 (ones (4, 5), ones (4)) 323s ***** error ... 323s pdist2 (ones (4, 2, 3), ones (3, 2)) 323s ***** error ... 323s pdist2 (ones (3), ones (3), "euclidean", "Largest") 323s ***** error ... 323s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 323s ***** error ... 323s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 323s ***** error ... 323s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 323s ***** error ... 323s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 323s ***** error ... 323s pdist2 (ones (3), ones (3), "seuclidean", 3) 323s ***** error ... 323s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 323s ***** error ... 323s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 323s ***** error ... 323s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 323s ***** error ... 323s pdist2 (ones (3), eye (3), "minkowski", 0) 323s ***** error ... 323s pdist2 (ones (3), eye (3), "minkowski", -5) 323s ***** error ... 323s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 323s ***** error ... 323s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 323s ***** error ... 323s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 323s 33 tests, 33 passed, 0 known failure, 0 skipped 323s [inst/loadmodel.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/loadmodel.m 323s ***** error loadmodel () 323s ***** error ... 323s loadmodel ("fisheriris.mat") 323s ***** error ... 323s loadmodel ("fail_loadmodel.mdl") 323s ***** error ... 323s loadmodel ("fail_load_model.mdl") 323s 4 tests, 4 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/tpdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tpdf.m 323s ***** demo 323s ## Plot various PDFs from the Student's T distribution 323s x = -5:0.01:5; 323s y1 = tpdf (x, 1); 323s y2 = tpdf (x, 2); 323s y3 = tpdf (x, 5); 323s y4 = tpdf (x, Inf); 323s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 323s grid on 323s xlim ([-5, 5]) 323s ylim ([0, 0.41]) 323s legend ({"df = 1", "df = 2", ... 323s "df = 5", 'df = \infty'}, "location", "northeast") 323s title ("Student's T PDF") 323s xlabel ("values in x") 323s ylabel ("density") 323s ***** test 323s x = rand (10,1); 323s y = 1./(pi * (1 + x.^2)); 323s assert (tpdf (x, 1), y, 5*eps); 323s ***** shared x, y 323s x = [-Inf 0 0.5 1 Inf]; 323s y = 1./(pi * (1 + x.^2)); 323s ***** assert (tpdf (x, ones (1,5)), y, eps) 323s ***** assert (tpdf (x, 1), y, eps) 323s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 323s ***** assert (tpdf (x, Inf), normpdf (x)) 323s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 323s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 323s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 323s ***** error tpdf () 323s ***** error tpdf (1) 323s ***** error ... 323s tpdf (ones (3), ones (2)) 323s ***** error ... 323s tpdf (ones (2), ones (3)) 323s ***** error tpdf (i, 2) 323s ***** error tpdf (2, i) 323s 14 tests, 14 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/ncx2pdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncx2pdf.m 323s ***** demo 323s ## Plot various PDFs from the noncentral chi-squared distribution 323s x = 0:0.1:10; 323s y1 = ncx2pdf (x, 2, 1); 323s y2 = ncx2pdf (x, 2, 2); 323s y3 = ncx2pdf (x, 2, 3); 323s y4 = ncx2pdf (x, 4, 1); 323s y5 = ncx2pdf (x, 4, 2); 323s y6 = ncx2pdf (x, 4, 3); 323s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 323s x, y4, "-m", x, y5, "-c", x, y6, "-y") 323s grid on 323s xlim ([0, 10]) 323s ylim ([0, 0.32]) 323s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 323s "df = 2, λ = 3", "df = 4, λ = 1", ... 323s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 323s title ("Noncentral chi-squared PDF") 323s xlabel ("values in x") 323s ylabel ("density") 323s ***** demo 323s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 323s ## chi-squared PDF with the same number of degrees of freedom (4). 323s 323s x = 0:0.1:10; 323s y1 = ncx2pdf (x, 4, 2); 323s y2 = chi2pdf (x, 4); 323s plot (x, y1, "-", x, y2, "-"); 323s grid on 323s xlim ([0, 10]) 323s ylim ([0, 0.32]) 323s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 323s title ("Noncentral chi-squared vs chi-squared PDFs") 323s xlabel ("values in x") 323s ylabel ("density") 323s ***** shared x1, df, d1 323s x1 = [-Inf, 2, NaN, 4, Inf]; 323s df = [2, 0, -1, 1, 4]; 323s d1 = [1, NaN, 3, -1, 2]; 323s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 323s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 323s 0.06160064323277038, 0], 1e-14); 323s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 323s 0.09631299762429098, 0], 1e-14); 323s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 323s 0.08430464047296625, 0], 1e-14); 323s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 323s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 323s NaN, 0.1076346446244688], 1e-14); 323s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 323s NaN, 0.1192317192431485], 1e-14); 323s ***** error ncx2pdf () 323s ***** error ncx2pdf (1) 323s ***** error ncx2pdf (1, 2) 323s ***** error ... 323s ncx2pdf (ones (3), ones (2), ones (2)) 323s ***** error ... 323s ncx2pdf (ones (2), ones (3), ones (2)) 323s ***** error ... 323s ncx2pdf (ones (2), ones (2), ones (3)) 323s ***** error ncx2pdf (i, 2, 2) 323s ***** error ncx2pdf (2, i, 2) 323s ***** error ncx2pdf (2, 2, i) 323s 16 tests, 16 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/invgpdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/invgpdf.m 323s ***** demo 323s ## Plot various PDFs from the inverse Gaussian distribution 323s x = 0:0.001:3; 323s y1 = invgpdf (x, 1, 0.2); 323s y2 = invgpdf (x, 1, 1); 323s y3 = invgpdf (x, 1, 3); 323s y4 = invgpdf (x, 3, 0.2); 323s y5 = invgpdf (x, 3, 1); 323s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 323s grid on 323s xlim ([0, 3]) 323s ylim ([0, 3]) 323s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 323s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 323s title ("Inverse Gaussian PDF") 323s xlabel ("values in x") 323s ylabel ("density") 323s ***** shared x, y 323s x = [-Inf, -1, 0, 1/2, 1, Inf]; 323s y = [0, 0, 0, 0.8788, 0.3989, 0]; 323s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 323s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 323s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 323s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 323s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 323s ***** error invgpdf () 323s ***** error invgpdf (1) 323s ***** error invgpdf (1, 2) 323s ***** error ... 323s invgpdf (1, ones (2), ones (3)) 323s ***** error ... 323s invgpdf (ones (2), 1, ones (3)) 323s ***** error ... 323s invgpdf (ones (2), ones (3), 1) 323s ***** error invgpdf (i, 2, 3) 323s ***** error invgpdf (1, i, 3) 323s ***** error invgpdf (1, 2, i) 323s 14 tests, 14 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/gumbelcdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gumbelcdf.m 323s ***** demo 323s ## Plot various CDFs from the Gumbel distribution 323s x = -5:0.01:20; 323s p1 = gumbelcdf (x, 0.5, 2); 323s p2 = gumbelcdf (x, 1.0, 2); 323s p3 = gumbelcdf (x, 1.5, 3); 323s p4 = gumbelcdf (x, 3.0, 4); 323s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 323s grid on 323s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 323s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 323s title ("Gumbel CDF") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** shared x, y 323s x = [-Inf, 1, 2, Inf]; 323s y = [0, 0.3679, 0.6922, 1]; 323s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 323s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 323s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 323s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 323s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 323s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 323s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 323s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 323s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 323s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 323s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 323s ***** error gumbelcdf () 323s ***** error gumbelcdf (1,2,3,4,5,6,7) 323s ***** error gumbelcdf (1, 2, 3, 4, "uper") 323s ***** error ... 323s gumbelcdf (ones (3), ones (2), ones (2)) 323s ***** error gumbelcdf (2, 3, 4, [1, 2]) 323s ***** error ... 323s [p, plo, pup] = gumbelcdf (1, 2, 3) 323s ***** error [p, plo, pup] = ... 323s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 323s ***** error [p, plo, pup] = ... 323s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 323s ***** error [p, plo, pup] = ... 323s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 323s ***** error gumbelcdf (i, 2, 2) 323s ***** error gumbelcdf (2, i, 2) 323s ***** error gumbelcdf (2, 2, i) 323s ***** error ... 323s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 323s 24 tests, 24 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/invgrnd.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/invgrnd.m 323s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 323s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 323s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 323s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 323s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 323s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 323s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 323s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 323s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 323s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 323s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 323s ***** test 323s r = invgrnd (1, [1, 0, -1]); 323s assert (r([2:3]), [NaN, NaN]) 323s ***** assert (class (invgrnd (1, 0)), "double") 323s ***** assert (class (invgrnd (1, single (0))), "single") 323s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 323s ***** assert (class (invgrnd (1, single (1))), "single") 323s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 323s ***** assert (class (invgrnd (single (1), 1)), "single") 323s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 323s ***** error invgrnd () 323s ***** error invgrnd (1) 323s ***** error ... 323s invgrnd (ones (3), ones (2)) 323s ***** error ... 323s invgrnd (ones (2), ones (3)) 323s ***** error invgrnd (i, 2, 3) 323s ***** error invgrnd (1, i, 3) 323s ***** error ... 323s invgrnd (1, 2, -1) 323s ***** error ... 323s invgrnd (1, 2, 1.2) 323s ***** error ... 323s invgrnd (1, 2, ones (2)) 323s ***** error ... 323s invgrnd (1, 2, [2 -1 2]) 323s ***** error ... 323s invgrnd (1, 2, [2 0 2.5]) 323s ***** error ... 323s invgrnd (1, 2, 2, -1, 5) 323s ***** error ... 323s invgrnd (1, 2, 2, 1.5, 5) 323s ***** error ... 323s invgrnd (2, ones (2), 3) 323s ***** error ... 323s invgrnd (2, ones (2), [3, 2]) 323s ***** error ... 323s invgrnd (2, ones (2), 3, 2) 323s 35 tests, 35 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/cauchycdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/cauchycdf.m 323s ***** demo 323s ## Plot various CDFs from the Cauchy distribution 323s x = -5:0.01:5; 323s p1 = cauchycdf (x, 0, 0.5); 323s p2 = cauchycdf (x, 0, 1); 323s p3 = cauchycdf (x, 0, 2); 323s p4 = cauchycdf (x, -2, 1); 323s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 323s grid on 323s xlim ([-5, 5]) 323s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 323s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 323s title ("Cauchy CDF") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** shared x, y 323s x = [-1 0 0.5 1 2]; 323s y = 1/pi * atan ((x-1) / 2) + 1/2; 323s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 323s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 323s ***** assert (cauchycdf (x, ones (1,5), 2), y) 323s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 323s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 323s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 323s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 323s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 323s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 323s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 323s ***** error cauchycdf () 323s ***** error cauchycdf (1) 323s ***** error ... 323s cauchycdf (1, 2) 323s ***** error ... 323s cauchycdf (1, 2, 3, 4, 5) 323s ***** error cauchycdf (1, 2, 3, "tail") 323s ***** error cauchycdf (1, 2, 3, 4) 323s ***** error ... 323s cauchycdf (ones (3), ones (2), ones (2)) 323s ***** error ... 323s cauchycdf (ones (2), ones (3), ones (2)) 323s ***** error ... 323s cauchycdf (ones (2), ones (2), ones (3)) 323s ***** error cauchycdf (i, 2, 2) 323s ***** error cauchycdf (2, i, 2) 323s ***** error cauchycdf (2, 2, i) 323s 22 tests, 22 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/fcdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/fcdf.m 323s ***** demo 323s ## Plot various CDFs from the F distribution 323s x = 0.01:0.01:4; 323s p1 = fcdf (x, 1, 2); 323s p2 = fcdf (x, 2, 1); 323s p3 = fcdf (x, 5, 2); 323s p4 = fcdf (x, 10, 1); 323s p5 = fcdf (x, 100, 100); 323s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 323s grid on 323s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 323s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 323s "df1 = 100, df2 = 100"}, "location", "southeast") 323s title ("F CDF") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** shared x, y 323s x = [-1, 0, 0.5, 1, 2, Inf]; 323s y = [0, 0, 1/3, 1/2, 2/3, 1]; 323s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 323s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 323s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 323s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 323s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 323s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 323s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 323s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 323s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 323s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 323s ***** error fcdf () 323s ***** error fcdf (1) 323s ***** error fcdf (1, 2) 323s ***** error fcdf (1, 2, 3, 4) 323s ***** error fcdf (1, 2, 3, "tail") 323s ***** error ... 323s fcdf (ones (3), ones (2), ones (2)) 323s ***** error ... 323s fcdf (ones (2), ones (3), ones (2)) 323s ***** error ... 323s fcdf (ones (2), ones (2), ones (3)) 323s ***** error fcdf (i, 2, 2) 323s ***** error fcdf (2, i, 2) 323s ***** error fcdf (2, 2, i) 323s 21 tests, 21 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/tricdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tricdf.m 323s ***** demo 323s ## Plot various CDFs from the triangular distribution 323s x = 0.001:0.001:10; 323s p1 = tricdf (x, 3, 4, 6); 323s p2 = tricdf (x, 1, 2, 5); 323s p3 = tricdf (x, 2, 3, 9); 323s p4 = tricdf (x, 2, 5, 9); 323s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 323s grid on 323s xlim ([0, 10]) 323s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 323s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 323s "location", "southeast") 323s title ("Triangular CDF") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** shared x, y 323s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 323s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 323s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 323s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 323s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 323s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 323s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 323s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 323s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 323s [y(1:2), NaN, y(4:7)], eps) 323s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 323s [y(1:2), NaN, y(4:7)], eps) 323s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 323s [y(1:2), NaN, y(4:7)], eps) 323s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 323s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 323s single ([y, NaN]), eps("single")) 323s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 323s single ([y, NaN]), eps("single")) 323s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 323s single ([y, NaN]), eps("single")) 323s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 323s single ([y, NaN]), eps("single")) 323s ***** error tricdf () 323s ***** error tricdf (1) 323s ***** error tricdf (1, 2) 323s ***** error tricdf (1, 2, 3) 323s ***** error ... 323s tricdf (1, 2, 3, 4, 5, 6) 323s ***** error tricdf (1, 2, 3, 4, "tail") 323s ***** error tricdf (1, 2, 3, 4, 5) 323s ***** error ... 323s tricdf (ones (3), ones (2), ones(2), ones(2)) 323s ***** error ... 323s tricdf (ones (2), ones (3), ones(2), ones(2)) 323s ***** error ... 323s tricdf (ones (2), ones (2), ones(3), ones(2)) 323s ***** error ... 323s tricdf (ones (2), ones (2), ones(2), ones(3)) 323s ***** error tricdf (i, 2, 3, 4) 323s ***** error tricdf (1, i, 3, 4) 323s ***** error tricdf (1, 2, i, 4) 323s ***** error tricdf (1, 2, 3, i) 323s 29 tests, 29 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/cauchyrnd.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/cauchyrnd.m 323s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 323s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 323s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 323s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 323s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 323s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 323s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 323s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 323s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 323s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 323s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 323s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 323s ***** assert (class (cauchyrnd (1, 1)), "double") 323s ***** assert (class (cauchyrnd (1, single (1))), "single") 323s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 323s ***** assert (class (cauchyrnd (single (1), 1)), "single") 323s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 323s ***** error cauchyrnd () 323s ***** error cauchyrnd (1) 323s ***** error ... 323s cauchyrnd (ones (3), ones (2)) 323s ***** error ... 323s cauchyrnd (ones (2), ones (3)) 323s ***** error cauchyrnd (i, 2, 3) 323s ***** error cauchyrnd (1, i, 3) 323s ***** error ... 323s cauchyrnd (1, 2, -1) 323s ***** error ... 323s cauchyrnd (1, 2, 1.2) 323s ***** error ... 323s cauchyrnd (1, 2, ones (2)) 323s ***** error ... 323s cauchyrnd (1, 2, [2 -1 2]) 323s ***** error ... 323s cauchyrnd (1, 2, [2 0 2.5]) 323s ***** error ... 323s cauchyrnd (1, 2, 2, -1, 5) 323s ***** error ... 323s cauchyrnd (1, 2, 2, 1.5, 5) 323s ***** error ... 323s cauchyrnd (2, ones (2), 3) 323s ***** error ... 323s cauchyrnd (2, ones (2), [3, 2]) 323s ***** error ... 323s cauchyrnd (2, ones (2), 3, 2) 323s 33 tests, 33 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/poissrnd.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/poissrnd.m 323s ***** assert (size (poissrnd (2)), [1, 1]) 323s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 323s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 323s ***** assert (size (poissrnd (1, 3)), [3, 3]) 323s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 323s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 323s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 323s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 323s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 323s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 323s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 323s ***** assert (poissrnd (0, 1, 1), 0) 323s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 323s ***** assert (class (poissrnd (2)), "double") 323s ***** assert (class (poissrnd (single (2))), "single") 323s ***** assert (class (poissrnd (single ([2 2]))), "single") 323s ***** error poissrnd () 323s ***** error poissrnd (i) 323s ***** error ... 323s poissrnd (1, -1) 323s ***** error ... 323s poissrnd (1, 1.2) 323s ***** error ... 323s poissrnd (1, ones (2)) 323s ***** error ... 323s poissrnd (1, [2 -1 2]) 323s ***** error ... 323s poissrnd (1, [2 0 2.5]) 323s ***** error ... 323s poissrnd (ones (2), ones (2)) 323s ***** error ... 323s poissrnd (1, 2, -1, 5) 323s ***** error ... 323s poissrnd (1, 2, 1.5, 5) 323s ***** error poissrnd (ones (2,2), 3) 323s ***** error poissrnd (ones (2,2), [3, 2]) 323s ***** error poissrnd (ones (2,2), 2, 3) 323s 29 tests, 29 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/ncx2cdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncx2cdf.m 323s ***** demo 323s ## Plot various CDFs from the noncentral chi-squared distribution 323s x = 0:0.1:10; 323s p1 = ncx2cdf (x, 2, 1); 323s p2 = ncx2cdf (x, 2, 2); 323s p3 = ncx2cdf (x, 2, 3); 323s p4 = ncx2cdf (x, 4, 1); 323s p5 = ncx2cdf (x, 4, 2); 323s p6 = ncx2cdf (x, 4, 3); 323s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 323s x, p4, "-m", x, p5, "-c", x, p6, "-y") 323s grid on 323s xlim ([0, 10]) 323s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 323s "df = 2, λ = 3", "df = 4, λ = 1", ... 323s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 323s title ("Noncentral chi-squared CDF") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** demo 323s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 323s ## chi-squared CDF with the same number of degrees of freedom (4). 323s 323s x = 0:0.1:10; 323s p1 = ncx2cdf (x, 4, 2); 323s p2 = chi2cdf (x, 4); 323s plot (x, p1, "-", x, p2, "-") 323s grid on 323s xlim ([0, 10]) 323s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 323s title ("Noncentral chi-squared vs chi-squared CDFs") 323s xlabel ("values in x") 323s ylabel ("probability") 323s ***** test 323s x = -2:0.1:2; 323s p = ncx2cdf (x, 10, 1); 323s assert (p([1:21]), zeros (1, 21), 3e-84); 323s assert (p(22), 1.521400636466575e-09, 1e-14); 323s assert (p(30), 6.665480510026046e-05, 1e-14); 323s assert (p(41), 0.002406447308399836, 1e-14); 323s ***** test 323s p = ncx2cdf (12, 10, 3); 323s assert (p, 0.4845555602398649, 1e-14); 323s ***** test 323s p = ncx2cdf (2, 3, 2); 323s assert (p, 0.2207330870741212, 1e-14); 323s ***** test 323s p = ncx2cdf (2, 3, 2, "upper"); 323s assert (p, 0.7792669129258789, 1e-14); 323s ***** test 323s p = ncx2cdf ([3, 6], 3, 2, "upper"); 323s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 323s ***** error ncx2cdf () 323s ***** error ncx2cdf (1) 323s ***** error ncx2cdf (1, 2) 323s ***** error ncx2cdf (1, 2, 3, "tail") 323s ***** error ncx2cdf (1, 2, 3, 4) 323s ***** error ... 323s ncx2cdf (ones (3), ones (2), ones (2)) 323s ***** error ... 323s ncx2cdf (ones (2), ones (3), ones (2)) 323s ***** error ... 323s ncx2cdf (ones (2), ones (2), ones (3)) 323s ***** error ncx2cdf (i, 2, 2) 323s ***** error ncx2cdf (2, i, 2) 323s ***** error ncx2cdf (2, 2, i) 323s 16 tests, 16 passed, 0 known failure, 0 skipped 323s [inst/dist_fun/wishpdf.m] 323s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wishpdf.m 323s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 323s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 323s ***** 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); 323s ***** error wishpdf () 324s ***** error wishpdf (1, 2) 324s ***** error wishpdf (1, 2, 0) 324s ***** error wishpdf (1, 2) 324s 7 tests, 7 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/copulacdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/copulacdf.m 324s ***** test 324s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 324s theta = [1; 2]; 324s p = copulacdf ("Clayton", x, theta); 324s expected_p = [0.1395; 0.1767]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 324s p = copulacdf ("Gumbel", x, 2); 324s expected_p = [0.1464; 0.1464]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 324s theta = [1; 2]; 324s p = copulacdf ("Frank", x, theta); 324s expected_p = [0.0699; 0.0930]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 324s theta = [0.3; 0.7]; 324s p = copulacdf ("AMH", x, theta); 324s expected_p = [0.0629; 0.0959]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 324s theta = [0.2, 0.1, 0.1, 0.05]; 324s p = copulacdf ("FGM", x, theta); 324s expected_p = [0.0558; 0.0293]; 324s assert (p, expected_p, 0.001); 324s 5 tests, 5 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/mvtrnd.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvtrnd.m 324s ***** test 324s rho = [1, 0.5; 0.5, 1]; 324s df = 3; 324s n = 10; 324s r = mvtrnd (rho, df, n); 324s assert (size (r), [10, 2]); 324s ***** test 324s rho = [1, 0.5; 0.5, 1]; 324s df = [2; 3]; 324s n = 2; 324s r = mvtrnd (rho, df, 2); 324s assert (size (r), [2, 2]); 324s 2 tests, 2 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/plinv.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/plinv.m 324s ***** demo 324s ## Plot various iCDFs from the Piecewise linear distribution 324s p = 0.001:0.001:0.999; 324s x1 = [0, 1, 3, 4, 7, 10]; 324s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 324s x2 = [0, 2, 5, 6, 7, 8]; 324s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 324s data1 = plinv (p, x1, Fx1); 324s data2 = plinv (p, x2, Fx2); 324s plot (p, data1, "-b", p, data2, "-g") 324s grid on 324s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 324s title ("Piecewise linear iCDF") 324s xlabel ("probability") 324s ylabel ("values in data") 324s ***** test 324s p = 0:0.2:1; 324s data = plinv (p, [0, 1], [0, 1]); 324s assert (data, p); 324s ***** test 324s p = 0:0.2:1; 324s data = plinv (p, [0, 2], [0, 1]); 324s assert (data, 2 * p); 324s ***** test 324s p = 0:0.2:1; 324s data_out = 1:6; 324s data = plinv (p, [0, 1], [0, 0.5]); 324s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 324s ***** test 324s p = 0:0.2:1; 324s data_out = 1:6; 324s data = plinv (p, [0, 0.5], [0, 1]); 324s assert (data, [0:0.1:0.5]); 324s ***** error plinv () 324s ***** error plinv (1) 324s ***** error plinv (1, 2) 324s ***** error ... 324s plinv (1, [0, 1, 2], [0, 1]) 324s ***** error ... 324s plinv (1, [0], [1]) 324s ***** error ... 324s plinv (1, [0, 1, 2], [0, 1, 1.5]) 324s ***** error ... 324s plinv (1, [0, 1, 2], [0, i, 1]) 324s ***** error ... 324s plinv (i, [0, 1, 2], [0, 0.5, 1]) 324s ***** error ... 324s plinv (1, [0, i, 2], [0, 0.5, 1]) 324s ***** error ... 324s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 324s 14 tests, 14 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/raylrnd.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/raylrnd.m 324s ***** assert (size (raylrnd (2)), [1, 1]) 324s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 324s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 324s ***** assert (size (raylrnd (1, 3)), [3, 3]) 324s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 324s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 324s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 324s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 324s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 324s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 324s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 324s ***** assert (raylrnd (0, 1, 1), NaN) 324s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 324s ***** assert (class (raylrnd (2)), "double") 324s ***** assert (class (raylrnd (single (2))), "single") 324s ***** assert (class (raylrnd (single ([2 2]))), "single") 324s ***** error raylrnd () 324s ***** error raylrnd (i) 324s ***** error ... 324s raylrnd (1, -1) 324s ***** error ... 324s raylrnd (1, 1.2) 324s ***** error ... 324s raylrnd (1, ones (2)) 324s ***** error ... 324s raylrnd (1, [2 -1 2]) 324s ***** error ... 324s raylrnd (1, [2 0 2.5]) 324s ***** error ... 324s raylrnd (ones (2), ones (2)) 324s ***** error ... 324s raylrnd (1, 2, -1, 5) 324s ***** error ... 324s raylrnd (1, 2, 1.5, 5) 324s ***** error raylrnd (ones (2,2), 3) 324s ***** error raylrnd (ones (2,2), [3, 2]) 324s ***** error raylrnd (ones (2,2), 2, 3) 324s 29 tests, 29 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/unidpdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unidpdf.m 324s ***** demo 324s ## Plot various PDFs from the discrete uniform distribution 324s x = 0:10; 324s y1 = unidpdf (x, 5); 324s y2 = unidpdf (x, 9); 324s plot (x, y1, "*b", x, y2, "*g") 324s grid on 324s xlim ([0, 10]) 324s ylim ([0, 0.25]) 324s legend ({"N = 5", "N = 9"}, "location", "northeast") 324s title ("Descrete uniform PDF") 324s xlabel ("values in x") 324s ylabel ("density") 324s ***** shared x, y 324s x = [-1 0 1 2 10 11]; 324s y = [0 0 0.1 0.1 0.1 0]; 324s ***** assert (unidpdf (x, 10*ones (1,6)), y) 324s ***** assert (unidpdf (x, 10), y) 324s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 324s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 324s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 324s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 324s ***** error unidpdf () 324s ***** error unidpdf (1) 324s ***** error ... 324s unidpdf (ones (3), ones (2)) 324s ***** error ... 324s unidpdf (ones (2), ones (3)) 324s ***** error unidpdf (i, 2) 324s ***** error unidpdf (2, i) 324s 12 tests, 12 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/betacdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/betacdf.m 324s ***** demo 324s ## Plot various CDFs from the Beta distribution 324s x = 0:0.005:1; 324s p1 = betacdf (x, 0.5, 0.5); 324s p2 = betacdf (x, 5, 1); 324s p3 = betacdf (x, 1, 3); 324s p4 = betacdf (x, 2, 2); 324s p5 = betacdf (x, 2, 5); 324s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 324s grid on 324s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 324s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 324s title ("Beta CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** shared x, y, x1, x2 324s x = [-1 0 0.5 1 2]; 324s y = [0 0 0.75 1 1]; 324s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 324s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 324s ***** assert (betacdf (x, ones (1, 5), 2), y) 324s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 324s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 324s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 324s x1 = [0.1:0.2:0.9]; 324s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 324s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 324s 1e-14); 324s x2 = [1, 2, 3]; 324s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 324s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 324s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 324s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 324s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 324s ***** error betacdf () 324s ***** error betacdf (1) 324s ***** error betacdf (1, 2) 324s ***** error betacdf (1, 2, 3, 4, 5) 324s ***** error betacdf (1, 2, 3, "tail") 324s ***** error betacdf (1, 2, 3, 4) 324s ***** error ... 324s betacdf (ones (3), ones (2), ones (2)) 324s ***** error ... 324s betacdf (ones (2), ones (3), ones (2)) 324s ***** error ... 324s betacdf (ones (2), ones (2), ones (3)) 324s ***** error betacdf (i, 2, 2) 324s ***** error betacdf (2, i, 2) 324s ***** error betacdf (2, 2, i) 324s 25 tests, 25 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/invgcdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/invgcdf.m 324s ***** demo 324s ## Plot various CDFs from the inverse Gaussian distribution 324s x = 0:0.001:3; 324s p1 = invgcdf (x, 1, 0.2); 324s p2 = invgcdf (x, 1, 1); 324s p3 = invgcdf (x, 1, 3); 324s p4 = invgcdf (x, 3, 0.2); 324s p5 = invgcdf (x, 3, 1); 324s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 324s grid on 324s xlim ([0, 3]) 324s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 324s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 324s title ("Inverse Gaussian CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** shared x, p1, p1u, y2, y2u, y3, y3u 324s x = [-Inf, -1, 0, 1/2, 1, Inf]; 324s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 324s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 324s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 324s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 324s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 324s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 324s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 324s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 324s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 324s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 324s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 324s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 324s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 324s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 324s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 324s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 324s ***** error invgcdf () 324s ***** error invgcdf (1) 324s ***** error invgcdf (1, 2) 324s ***** error invgcdf (1, 2, 3, "tail") 324s ***** error invgcdf (1, 2, 3, 5) 324s ***** error ... 324s invgcdf (ones (3), ones (2), ones(2)) 324s ***** error ... 324s invgcdf (ones (2), ones (3), ones(2)) 324s ***** error ... 324s invgcdf (ones (2), ones (2), ones(3)) 324s ***** error invgcdf (i, 2, 3) 324s ***** error invgcdf (1, i, 3) 324s ***** error invgcdf (1, 2, i) 324s 25 tests, 25 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/gevcdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gevcdf.m 324s ***** demo 324s ## Plot various CDFs from the generalized extreme value distribution 324s x = -1:0.001:10; 324s p1 = gevcdf (x, 1, 1, 1); 324s p2 = gevcdf (x, 0.5, 1, 1); 324s p3 = gevcdf (x, 1, 1, 5); 324s p4 = gevcdf (x, 1, 2, 5); 324s p5 = gevcdf (x, 1, 5, 5); 324s p6 = gevcdf (x, 1, 0.5, 5); 324s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 324s x, p4, "-c", x, p5, "-m", x, p6, "-k") 324s grid on 324s xlim ([-1, 10]) 324s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 324s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 324s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 324s "location", "southeast") 324s title ("Generalized extreme value CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** test 324s x = 0:0.5:2.5; 324s sigma = 1:6; 324s k = 1; 324s mu = 0; 324s p = gevcdf (x, k, sigma, mu); 324s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = -0.5:0.5:2.5; 324s sigma = 0.5; 324s k = 1; 324s mu = 0; 324s p = gevcdf (x, k, sigma, mu); 324s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 324s assert (p, expected_p, 0.001); 324s ***** test # check for continuity for k near 0 324s x = 1; 324s sigma = 0.5; 324s k = -0.03:0.01:0.03; 324s mu = 0; 324s p = gevcdf (x, k, sigma, mu); 324s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 324s assert (p, expected_p, 0.001); 324s ***** error gevcdf () 324s ***** error gevcdf (1) 324s ***** error gevcdf (1, 2) 324s ***** error gevcdf (1, 2, 3) 324s ***** error ... 324s gevcdf (1, 2, 3, 4, 5, 6) 324s ***** error gevcdf (1, 2, 3, 4, "tail") 324s ***** error gevcdf (1, 2, 3, 4, 5) 324s ***** error ... 324s gevcdf (ones (3), ones (2), ones(2), ones(2)) 324s ***** error ... 324s gevcdf (ones (2), ones (3), ones(2), ones(2)) 324s ***** error ... 324s gevcdf (ones (2), ones (2), ones(3), ones(2)) 324s ***** error ... 324s gevcdf (ones (2), ones (2), ones(2), ones(3)) 324s ***** error gevcdf (i, 2, 3, 4) 324s ***** error gevcdf (1, i, 3, 4) 324s ***** error gevcdf (1, 2, i, 4) 324s ***** error gevcdf (1, 2, 3, i) 324s 18 tests, 18 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/expcdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/expcdf.m 324s ***** demo 324s ## Plot various CDFs from the exponential distribution 324s x = 0:0.01:5; 324s p1 = expcdf (x, 2/3); 324s p2 = expcdf (x, 1.0); 324s p3 = expcdf (x, 2.0); 324s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 324s grid on 324s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 324s title ("Exponential CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** shared x, p 324s x = [-1 0 0.5 1 Inf]; 324s p = [0, 1 - exp(-x(2:end)/2)]; 324s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 324s ***** assert (expcdf (x, 2), p, 1e-16) 324s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 324s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 324s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 324s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 324s ***** test 324s [p, plo, pup] = expcdf (1, 2, 3); 324s assert (p, 0.39346934028737, 1e-14); 324s assert (plo, 0.08751307220484, 1e-14); 324s assert (pup, 0.93476821257933, 1e-14); 324s ***** test 324s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 324s assert (p, 0.39346934028737, 1e-14); 324s assert (plo, 0.14466318041675, 1e-14); 324s assert (pup, 0.79808291849140, 1e-14); 324s ***** test 324s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 324s assert (p, 0.60653065971263, 1e-14); 324s assert (plo, 0.20191708150860, 1e-14); 324s assert (pup, 0.85533681958325, 1e-14); 324s ***** error expcdf () 324s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 324s ***** error expcdf (1, 2, 3, 4, "uper") 324s ***** error ... 324s expcdf (ones (3), ones (2)) 324s ***** error ... 324s expcdf (2, 3, [1, 2]) 324s ***** error ... 324s [p, plo, pup] = expcdf (1, 2) 324s ***** error [p, plo, pup] = ... 324s expcdf (1, 2, 3, 0) 324s ***** error [p, plo, pup] = ... 324s expcdf (1, 2, 3, 1.22) 324s ***** error [p, plo, pup] = ... 324s expcdf (1, 2, 3, "alpha", "upper") 324s ***** error expcdf (i, 2) 324s ***** error expcdf (2, i) 324s ***** error ... 324s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 324s 21 tests, 21 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/lognpdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/lognpdf.m 324s ***** demo 324s ## Plot various PDFs from the log-normal distribution 324s x = 0:0.01:5; 324s y1 = lognpdf (x, 0, 1); 324s y2 = lognpdf (x, 0, 0.5); 324s y3 = lognpdf (x, 0, 0.25); 324s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 324s grid on 324s ylim ([0, 2]) 324s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 324s "location", "northeast") 324s title ("Log-normal PDF") 324s xlabel ("values in x") 324s ylabel ("density") 324s ***** shared x, y 324s x = [-1 0 e Inf]; 324s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 324s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 324s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 324s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 324s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 324s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 324s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 324s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 324s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 324s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 324s ***** error lognpdf () 324s ***** error lognpdf (1,2,3,4) 324s ***** error lognpdf (ones (3), ones (2), ones (2)) 324s ***** error lognpdf (ones (2), ones (3), ones (2)) 324s ***** error lognpdf (ones (2), ones (2), ones (3)) 324s ***** error lognpdf (i, 2, 2) 324s ***** error lognpdf (2, i, 2) 324s ***** error lognpdf (2, 2, i) 324s 17 tests, 17 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/ricecdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ricecdf.m 324s ***** demo 324s ## Plot various CDFs from the Rician distribution 324s x = 0:0.01:10; 324s p1 = ricecdf (x, 0, 1); 324s p2 = ricecdf (x, 0.5, 1); 324s p3 = ricecdf (x, 1, 1); 324s p4 = ricecdf (x, 2, 1); 324s p5 = ricecdf (x, 4, 1); 324s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 324s grid on 324s ylim ([0, 1]) 324s xlim ([0, 8]) 324s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 324s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 324s title ("Rician CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** demo 324s ## Plot various CDFs from the Rician distribution 324s x = 0:0.01:10; 324s p1 = ricecdf (x, 0, 0.5); 324s p2 = ricecdf (x, 0, 2); 324s p3 = ricecdf (x, 0, 3); 324s p4 = ricecdf (x, 2, 2); 324s p5 = ricecdf (x, 4, 2); 324s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 324s grid on 324s ylim ([0, 1]) 324s xlim ([0, 8]) 324s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 324s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 324s title ("Rician CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** test 324s x = 0:0.5:2.5; 324s s = 1:6; 324s p = ricecdf (x, s, 1); 324s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = 0:0.5:2.5; 324s sigma = 1:6; 324s p = ricecdf (x, 1, sigma); 324s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = 0:0.5:2.5; 324s p = ricecdf (x, 0, 1); 324s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 324s assert (p, expected_p, 0.001); 324s ***** test 324s x = 0:0.5:2.5; 324s p = ricecdf (x, 1, 1); 324s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 324s assert (p, expected_p, 0.001); 324s ***** shared x, p 324s x = [-1, 0, 1, 2, Inf]; 324s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 324s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 324s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 324s ***** error ricecdf () 324s ***** error ricecdf (1) 324s ***** error ricecdf (1, 2) 324s ***** error ricecdf (1, 2, 3, "uper") 324s ***** error ricecdf (1, 2, 3, 4) 324s ***** error ... 324s ricecdf (ones (3), ones (2), ones (2)) 324s ***** error ... 324s ricecdf (ones (2), ones (3), ones (2)) 324s ***** error ... 324s ricecdf (ones (2), ones (2), ones (3)) 324s ***** error ricecdf (i, 2, 3) 324s ***** error ricecdf (2, i, 3) 324s ***** error ricecdf (2, 2, i) 324s 17 tests, 17 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/laplacernd.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/laplacernd.m 324s ***** assert (size (laplacernd (1, 1)), [1 1]) 324s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 324s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 324s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 324s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 324s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 324s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 324s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 324s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 324s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 324s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 324s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 324s ***** assert (class (laplacernd (1, 1)), "double") 324s ***** assert (class (laplacernd (1, single (1))), "single") 324s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 324s ***** assert (class (laplacernd (single (1), 1)), "single") 324s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 324s ***** error laplacernd () 324s ***** error laplacernd (1) 324s ***** error ... 324s laplacernd (ones (3), ones (2)) 324s ***** error ... 324s laplacernd (ones (2), ones (3)) 324s ***** error laplacernd (i, 2, 3) 324s ***** error laplacernd (1, i, 3) 324s ***** error ... 324s laplacernd (1, 2, -1) 324s ***** error ... 324s laplacernd (1, 2, 1.2) 324s ***** error ... 324s laplacernd (1, 2, ones (2)) 324s ***** error ... 324s laplacernd (1, 2, [2 -1 2]) 324s ***** error ... 324s laplacernd (1, 2, [2 0 2.5]) 324s ***** error ... 324s laplacernd (1, 2, 2, -1, 5) 324s ***** error ... 324s laplacernd (1, 2, 2, 1.5, 5) 324s ***** error ... 324s laplacernd (2, ones (2), 3) 324s ***** error ... 324s laplacernd (2, ones (2), [3, 2]) 324s ***** error ... 324s laplacernd (2, ones (2), 3, 2) 324s 33 tests, 33 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/unidcdf.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unidcdf.m 324s ***** demo 324s ## Plot various CDFs from the discrete uniform distribution 324s x = 0:10; 324s p1 = unidcdf (x, 5); 324s p2 = unidcdf (x, 9); 324s plot (x, p1, "*b", x, p2, "*g") 324s grid on 324s xlim ([0, 10]) 324s ylim ([0, 1]) 324s legend ({"N = 5", "N = 9"}, "location", "southeast") 324s title ("Discrete uniform CDF") 324s xlabel ("values in x") 324s ylabel ("probability") 324s ***** shared x, y 324s x = [0 1 2.5 10 11]; 324s y = [0, 0.1 0.2 1.0 1.0]; 324s ***** assert (unidcdf (x, 10*ones (1,5)), y) 324s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 324s ***** assert (unidcdf (x, 10), y) 324s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 324s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 324s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 324s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 324s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 324s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 324s ***** error unidcdf () 324s ***** error unidcdf (1) 324s ***** error unidcdf (1, 2, 3) 324s ***** error unidcdf (1, 2, "tail") 324s ***** error ... 324s unidcdf (ones (3), ones (2)) 324s ***** error ... 324s unidcdf (ones (2), ones (3)) 324s ***** error unidcdf (i, 2) 324s ***** error unidcdf (2, i) 324s 17 tests, 17 passed, 0 known failure, 0 skipped 324s [inst/dist_fun/ncfinv.m] 324s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncfinv.m 324s ***** demo 324s ## Plot various iCDFs from the noncentral F distribution 324s p = 0.001:0.001:0.999; 324s x1 = ncfinv (p, 2, 5, 1); 324s x2 = ncfinv (p, 2, 5, 2); 324s x3 = ncfinv (p, 5, 10, 1); 324s x4 = ncfinv (p, 10, 20, 10); 324s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 324s grid on 324s ylim ([0, 5]) 324s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 324s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 324s "location", "northwest") 324s title ("Noncentral F iCDF") 324s xlabel ("probability") 324s ylabel ("values in x") 324s ***** demo 324s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 324s ## same number of numerator and denominator degrees of freedom (5, 20) 324s 324s p = 0.001:0.001:0.999; 324s x1 = ncfinv (p, 5, 20, 10); 324s x2 = finv (p, 5, 20); 324s plot (p, x1, "-", p, x2, "-"); 324s grid on 324s ylim ([0, 10]) 324s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 324s title ("Noncentral F vs F quantile functions") 324s xlabel ("probability") 324s ylabel ("values in x") 324s ***** test 324s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 324s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 324s ***** test 324s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 324s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 324s ***** test 324s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 324s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 324s ***** test 324s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 324s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 324s ***** test 324s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 324s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 324s ***** test 324s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 324s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 325s ***** test 325s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 325s ***** error ncfinv () 325s ***** error ncfinv (1) 325s ***** error ncfinv (1, 2) 325s ***** error ncfinv (1, 2, 3) 325s ***** error ... 325s ncfinv (ones (3), ones (2), ones (2), ones (2)) 325s ***** error ... 325s ncfinv (ones (2), ones (3), ones (2), ones (2)) 325s ***** error ... 325s ncfinv (ones (2), ones (2), ones (3), ones (2)) 325s ***** error ... 325s ncfinv (ones (2), ones (2), ones (2), ones (3)) 325s ***** error ncfinv (i, 2, 2, 2) 325s ***** error ncfinv (2, i, 2, 2) 325s ***** error ncfinv (2, 2, i, 2) 325s ***** error ncfinv (2, 2, 2, i) 325s 19 tests, 19 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/mvtpdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvtpdf.m 325s ***** demo 325s ## Compute the pdf of a multivariate t distribution with correlation 325s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 325s 325s rho = [1, 0.4; 0.4, 1]; 325s df = 2; 325s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 325s X = [X1(:), X2(:)]; 325s y = mvtpdf (X, rho, df); 325s surf (X1, X2, reshape (y, 25, 25)); 325s title ("Bivariate Student's t probability density function"); 325s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 325s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 325s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 325s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 325s [0.04713313 0.03722421 0.02069011]', 1E-7) 325s 3 tests, 3 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/ncfpdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncfpdf.m 325s ***** demo 325s ## Plot various PDFs from the noncentral F distribution 325s x = 0:0.01:5; 325s y1 = ncfpdf (x, 2, 5, 1); 325s y2 = ncfpdf (x, 2, 5, 2); 325s y3 = ncfpdf (x, 5, 10, 1); 325s y4 = ncfpdf (x, 10, 20, 10); 325s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 325s grid on 325s xlim ([0, 5]) 325s ylim ([0, 0.8]) 325s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 325s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 325s "location", "northeast") 325s title ("Noncentral F PDF") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** demo 325s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 325s ## same number of numerator and denominator degrees of freedom (5, 20) 325s 325s x = 0.01:0.1:10.01; 325s y1 = ncfpdf (x, 5, 20, 10); 325s y2 = fpdf (x, 5, 20); 325s plot (x, y1, "-", x, y2, "-"); 325s grid on 325s xlim ([0, 10]) 325s ylim ([0, 0.8]) 325s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 325s title ("Noncentral F vs F PDFs") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** shared x1, df1, df2, lambda 325s x1 = [-Inf, 2, NaN, 4, Inf]; 325s df1 = [2, 0, -1, 1, 4]; 325s df2 = [2, 4, 5, 6, 8]; 325s lambda = [1, NaN, 3, -1, 2]; 325s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 325s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 325s 0.05607937264237208, NaN], 1e-14); 325s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 325s 0.080125760971946518, NaN], 1e-14); 325s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 325s 0.0715902008258656, NaN], 1e-14); 325s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 325s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 325s NaN, 0.2152571783045893], 1e-14); 325s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 325s NaN, 0.05560846335398539], 1e-14); 325s ***** error ncfpdf () 325s ***** error ncfpdf (1) 325s ***** error ncfpdf (1, 2) 325s ***** error ncfpdf (1, 2, 3) 325s ***** error ... 325s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 325s ***** error ... 325s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 325s ***** error ... 325s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 325s ***** error ... 325s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 325s ***** error ncfpdf (i, 2, 2, 2) 325s ***** error ncfpdf (2, i, 2, 2) 325s ***** error ncfpdf (2, 2, i, 2) 325s ***** error ncfpdf (2, 2, 2, i) 325s 19 tests, 19 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/tcdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tcdf.m 325s ***** demo 325s ## Plot various CDFs from the Student's T distribution 325s x = -5:0.01:5; 325s p1 = tcdf (x, 1); 325s p2 = tcdf (x, 2); 325s p3 = tcdf (x, 5); 325s p4 = tcdf (x, Inf); 325s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 325s grid on 325s xlim ([-5, 5]) 325s ylim ([0, 1]) 325s legend ({"df = 1", "df = 2", ... 325s "df = 5", 'df = \infty'}, "location", "southeast") 325s title ("Student's T CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** shared x,y 325s x = [-Inf 0 1 Inf]; 325s y = [0 1/2 3/4 1]; 325s ***** assert (tcdf (x, ones (1,4)), y, eps) 325s ***** assert (tcdf (x, 1), y, eps) 325s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 325s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 325s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 325s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 325s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 325s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 325s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 325s ***** error tcdf () 325s ***** error tcdf (1) 325s ***** error tcdf (1, 2, "uper") 325s ***** error tcdf (1, 2, 3) 325s ***** error ... 325s tcdf (ones (3), ones (2)) 325s ***** error ... 325s tcdf (ones (3), ones (2)) 325s ***** error ... 325s tcdf (ones (3), ones (2), "upper") 325s ***** error tcdf (i, 2) 325s ***** error tcdf (2, i) 325s ***** shared tol_rel 325s tol_rel = 10 * eps; 325s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 325s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 325s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 325s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 325s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 325s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 325s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 325s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 325s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 325s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 325s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 325s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 325s 30 tests, 30 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/nbinrnd.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nbinrnd.m 325s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 325s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 325s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 325s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 325s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 325s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 325s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 325s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 325s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 325s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 325s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 325s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 325s ***** assert (class (nbinrnd (1, 0.5)), "double") 325s ***** assert (class (nbinrnd (1, single (0.5))), "single") 325s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 325s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 325s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 325s ***** error nbinrnd () 325s ***** error nbinrnd (1) 325s ***** error ... 325s nbinrnd (ones (3), ones (2)) 325s ***** error ... 325s nbinrnd (ones (2), ones (3)) 325s ***** error nbinrnd (i, 2, 3) 325s ***** error nbinrnd (1, i, 3) 325s ***** error ... 325s nbinrnd (1, 2, -1) 325s ***** error ... 325s nbinrnd (1, 2, 1.2) 325s ***** error ... 325s nbinrnd (1, 2, ones (2)) 325s ***** error ... 325s nbinrnd (1, 2, [2 -1 2]) 325s ***** error ... 325s nbinrnd (1, 2, [2 0 2.5]) 325s ***** error ... 325s nbinrnd (1, 2, 2, -1, 5) 325s ***** error ... 325s nbinrnd (1, 2, 2, 1.5, 5) 325s ***** error ... 325s nbinrnd (2, ones (2), 3) 325s ***** error ... 325s nbinrnd (2, ones (2), [3, 2]) 325s ***** error ... 325s nbinrnd (2, ones (2), 3, 2) 325s 33 tests, 33 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/chi2cdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/chi2cdf.m 325s ***** demo 325s ## Plot various CDFs from the chi-squared distribution 325s x = 0:0.01:8; 325s p1 = chi2cdf (x, 1); 325s p2 = chi2cdf (x, 2); 325s p3 = chi2cdf (x, 3); 325s p4 = chi2cdf (x, 4); 325s p5 = chi2cdf (x, 6); 325s p6 = chi2cdf (x, 9); 325s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 325s x, p4, "-c", x, p5, "-m", x, p6, "-y") 325s grid on 325s xlim ([0, 8]) 325s legend ({"df = 1", "df = 2", "df = 3", ... 325s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 325s title ("Chi-squared CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** shared x, p, u 325s x = [-1, 0, 0.5, 1, 2]; 325s p = [0, (1 - exp (-x(2:end) / 2))]; 325s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 325s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 325s ***** assert (chi2cdf (x, 2), p, eps) 325s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 325s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 325s [p(1), 1, NaN, u(4:5)], eps) 325s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 325s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 325s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 325s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 325s ***** error chi2cdf () 325s ***** error chi2cdf (1) 325s ***** error chi2cdf (1, 2, 3, 4) 325s ***** error chi2cdf (1, 2, 3) 325s ***** error chi2cdf (1, 2, "uper") 325s ***** error ... 325s chi2cdf (ones (3), ones (2)) 325s ***** error ... 325s chi2cdf (ones (2), ones (3)) 325s ***** error chi2cdf (i, 2) 325s ***** error chi2cdf (2, i) 325s 17 tests, 17 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/burrrnd.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/burrrnd.m 325s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 325s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 325s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 325s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 325s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 325s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 325s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 325s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 325s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 325s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 325s ***** assert (class (burrrnd (1,1,1)), "double") 325s ***** assert (class (burrrnd (single (1),1,1)), "single") 325s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 325s ***** assert (class (burrrnd (1,single (1),1)), "single") 325s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 325s ***** assert (class (burrrnd (1,1,single (1))), "single") 325s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 325s ***** error burrrnd () 325s ***** error burrrnd (1) 325s ***** error burrrnd (1, 2) 325s ***** error ... 325s burrrnd (ones (3), ones (2), ones (2)) 325s ***** error ... 325s burrrnd (ones (2), ones (3), ones (2)) 325s ***** error ... 325s burrrnd (ones (2), ones (2), ones (3)) 325s ***** error burrrnd (i, 2, 3) 325s ***** error burrrnd (1, i, 3) 325s ***** error burrrnd (1, 2, i) 325s ***** error ... 325s burrrnd (1, 2, 3, -1) 325s ***** error ... 325s burrrnd (1, 2, 3, 1.2) 325s ***** error ... 325s burrrnd (1, 2, 3, ones (2)) 325s ***** error ... 325s burrrnd (1, 2, 3, [2 -1 2]) 325s ***** error ... 325s burrrnd (1, 2, 3, [2 0 2.5]) 325s ***** error ... 325s burrrnd (1, 2, 3, 2, -1, 5) 325s ***** error ... 325s burrrnd (1, 2, 3, 2, 1.5, 5) 325s ***** error ... 325s burrrnd (2, ones (2), 2, 3) 325s ***** error ... 325s burrrnd (2, ones (2), 2, [3, 2]) 325s ***** error ... 325s burrrnd (2, ones (2), 2, 3, 2) 325s 36 tests, 36 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/tlspdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tlspdf.m 325s ***** demo 325s ## Plot various PDFs from the Student's T distribution 325s x = -8:0.01:8; 325s y1 = tlspdf (x, 0, 1, 1); 325s y2 = tlspdf (x, 0, 2, 2); 325s y3 = tlspdf (x, 3, 2, 5); 325s y4 = tlspdf (x, -1, 3, Inf); 325s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 325s grid on 325s xlim ([-8, 8]) 325s ylim ([0, 0.41]) 325s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 325s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 325s "location", "northwest") 325s title ("Location-scale Student's T PDF") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** test 325s x = rand (10,1); 325s y = 1./(pi * (1 + x.^2)); 325s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 325s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 325s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 325s ***** shared x, y 325s x = [-Inf 0 0.5 1 Inf]; 325s y = 1./(pi * (1 + x.^2)); 325s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 325s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 325s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 325s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 325s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 325s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 325s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 325s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 325s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 325s ***** error tlspdf () 325s ***** error tlspdf (1) 325s ***** error tlspdf (1, 2) 325s ***** error tlspdf (1, 2, 3) 325s ***** error ... 325s tlspdf (ones (3), ones (2), 1, 1) 325s ***** error ... 325s tlspdf (ones (2), 1, ones (3), 1) 325s ***** error ... 325s tlspdf (ones (2), 1, 1, ones (3)) 325s ***** error tlspdf (i, 2, 1, 1) 325s ***** error tlspdf (2, i, 1, 1) 325s ***** error tlspdf (2, 1, i, 1) 325s ***** error tlspdf (2, 1, 1, i) 325s 21 tests, 21 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/copulapdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/copulapdf.m 325s ***** test 325s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 325s theta = [1; 2]; 325s y = copulapdf ("Clayton", x, theta); 325s expected_p = [0.9872; 0.7295]; 325s assert (y, expected_p, 0.001); 325s ***** test 325s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 325s y = copulapdf ("Gumbel", x, 2); 325s expected_p = [0.9468; 0.9468]; 325s assert (y, expected_p, 0.001); 325s ***** test 325s x = [0.2, 0.6; 0.2, 0.6]; 325s theta = [1; 2]; 325s y = copulapdf ("Frank", x, theta); 325s expected_p = [0.9378; 0.8678]; 325s assert (y, expected_p, 0.001); 325s ***** test 325s x = [0.2, 0.6; 0.2, 0.6]; 325s theta = [0.3; 0.7]; 325s y = copulapdf ("AMH", x, theta); 325s expected_p = [0.9540; 0.8577]; 325s assert (y, expected_p, 0.001); 325s 4 tests, 4 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/jsupdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/jsupdf.m 325s ***** error jsupdf () 325s ***** error jsupdf (1, 2, 3, 4) 325s ***** error ... 325s jsupdf (1, ones (2), ones (3)) 325s 3 tests, 3 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/nakacdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nakacdf.m 325s ***** demo 325s ## Plot various CDFs from the Nakagami distribution 325s x = 0:0.01:3; 325s p1 = nakacdf (x, 0.5, 1); 325s p2 = nakacdf (x, 1, 1); 325s p3 = nakacdf (x, 1, 2); 325s p4 = nakacdf (x, 1, 3); 325s p5 = nakacdf (x, 2, 1); 325s p6 = nakacdf (x, 2, 2); 325s p7 = nakacdf (x, 5, 1); 325s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 325s x, p5, "-k", x, p6, "-b", x, p7, "-c") 325s grid on 325s xlim ([0, 3]) 325s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 325s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 325s "μ = 5, ω = 1"}, "location", "southeast") 325s title ("Nakagami CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** shared x, y 325s x = [-1, 0, 1, 2, Inf]; 325s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 325s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 325s ***** assert (nakacdf (x, 1, 1), y, eps) 325s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 325s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 325s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 325s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 325s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 325s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 325s ***** error nakacdf () 325s ***** error nakacdf (1) 325s ***** error nakacdf (1, 2) 325s ***** error nakacdf (1, 2, 3, "tail") 325s ***** error nakacdf (1, 2, 3, 4) 325s ***** error ... 325s nakacdf (ones (3), ones (2), ones (2)) 325s ***** error ... 325s nakacdf (ones (2), ones (3), ones (2)) 325s ***** error ... 325s nakacdf (ones (2), ones (2), ones (3)) 325s ***** error nakacdf (i, 2, 2) 325s ***** error nakacdf (2, i, 2) 325s ***** error nakacdf (2, 2, i) 325s 19 tests, 19 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/raylcdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/raylcdf.m 325s ***** demo 325s ## Plot various CDFs from the Rayleigh distribution 325s x = 0:0.01:10; 325s p1 = raylcdf (x, 0.5); 325s p2 = raylcdf (x, 1); 325s p3 = raylcdf (x, 2); 325s p4 = raylcdf (x, 3); 325s p5 = raylcdf (x, 4); 325s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 325s grid on 325s ylim ([0, 1]) 325s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 325s "σ = 3", "σ = 4"}, "location", "southeast") 325s title ("Rayleigh CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** test 325s x = 0:0.5:2.5; 325s sigma = 1:6; 325s p = raylcdf (x, sigma); 325s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 325s assert (p, expected_p, 0.001); 325s ***** test 325s x = 0:0.5:2.5; 325s p = raylcdf (x, 0.5); 325s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 325s assert (p, expected_p, 0.001); 325s ***** shared x, p 325s x = [-1, 0, 1, 2, Inf]; 325s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 325s ***** assert (raylcdf (x, 1), p, 1e-14) 325s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 325s ***** error raylcdf () 325s ***** error raylcdf (1) 325s ***** error raylcdf (1, 2, "uper") 325s ***** error raylcdf (1, 2, 3) 325s ***** error ... 325s raylcdf (ones (3), ones (2)) 325s ***** error ... 325s raylcdf (ones (2), ones (3)) 325s ***** error raylcdf (i, 2) 325s ***** error raylcdf (2, i) 325s 12 tests, 12 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/gumbelpdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gumbelpdf.m 325s ***** demo 325s ## Plot various PDFs from the Extreme value distribution 325s x = -5:0.001:20; 325s y1 = gumbelpdf (x, 0.5, 2); 325s y2 = gumbelpdf (x, 1.0, 2); 325s y3 = gumbelpdf (x, 1.5, 3); 325s y4 = gumbelpdf (x, 3.0, 4); 325s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 325s grid on 325s ylim ([0, 0.2]) 325s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 325s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 325s title ("Extreme value PDF") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** shared x, y0, y1 325s x = [-5, 0, 1, 2, 3]; 325s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 325s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 325s ***** assert (gumbelpdf (x), y0, 1e-4) 325s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 325s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 325s ***** error gumbelpdf () 325s ***** error ... 325s gumbelpdf (ones (3), ones (2), ones (2)) 325s ***** error gumbelpdf (i, 2, 2) 325s ***** error gumbelpdf (2, i, 2) 325s ***** error gumbelpdf (2, 2, i) 325s 8 tests, 8 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/logipdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logipdf.m 325s ***** demo 325s ## Plot various PDFs from the logistic distribution 325s x = -5:0.01:20; 325s y1 = logipdf (x, 5, 2); 325s y2 = logipdf (x, 9, 3); 325s y3 = logipdf (x, 9, 4); 325s y4 = logipdf (x, 6, 2); 325s y5 = logipdf (x, 2, 1); 325s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 325s grid on 325s ylim ([0, 0.3]) 325s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 325s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 325s title ("Logistic PDF") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** shared x, y 325s x = [-Inf -log(4) 0 log(4) Inf]; 325s y = [0, 0.16, 1/4, 0.16, 0]; 325s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 325s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 325s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 325s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 325s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 325s ***** error logipdf () 325s ***** error logipdf (1) 325s ***** error ... 325s logipdf (1, 2) 325s ***** error ... 325s logipdf (1, ones (2), ones (3)) 325s ***** error ... 325s logipdf (ones (2), 1, ones (3)) 325s ***** error ... 325s logipdf (ones (2), ones (3), 1) 325s ***** error logipdf (i, 2, 3) 325s ***** error logipdf (1, i, 3) 325s ***** error logipdf (1, 2, i) 325s 14 tests, 14 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/bvtcdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bvtcdf.m 325s ***** test 325s x = [1, 2]; 325s rho = [1, 0.5; 0.5, 1]; 325s df = 4; 325s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 325s ***** test 325s x = [3, 2;2, 4;1, 5]; 325s rho = [1, 0.5; 0.5, 1]; 325s df = 4; 325s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 325s 2 tests, 2 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/loglrnd.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/loglrnd.m 325s ***** assert (size (loglrnd (1, 1)), [1 1]) 325s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 325s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 325s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 325s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 325s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 325s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 325s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 325s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 325s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 325s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 325s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 325s ***** assert (class (loglrnd (1, 1)), "double") 325s ***** assert (class (loglrnd (1, single (1))), "single") 325s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 325s ***** assert (class (loglrnd (single (1), 1)), "single") 325s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 325s ***** error loglrnd () 325s ***** error loglrnd (1) 325s ***** error ... 325s loglrnd (ones (3), ones (2)) 325s ***** error ... 325s loglrnd (ones (2), ones (3)) 325s ***** error loglrnd (i, 2, 3) 325s ***** error loglrnd (1, i, 3) 325s ***** error ... 325s loglrnd (1, 2, -1) 325s ***** error ... 325s loglrnd (1, 2, 1.2) 325s ***** error ... 325s loglrnd (1, 2, ones (2)) 325s ***** error ... 325s loglrnd (1, 2, [2 -1 2]) 325s ***** error ... 325s loglrnd (1, 2, [2 0 2.5]) 325s ***** error ... 325s loglrnd (1, 2, 2, -1, 5) 325s ***** error ... 325s loglrnd (1, 2, 2, 1.5, 5) 325s ***** error ... 325s loglrnd (2, ones (2), 3) 325s ***** error ... 325s loglrnd (2, ones (2), [3, 2]) 325s ***** error ... 325s loglrnd (2, ones (2), 3, 2) 325s 33 tests, 33 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/hncdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hncdf.m 325s ***** demo 325s ## Plot various CDFs from the half-normal distribution 325s x = 0:0.001:10; 325s p1 = hncdf (x, 0, 1); 325s p2 = hncdf (x, 0, 2); 325s p3 = hncdf (x, 0, 3); 325s p4 = hncdf (x, 0, 5); 325s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 325s grid on 325s xlim ([0, 10]) 325s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 325s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 325s title ("Half-normal CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** demo 325s ## Plot half-normal against normal cumulative distribution function 325s x = -5:0.001:5; 325s p1 = hncdf (x, 0, 1); 325s p2 = normcdf (x); 325s plot (x, p1, "-b", x, p2, "-g") 325s grid on 325s xlim ([-5, 5]) 325s legend ({"half-normal with μ = 0, σ = 1", ... 325s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 325s title ("Half-normal against standard normal CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** shared x, p1, p1u, y2, y2u, y3, y3u 325s x = [-Inf, -1, 0, 1/2, 1, Inf]; 325s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 325s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 325s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 325s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 325s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 325s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 325s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 325s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 325s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 325s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 325s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 325s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 325s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 325s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 325s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 325s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 325s ***** error hncdf () 325s ***** error hncdf (1) 325s ***** error hncdf (1, 2) 325s ***** error hncdf (1, 2, 3, "tail") 325s ***** error hncdf (1, 2, 3, 5) 325s ***** error ... 325s hncdf (ones (3), ones (2), ones(2)) 325s ***** error ... 325s hncdf (ones (2), ones (3), ones(2)) 325s ***** error ... 325s hncdf (ones (2), ones (2), ones(3)) 325s ***** error hncdf (i, 2, 3) 325s ***** error hncdf (1, i, 3) 325s ***** error hncdf (1, 2, i) 325s 25 tests, 25 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/betarnd.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/betarnd.m 325s ***** assert (size (betarnd (2, 1/2)), [1 1]) 325s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 325s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 325s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 325s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 325s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 325s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 325s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 325s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 325s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 325s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 325s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 325s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 325s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 325s ***** assert (class (betarnd (1, 1)), "double") 325s ***** assert (class (betarnd (1, single (0))), "single") 325s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 325s ***** assert (class (betarnd (1, single (1), 2)), "single") 325s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 325s ***** assert (class (betarnd (single (1), 1, 2)), "single") 325s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 325s ***** error betarnd () 325s ***** error betarnd (1) 325s ***** error ... 325s betarnd (ones (3), ones (2)) 325s ***** error ... 325s betarnd (ones (2), ones (3)) 325s ***** error betarnd (i, 2) 325s ***** error betarnd (1, i) 325s ***** error ... 325s betarnd (1, 1/2, -1) 325s ***** error ... 325s betarnd (1, 1/2, 1.2) 325s ***** error ... 325s betarnd (1, 1/2, ones (2)) 325s ***** error ... 325s betarnd (1, 1/2, [2 -1 2]) 325s ***** error ... 325s betarnd (1, 1/2, [2 0 2.5]) 325s ***** error ... 325s betarnd (1, 1/2, 2, -1, 5) 325s ***** error ... 325s betarnd (1, 1/2, 2, 1.5, 5) 325s ***** error ... 325s betarnd (2, 1/2 * ones (2), 3) 325s ***** error ... 325s betarnd (2, 1/2 * ones (2), [3, 2]) 325s ***** error ... 325s betarnd (2, 1/2 * ones (2), 3, 2) 325s ***** error ... 325s betarnd (2 * ones (2), 1/2, 3) 325s ***** error ... 325s betarnd (2 * ones (2), 1/2, [3, 2]) 325s ***** error ... 325s betarnd (2 * ones (2), 1/2, 3, 2) 325s 40 tests, 40 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/exppdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/exppdf.m 325s ***** demo 325s ## Plot various PDFs from the exponential distribution 325s x = 0:0.01:5; 325s y1 = exppdf (x, 2/3); 325s y2 = exppdf (x, 1.0); 325s y3 = exppdf (x, 2.0); 325s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 325s grid on 325s ylim ([0, 1.5]) 325s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 325s title ("Exponential PDF") 325s xlabel ("values in x") 325s ylabel ("density") 325s ***** shared x,y 325s x = [-1 0 0.5 1 Inf]; 325s y = gampdf (x, 1, 2); 325s ***** assert (exppdf (x, 2*ones (1,5)), y) 325s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 325s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 325s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 325s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 325s ***** error exppdf () 325s ***** error exppdf (1,2,3) 325s ***** error ... 325s exppdf (ones (3), ones (2)) 325s ***** error ... 325s exppdf (ones (2), ones (3)) 325s ***** error exppdf (i, 2) 325s ***** error exppdf (2, i) 325s 11 tests, 11 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/bisainv.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bisainv.m 325s ***** demo 325s ## Plot various iCDFs from the Birnbaum-Saunders distribution 325s p = 0.001:0.001:0.999; 325s x1 = bisainv (p, 1, 0.5); 325s x2 = bisainv (p, 1, 1); 325s x3 = bisainv (p, 1, 2); 325s x4 = bisainv (p, 1, 5); 325s x5 = bisainv (p, 1, 10); 325s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 325s grid on 325s ylim ([0, 10]) 325s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 325s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 325s title ("Birnbaum-Saunders iCDF") 325s xlabel ("probability") 325s ylabel ("values in x") 325s ***** demo 325s ## Plot various iCDFs from the Birnbaum-Saunders distribution 325s p = 0.001:0.001:0.999; 325s x1 = bisainv (p, 1, 0.3); 325s x2 = bisainv (p, 2, 0.3); 325s x3 = bisainv (p, 1, 0.5); 325s x4 = bisainv (p, 3, 0.5); 325s x5 = bisainv (p, 5, 0.5); 325s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 325s grid on 325s ylim ([0, 10]) 325s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 325s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 325s title ("Birnbaum-Saunders iCDF") 325s xlabel ("probability") 325s ylabel ("values in x") 325s ***** shared p, y, f 325s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 325s p = [-1, 0, 1/4, 1/2, 1, 2]; 325s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 325s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 325s ***** assert (bisainv (p, 1, ones (1,6)), y) 325s ***** assert (bisainv (p, ones (1,6), 1), y) 325s ***** assert (bisainv (p, 1, 1), y) 325s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 325s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 325s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 325s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 325s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 325s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 325s ***** error bisainv () 325s ***** error bisainv (1) 325s ***** error bisainv (1, 2) 325s ***** error bisainv (1, 2, 3, 4) 325s ***** error ... 325s bisainv (ones (3), ones (2), ones(2)) 325s ***** error ... 325s bisainv (ones (2), ones (3), ones(2)) 325s ***** error ... 325s bisainv (ones (2), ones (2), ones(3)) 325s ***** error bisainv (i, 4, 3) 325s ***** error bisainv (1, i, 3) 325s ***** error bisainv (1, 4, i) 325s 20 tests, 20 passed, 0 known failure, 0 skipped 325s [inst/dist_fun/vmcdf.m] 325s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/vmcdf.m 325s ***** demo 325s ## Plot various CDFs from the von Mises distribution 325s x1 = [-pi:0.1:pi]; 325s p1 = vmcdf (x1, 0, 0.5); 325s p2 = vmcdf (x1, 0, 1); 325s p3 = vmcdf (x1, 0, 2); 325s p4 = vmcdf (x1, 0, 4); 325s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 325s grid on 325s xlim ([-pi, pi]) 325s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 325s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 325s title ("Von Mises CDF") 325s xlabel ("values in x") 325s ylabel ("probability") 325s ***** shared x, p0, p1 325s x = [-pi:pi/2:pi]; 325s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 325s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 325s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 325s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 326s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 326s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 326s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 326s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 326s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 326s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 326s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 326s ***** error vmcdf () 326s ***** error vmcdf (1) 326s ***** error vmcdf (1, 2) 326s ***** error vmcdf (1, 2, 3, "tail") 326s ***** error vmcdf (1, 2, 3, 4) 326s ***** error ... 326s vmcdf (ones (3), ones (2), ones (2)) 326s ***** error ... 326s vmcdf (ones (2), ones (3), ones (2)) 326s ***** error ... 326s vmcdf (ones (2), ones (2), ones (3)) 326s ***** error vmcdf (i, 2, 2) 326s ***** error vmcdf (2, i, 2) 326s ***** error vmcdf (2, 2, i) 326s 20 tests, 20 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/ncfcdf.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncfcdf.m 326s ***** demo 326s ## Plot various CDFs from the noncentral F distribution 326s x = 0:0.01:5; 326s p1 = ncfcdf (x, 2, 5, 1); 326s p2 = ncfcdf (x, 2, 5, 2); 326s p3 = ncfcdf (x, 5, 10, 1); 326s p4 = ncfcdf (x, 10, 20, 10); 326s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 326s grid on 326s xlim ([0, 5]) 326s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 326s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 326s "location", "southeast") 326s title ("Noncentral F CDF") 326s xlabel ("values in x") 326s ylabel ("probability") 326s ***** demo 326s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 326s ## same number of numerator and denominator degrees of freedom (5, 20) 326s 326s x = 0.01:0.1:10.01; 326s p1 = ncfcdf (x, 5, 20, 10); 326s p2 = fcdf (x, 5, 20); 326s plot (x, p1, "-", x, p2, "-"); 326s grid on 326s xlim ([0, 10]) 326s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 326s title ("Noncentral F vs F CDFs") 326s xlabel ("values in x") 326s ylabel ("probability") 326s ***** test 326s x = -2:0.1:2; 326s p = ncfcdf (x, 10, 1, 3); 326s assert (p([1:21]), zeros (1, 21), 1e-76); 326s assert (p(22), 0.004530737275319753, 1e-14); 326s assert (p(30), 0.255842099135669, 1e-14); 326s assert (p(41), 0.4379890998457305, 1e-14); 326s ***** test 326s p = ncfcdf (12, 10, 3, 2); 326s assert (p, 0.9582287900447416, 1e-14); 326s ***** test 326s p = ncfcdf (2, 3, 2, 1); 326s assert (p, 0.5731985522994989, 1e-14); 326s ***** test 326s p = ncfcdf (2, 3, 2, 1, "upper"); 326s assert (p, 0.4268014477004823, 1e-14); 326s ***** test 326s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 326s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 326s ***** error ncfcdf () 326s ***** error ncfcdf (1) 326s ***** error ncfcdf (1, 2) 326s ***** error ncfcdf (1, 2, 3) 326s ***** error ncfcdf (1, 2, 3, 4, "tail") 326s ***** error ncfcdf (1, 2, 3, 4, 5) 326s ***** error ... 326s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 326s ***** error ... 326s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 326s ***** error ... 326s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 326s ***** error ... 326s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 326s ***** error ncfcdf (i, 2, 2, 2) 326s ***** error ncfcdf (2, i, 2, 2) 326s ***** error ncfcdf (2, 2, i, 2) 326s ***** error ncfcdf (2, 2, 2, i) 326s 19 tests, 19 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/gamrnd.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gamrnd.m 326s ***** assert (size (gamrnd (1, 1)), [1 1]) 326s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 326s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 326s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 326s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 326s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 326s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 326s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 326s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 326s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 326s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 326s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 326s ***** assert (class (gamrnd (1, 1)), "double") 326s ***** assert (class (gamrnd (1, single (1))), "single") 326s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 326s ***** assert (class (gamrnd (single (1), 1)), "single") 326s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 326s ***** error gamrnd () 326s ***** error gamrnd (1) 326s ***** error ... 326s gamrnd (ones (3), ones (2)) 326s ***** error ... 326s gamrnd (ones (2), ones (3)) 326s ***** error gamrnd (i, 2, 3) 326s ***** error gamrnd (1, i, 3) 326s ***** error ... 326s gamrnd (1, 2, -1) 326s ***** error ... 326s gamrnd (1, 2, 1.2) 326s ***** error ... 326s gamrnd (1, 2, ones (2)) 326s ***** error ... 326s gamrnd (1, 2, [2 -1 2]) 326s ***** error ... 326s gamrnd (1, 2, [2 0 2.5]) 326s ***** error ... 326s gamrnd (1, 2, 2, -1, 5) 326s ***** error ... 326s gamrnd (1, 2, 2, 1.5, 5) 326s ***** error ... 326s gamrnd (2, ones (2), 3) 326s ***** error ... 326s gamrnd (2, ones (2), [3, 2]) 326s ***** error ... 326s gamrnd (2, ones (2), 3, 2) 326s 33 tests, 33 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/tlsrnd.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tlsrnd.m 326s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 326s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 326s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 326s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 326s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 326s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 326s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 326s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 326s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 326s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 326s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 326s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 326s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 326s ***** assert (class (tlsrnd (1, 2, 3)), "double") 326s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 326s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 326s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 326s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 326s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 326s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 326s ***** error tlsrnd () 326s ***** error tlsrnd (1) 326s ***** error tlsrnd (1, 2) 326s ***** error ... 326s tlsrnd (ones (3), ones (2), 1) 326s ***** error ... 326s tlsrnd (ones (2), 1, ones (3)) 326s ***** error ... 326s tlsrnd (1, ones (2), ones (3)) 326s ***** error tlsrnd (i, 2, 3) 326s ***** error tlsrnd (1, i, 3) 326s ***** error tlsrnd (1, 2, i) 326s ***** error ... 326s tlsrnd (1, 2, 3, -1) 326s ***** error ... 326s tlsrnd (1, 2, 3, 1.2) 326s ***** error ... 326s tlsrnd (1, 2, 3, ones (2)) 326s ***** error ... 326s tlsrnd (1, 2, 3, [2 -1 2]) 326s ***** error ... 326s tlsrnd (1, 2, 3, [2 0 2.5]) 326s ***** error ... 326s tlsrnd (ones (2), 2, 3, ones (2)) 326s ***** error ... 326s tlsrnd (1, 2, 3, 2, -1, 5) 326s ***** error ... 326s tlsrnd (1, 2, 3, 2, 1.5, 5) 326s ***** error ... 326s tlsrnd (ones (2,2), 2, 3, 3) 326s ***** error ... 326s tlsrnd (1, ones (2,2), 3, 3) 326s ***** error ... 326s tlsrnd (1, 2, ones (2,2), 3) 326s ***** error ... 326s tlsrnd (1, 2, ones (2,2), [3, 3]) 326s ***** error ... 326s tlsrnd (1, 2, ones (2,2), 2, 3) 326s 42 tests, 42 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/gprnd.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gprnd.m 326s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 326s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 326s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 326s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 326s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 326s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 326s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 326s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 326s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 326s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 326s ***** assert (size (gprnd (1,1,0)), [1, 1]) 326s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 326s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 326s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 326s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 326s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 326s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 326s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 326s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 326s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 326s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 326s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 326s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 326s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 326s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 326s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 326s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 326s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 326s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 326s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 326s ***** assert (class (gprnd (0, 1, 0)), "double") 326s ***** assert (class (gprnd (0, 1, single (0))), "single") 326s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 326s ***** assert (class (gprnd (0, single (1),0)), "single") 326s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 326s ***** assert (class (gprnd (single (0), 1, 0)), "single") 326s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 326s ***** error gprnd () 326s ***** error gprnd (1) 326s ***** error gprnd (1, 2) 326s ***** error ... 326s gprnd (ones (3), ones (2), ones (2)) 326s ***** error ... 326s gprnd (ones (2), ones (3), ones (2)) 326s ***** error ... 326s gprnd (ones (2), ones (2), ones (3)) 326s ***** error gprnd (i, 2, 3) 326s ***** error gprnd (1, i, 3) 326s ***** error gprnd (1, 2, i) 326s ***** error ... 326s gprnd (1, 2, 3, -1) 326s ***** error ... 326s gprnd (1, 2, 3, 1.2) 326s ***** error ... 326s gprnd (1, 2, 3, ones (2)) 326s ***** error ... 326s gprnd (1, 2, 3, [2 -1 2]) 326s ***** error ... 326s gprnd (1, 2, 3, [2 0 2.5]) 326s ***** error ... 326s gprnd (1, 2, 3, 2, -1, 5) 326s ***** error ... 326s gprnd (1, 2, 3, 2, 1.5, 5) 326s ***** error ... 326s gprnd (2, ones (2), 2, 3) 326s ***** error ... 326s gprnd (2, ones (2), 2, [3, 2]) 326s ***** error ... 326s gprnd (2, ones (2), 2, 3, 2) 326s 56 tests, 56 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/unifrnd.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unifrnd.m 326s ***** assert (size (unifrnd (1, 1)), [1 1]) 326s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 326s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 326s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 326s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 326s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 326s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 326s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 326s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 326s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 326s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 326s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 326s ***** assert (class (unifrnd (1, 1)), "double") 326s ***** assert (class (unifrnd (1, single (1))), "single") 326s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 326s ***** assert (class (unifrnd (single (1), 1)), "single") 326s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 326s ***** error unifrnd () 326s ***** error unifrnd (1) 326s ***** error ... 326s unifrnd (ones (3), ones (2)) 326s ***** error ... 326s unifrnd (ones (2), ones (3)) 326s ***** error unifrnd (i, 2, 3) 326s ***** error unifrnd (1, i, 3) 326s ***** error ... 326s unifrnd (1, 2, -1) 326s ***** error ... 326s unifrnd (1, 2, 1.2) 326s ***** error ... 326s unifrnd (1, 2, ones (2)) 326s ***** error ... 326s unifrnd (1, 2, [2 -1 2]) 326s ***** error ... 326s unifrnd (1, 2, [2 0 2.5]) 326s ***** error ... 326s unifrnd (1, 2, 2, -1, 5) 326s ***** error ... 326s unifrnd (1, 2, 2, 1.5, 5) 326s ***** error ... 326s unifrnd (2, ones (2), 3) 326s ***** error ... 326s unifrnd (2, ones (2), [3, 2]) 326s ***** error ... 326s unifrnd (2, ones (2), 3, 2) 326s 33 tests, 33 passed, 0 known failure, 0 skipped 326s [inst/dist_fun/nctinv.m] 326s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nctinv.m 326s ***** demo 326s ## Plot various iCDFs from the noncentral T distribution 326s p = 0.001:0.001:0.999; 326s x1 = nctinv (p, 1, 0); 326s x2 = nctinv (p, 4, 0); 326s x3 = nctinv (p, 1, 2); 326s x4 = nctinv (p, 4, 2); 326s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 326s grid on 326s ylim ([-5, 5]) 326s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 326s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 326s title ("Noncentral T iCDF") 326s xlabel ("probability") 326s ylabel ("values in x") 326s ***** demo 326s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 326s ## with the same number of degrees of freedom (10). 326s 326s p = 0.001:0.001:0.999; 326s x1 = nctinv (p, 10, 1); 326s x2 = tinv (p, 10); 326s plot (p, x1, "-", p, x2, "-"); 326s grid on 326s ylim ([-5, 5]) 326s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 326s title ("Noncentral T vs T quantile functions") 326s xlabel ("probability") 326s ylabel ("values in x") 326s ***** test 326s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 326s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 327s ***** test 327s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 327s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 327s ***** test 327s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 327s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 327s ***** test 327s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 327s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 328s ***** test 328s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 328s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 328s ***** test 328s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 328s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 329s ***** test 329s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 330s ***** error nctinv () 330s ***** error nctinv (1) 330s ***** error nctinv (1, 2) 330s ***** error ... 330s nctinv (ones (3), ones (2), ones (2)) 330s ***** error ... 330s nctinv (ones (2), ones (3), ones (2)) 331s ***** error ... 331s nctinv (ones (2), ones (2), ones (3)) 331s ***** error nctinv (i, 2, 2) 331s ***** error nctinv (2, i, 2) 331s ***** error nctinv (2, 2, i) 331s 16 tests, 16 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/laplaceinv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/laplaceinv.m 331s ***** demo 331s ## Plot various iCDFs from the Laplace distribution 331s p = 0.001:0.001:0.999; 331s x1 = cauchyinv (p, 0, 1); 331s x2 = cauchyinv (p, 0, 2); 331s x3 = cauchyinv (p, 0, 4); 331s x4 = cauchyinv (p, -5, 4); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 331s grid on 331s ylim ([-10, 10]) 331s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 331s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 331s title ("Laplace iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p, x 331s p = [-1 0 0.5 1 2]; 331s x = [NaN, -Inf, 0, Inf, NaN]; 331s ***** assert (laplaceinv (p, 0, 1), x) 331s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 331s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 331s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 331s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 331s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 331s ***** error laplaceinv () 331s ***** error laplaceinv (1) 331s ***** error ... 331s laplaceinv (1, 2) 331s ***** error laplaceinv (1, 2, 3, 4) 331s ***** error ... 331s laplaceinv (1, ones (2), ones (3)) 331s ***** error ... 331s laplaceinv (ones (2), 1, ones (3)) 331s ***** error ... 331s laplaceinv (ones (2), ones (3), 1) 331s ***** error laplaceinv (i, 2, 3) 331s ***** error laplaceinv (1, i, 3) 331s ***** error laplaceinv (1, 2, i) 331s 16 tests, 16 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/normrnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/normrnd.m 331s ***** assert (size (normrnd (1, 1)), [1 1]) 331s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 331s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 331s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 331s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 331s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 331s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 331s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 331s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 331s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 331s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 331s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 331s ***** assert (class (normrnd (1, 1)), "double") 331s ***** assert (class (normrnd (1, single (1))), "single") 331s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 331s ***** assert (class (normrnd (single (1), 1)), "single") 331s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 331s ***** error normrnd () 331s ***** error normrnd (1) 331s ***** error ... 331s normrnd (ones (3), ones (2)) 331s ***** error ... 331s normrnd (ones (2), ones (3)) 331s ***** error normrnd (i, 2, 3) 331s ***** error normrnd (1, i, 3) 331s ***** error ... 331s normrnd (1, 2, -1) 331s ***** error ... 331s normrnd (1, 2, 1.2) 331s ***** error ... 331s normrnd (1, 2, ones (2)) 331s ***** error ... 331s normrnd (1, 2, [2 -1 2]) 331s ***** error ... 331s normrnd (1, 2, [2 0 2.5]) 331s ***** error ... 331s normrnd (1, 2, 2, -1, 5) 331s ***** error ... 331s normrnd (1, 2, 2, 1.5, 5) 331s ***** error ... 331s normrnd (2, ones (2), 3) 331s ***** error ... 331s normrnd (2, ones (2), [3, 2]) 331s ***** error ... 331s normrnd (2, ones (2), 3, 2) 331s 33 tests, 33 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/geornd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/geornd.m 331s ***** assert (size (geornd (0.5)), [1, 1]) 331s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 331s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 331s ***** assert (size (geornd (0.5, 3)), [3, 3]) 331s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 331s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 331s ***** assert (class (geornd (0.5)), "double") 331s ***** assert (class (geornd (single (0.5))), "single") 331s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 331s ***** assert (class (geornd (single (0))), "single") 331s ***** assert (class (geornd (single (1))), "single") 331s ***** error geornd () 331s ***** error geornd (i) 331s ***** error ... 331s geornd (1, -1) 331s ***** error ... 331s geornd (1, 1.2) 331s ***** error ... 331s geornd (1, ones (2)) 331s ***** error ... 331s geornd (1, [2 -1 2]) 331s ***** error ... 331s geornd (1, [2 0 2.5]) 331s ***** error ... 331s geornd (ones (2), ones (2)) 331s ***** error ... 331s geornd (1, 2, -1, 5) 331s ***** error ... 331s geornd (1, 2, 1.5, 5) 331s ***** error geornd (ones (2,2), 3) 331s ***** error geornd (ones (2,2), [3, 2]) 331s ***** error geornd (ones (2,2), 2, 3) 331s 24 tests, 24 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/gevinv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gevinv.m 331s ***** demo 331s ## Plot various iCDFs from the generalized extreme value distribution 331s p = 0.001:0.001:0.999; 331s x1 = gevinv (p, 1, 1, 1); 331s x2 = gevinv (p, 0.5, 1, 1); 331s x3 = gevinv (p, 1, 1, 5); 331s x4 = gevinv (p, 1, 2, 5); 331s x5 = gevinv (p, 1, 5, 5); 331s x6 = gevinv (p, 1, 0.5, 5); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 331s p, x4, "-c", p, x5, "-m", p, x6, "-k") 331s grid on 331s ylim ([-1, 10]) 331s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 331s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 331s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 331s "location", "northwest") 331s title ("Generalized extreme value iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** test 331s p = 0.1:0.1:0.9; 331s k = 0; 331s sigma = 1; 331s mu = 0; 331s x = gevinv (p, k, sigma, mu); 331s c = gevcdf(x, k, sigma, mu); 331s assert (c, p, 0.001); 331s ***** test 331s p = 0.1:0.1:0.9; 331s k = 1; 331s sigma = 1; 331s mu = 0; 331s x = gevinv (p, k, sigma, mu); 331s c = gevcdf(x, k, sigma, mu); 331s assert (c, p, 0.001); 331s ***** test 331s p = 0.1:0.1:0.9; 331s k = 0.3; 331s sigma = 1; 331s mu = 0; 331s x = gevinv (p, k, sigma, mu); 331s c = gevcdf(x, k, sigma, mu); 331s assert (c, p, 0.001); 331s ***** error gevinv () 331s ***** error gevinv (1) 331s ***** error gevinv (1, 2) 331s ***** error gevinv (1, 2, 3) 331s ***** error ... 331s gevinv (ones (3), ones (2), ones(2), ones(2)) 331s ***** error ... 331s gevinv (ones (2), ones (3), ones(2), ones(2)) 331s ***** error ... 331s gevinv (ones (2), ones (2), ones(3), ones(2)) 331s ***** error ... 331s gevinv (ones (2), ones (2), ones(2), ones(3)) 331s ***** error gevinv (i, 2, 3, 4) 331s ***** error gevinv (1, i, 3, 4) 331s ***** error gevinv (1, 2, i, 4) 331s ***** error gevinv (1, 2, 3, i) 331s 15 tests, 15 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/nbincdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nbincdf.m 331s ***** demo 331s ## Plot various CDFs from the negative binomial distribution 331s x = 0:50; 331s p1 = nbincdf (x, 2, 0.15); 331s p2 = nbincdf (x, 5, 0.2); 331s p3 = nbincdf (x, 4, 0.4); 331s p4 = nbincdf (x, 10, 0.3); 331s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 331s grid on 331s xlim ([0, 40]) 331s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 331s "r = 10, ps = 0.3"}, "location", "southeast") 331s title ("Negative binomial CDF") 331s xlabel ("values in x (number of failures)") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [-1 0 1 2 Inf]; 331s y = [0 1/2 3/4 7/8 1]; 331s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 331s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 331s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 331s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 331s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 331s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 331s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 331s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 331s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 331s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 331s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 331s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 331s ***** error nbincdf () 331s ***** error nbincdf (1) 331s ***** error nbincdf (1, 2) 331s ***** error nbincdf (1, 2, 3, 4) 331s ***** error nbincdf (1, 2, 3, "some") 331s ***** error ... 331s nbincdf (ones (3), ones (2), ones (2)) 331s ***** error ... 331s nbincdf (ones (2), ones (3), ones (2)) 331s ***** error ... 331s nbincdf (ones (2), ones (2), ones (3)) 331s ***** error nbincdf (i, 2, 2) 331s ***** error nbincdf (2, i, 2) 331s ***** error nbincdf (2, 2, i) 331s 22 tests, 22 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/poisspdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/poisspdf.m 331s ***** demo 331s ## Plot various PDFs from the Poisson distribution 331s x = 0:20; 331s y1 = poisspdf (x, 1); 331s y2 = poisspdf (x, 4); 331s y3 = poisspdf (x, 10); 331s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 331s grid on 331s ylim ([0, 0.4]) 331s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 331s title ("Poisson PDF") 331s xlabel ("values in x (number of occurences)") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-1 0 1 2 Inf]; 331s y = [0, exp(-1)*[1 1 0.5], 0]; 331s ***** assert (poisspdf (x, ones (1,5)), y, eps) 331s ***** assert (poisspdf (x, 1), y, eps) 331s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 331s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 331s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 331s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 331s ***** error poisspdf () 331s ***** error poisspdf (1) 331s ***** error ... 331s poisspdf (ones (3), ones (2)) 331s ***** error ... 331s poisspdf (ones (2), ones (3)) 331s ***** error poisspdf (i, 2) 331s ***** error poisspdf (2, i) 331s 12 tests, 12 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/hnpdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hnpdf.m 331s ***** demo 331s ## Plot various PDFs from the half-normal distribution 331s x = 0:0.001:10; 331s y1 = hnpdf (x, 0, 1); 331s y2 = hnpdf (x, 0, 2); 331s y3 = hnpdf (x, 0, 3); 331s y4 = hnpdf (x, 0, 5); 331s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 331s grid on 331s xlim ([0, 10]) 331s ylim ([0, 0.9]) 331s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 331s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 331s title ("Half-normal PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s ***** demo 331s ## Plot half-normal against normal probability density function 331s x = -5:0.001:5; 331s y1 = hnpdf (x, 0, 1); 331s y2 = normpdf (x); 331s plot (x, y1, "-b", x, y2, "-g") 331s grid on 331s xlim ([-5, 5]) 331s ylim ([0, 0.9]) 331s legend ({"half-normal with μ = 0, σ = 1", ... 331s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 331s title ("Half-normal against standard normal PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-Inf, -1, 0, 1/2, 1, Inf]; 331s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 331s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 331s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 331s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 331s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 331s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 331s ***** error hnpdf () 331s ***** error hnpdf (1) 331s ***** error hnpdf (1, 2) 331s ***** error ... 331s hnpdf (1, ones (2), ones (3)) 331s ***** error ... 331s hnpdf (ones (2), 1, ones (3)) 331s ***** error ... 331s hnpdf (ones (2), ones (3), 1) 331s ***** error hnpdf (i, 2, 3) 331s ***** error hnpdf (1, i, 3) 331s ***** error hnpdf (1, 2, i) 331s 14 tests, 14 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/bisarnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bisarnd.m 331s ***** assert (size (bisarnd (1, 1)), [1 1]) 331s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 331s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 331s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 331s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 331s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 331s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 331s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 331s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 331s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 331s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 331s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 331s ***** assert (class (bisarnd (1, 1)), "double") 331s ***** assert (class (bisarnd (1, single (1))), "single") 331s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 331s ***** assert (class (bisarnd (single (1), 1)), "single") 331s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 331s ***** error bisarnd () 331s ***** error bisarnd (1) 331s ***** error ... 331s bisarnd (ones (3), ones (2)) 331s ***** error ... 331s bisarnd (ones (2), ones (3)) 331s ***** error bisarnd (i, 2, 3) 331s ***** error bisarnd (1, i, 3) 331s ***** error ... 331s bisarnd (1, 2, -1) 331s ***** error ... 331s bisarnd (1, 2, 1.2) 331s ***** error ... 331s bisarnd (1, 2, ones (2)) 331s ***** error ... 331s bisarnd (1, 2, [2 -1 2]) 331s ***** error ... 331s bisarnd (1, 2, [2 0 2.5]) 331s ***** error ... 331s bisarnd (1, 2, 2, -1, 5) 331s ***** error ... 331s bisarnd (1, 2, 2, 1.5, 5) 331s ***** error ... 331s bisarnd (2, ones (2), 3) 331s ***** error ... 331s bisarnd (2, ones (2), [3, 2]) 331s ***** error ... 331s bisarnd (2, ones (2), 3, 2) 331s 33 tests, 33 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/binoinv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/binoinv.m 331s ***** demo 331s ## Plot various iCDFs from the binomial distribution 331s p = 0.001:0.001:0.999; 331s x1 = binoinv (p, 20, 0.5); 331s x2 = binoinv (p, 20, 0.7); 331s x3 = binoinv (p, 40, 0.5); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 331s grid on 331s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 331s "n = 40, ps = 0.5"}, "location", "southeast") 331s title ("Binomial iCDF") 331s xlabel ("probability") 331s ylabel ("values in x (number of successes)") 331s ***** shared p 331s p = [-1 0 0.5 1 2]; 331s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 331s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 331s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 331s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 331s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 331s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 331s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 331s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 331s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 331s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 331s ***** shared x, tol 331s x = magic (3) + 1; 331s tol = 1; 331s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 331s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 331s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 331s ***** error binoinv () 331s ***** error binoinv (1) 331s ***** error binoinv (1,2) 331s ***** error binoinv (1,2,3,4) 331s ***** error ... 331s binoinv (ones (3), ones (2), ones (2)) 331s ***** error ... 331s binoinv (ones (2), ones (3), ones (2)) 331s ***** error ... 331s binoinv (ones (2), ones (2), ones (3)) 331s ***** error binoinv (i, 2, 2) 331s ***** error binoinv (2, i, 2) 331s ***** error binoinv (2, 2, i) 331s 23 tests, 23 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/hygecdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hygecdf.m 331s ***** demo 331s ## Plot various CDFs from the hypergeometric distribution 331s x = 0:60; 331s p1 = hygecdf (x, 500, 50, 100); 331s p2 = hygecdf (x, 500, 60, 200); 331s p3 = hygecdf (x, 500, 70, 300); 331s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 331s grid on 331s xlim ([0, 60]) 331s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 331s "m = 500, k = 70, n = 300"}, "location", "southeast") 331s title ("Hypergeometric CDF") 331s xlabel ("values in x (number of successes)") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [-1 0 1 2 3]; 331s y = [0 1/6 5/6 1 1]; 331s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 331s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 331s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 331s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 331s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 331s [y(5) NaN NaN NaN y(1)], 5*eps) 331s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 331s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 331s [y(5) NaN NaN NaN y(1)], 5*eps) 331s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 331s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 331s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 331s [y(5) NaN NaN NaN y(1)], 5*eps) 331s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 331s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 331s ***** test 331s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 331s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 331s ***** test 331s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 331s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 331s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 331s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 331s eps ("single")) 331s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 331s eps ("single")) 331s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 331s eps ("single")) 331s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 331s eps ("single")) 331s ***** error hygecdf () 331s ***** error hygecdf (1) 331s ***** error hygecdf (1,2) 331s ***** error hygecdf (1,2,3) 331s ***** error hygecdf (1,2,3,4,5) 331s ***** error hygecdf (1,2,3,4,"uper") 331s ***** error ... 331s hygecdf (ones (2), ones (3), 1, 1) 331s ***** error ... 331s hygecdf (1, ones (2), ones (3), 1) 331s ***** error ... 331s hygecdf (1, 1, ones (2), ones (3)) 331s ***** error hygecdf (i, 2, 2, 2) 331s ***** error hygecdf (2, i, 2, 2) 331s ***** error hygecdf (2, 2, i, 2) 331s ***** error hygecdf (2, 2, 2, i) 331s 32 tests, 32 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/loglpdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/loglpdf.m 331s ***** demo 331s ## Plot various PDFs from the log-logistic distribution 331s x = 0.001:0.001:2; 331s y1 = loglpdf (x, log (1), 1/0.5); 331s y2 = loglpdf (x, log (1), 1); 331s y3 = loglpdf (x, log (1), 1/2); 331s y4 = loglpdf (x, log (1), 1/4); 331s y5 = loglpdf (x, log (1), 1/8); 331s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 331s grid on 331s ylim ([0,3]) 331s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 331s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 331s title ("Log-logistic PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 331s ***** shared out1, out2 331s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 331s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 331s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 331s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 331s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 331s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 331s ***** assert (class (loglpdf (1, single (2), 3)), "single") 331s ***** assert (class (loglpdf (1, 2, single (3))), "single") 331s ***** error loglpdf (1) 331s ***** error loglpdf (1, 2) 331s ***** error ... 331s loglpdf (1, ones (2), ones (3)) 331s ***** error ... 331s loglpdf (ones (2), 1, ones (3)) 331s ***** error ... 331s loglpdf (ones (2), ones (3), 1) 331s ***** error loglpdf (i, 2, 3) 331s ***** error loglpdf (1, i, 3) 331s ***** error loglpdf (1, 2, i) 331s 14 tests, 14 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/wienrnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wienrnd.m 331s ***** error wienrnd (0) 331s ***** error wienrnd (1, 3, -50) 331s ***** error wienrnd (5, 0) 331s ***** error wienrnd (0.4, 3, 5) 331s ***** error wienrnd ([1 4], 3, 5) 331s 5 tests, 5 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/geocdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/geocdf.m 331s ***** demo 331s ## Plot various CDFs from the geometric distribution 331s x = 0:10; 331s p1 = geocdf (x, 0.2); 331s p2 = geocdf (x, 0.5); 331s p3 = geocdf (x, 0.7); 331s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 331s grid on 331s xlim ([0, 10]) 331s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 331s title ("Geometric CDF") 331s xlabel ("values in x (number of failures)") 331s ylabel ("probability") 331s ***** test 331s p = geocdf ([1, 2, 3, 4], 0.25); 331s assert (p(1), 0.4375000000, 1e-14); 331s assert (p(2), 0.5781250000, 1e-14); 331s assert (p(3), 0.6835937500, 1e-14); 331s assert (p(4), 0.7626953125, 1e-14); 331s ***** test 331s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 331s assert (p(1), 0.5625000000, 1e-14); 331s assert (p(2), 0.4218750000, 1e-14); 331s assert (p(3), 0.3164062500, 1e-14); 331s assert (p(4), 0.2373046875, 1e-14); 331s ***** shared x, p 331s x = [-1 0 1 Inf]; 331s p = [0 0.5 0.75 1]; 331s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 331s ***** assert (geocdf (x, 0.5), p) 331s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 331s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 331s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 331s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 331s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 331s ***** error geocdf () 331s ***** error geocdf (1) 331s ***** error ... 331s geocdf (ones (3), ones (2)) 331s ***** error ... 331s geocdf (ones (2), ones (3)) 331s ***** error geocdf (i, 2) 331s ***** error geocdf (2, i) 331s ***** error geocdf (2, 3, "tail") 331s ***** error geocdf (2, 3, 5) 331s 17 tests, 17 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/finv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/finv.m 331s ***** demo 331s ## Plot various iCDFs from the F distribution 331s p = 0.001:0.001:0.999; 331s x1 = finv (p, 1, 1); 331s x2 = finv (p, 2, 1); 331s x3 = finv (p, 5, 2); 331s x4 = finv (p, 10, 1); 331s x5 = finv (p, 100, 100); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 331s grid on 331s ylim ([0, 4]) 331s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 331s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 331s "df1 = 100, df2 = 100"}, "location", "northwest") 331s title ("F iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p 331s p = [-1 0 0.5 1 2]; 331s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 331s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 331s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 331s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 331s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 331s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 331s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 331s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 331s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 331s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 331s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 331s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 331s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 331s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 331s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 331s ***** error finv () 331s ***** error finv (1) 331s ***** error finv (1,2) 331s ***** error ... 331s finv (ones (3), ones (2), ones (2)) 331s ***** error ... 331s finv (ones (2), ones (3), ones (2)) 331s ***** error ... 331s finv (ones (2), ones (2), ones (3)) 331s ***** error finv (i, 2, 2) 331s ***** error finv (2, i, 2) 331s ***** error finv (2, 2, i) 331s 24 tests, 24 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/evpdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/evpdf.m 331s ***** demo 331s ## Plot various PDFs from the Extreme value distribution 331s x = -10:0.001:10; 331s y1 = evpdf (x, 0.5, 2); 331s y2 = evpdf (x, 1.0, 2); 331s y3 = evpdf (x, 1.5, 3); 331s y4 = evpdf (x, 3.0, 4); 331s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 331s grid on 331s ylim ([0, 0.2]) 331s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 331s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 331s title ("Extreme value PDF") 331s xlabel ("values in x") 331s ylabel ("density") 331s ***** shared x, y0, y1 331s x = [-5, 0, 1, 2, 3]; 331s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 331s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 331s ***** assert (evpdf (x), y0, 1e-4) 331s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 331s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 331s ***** error evpdf () 331s ***** error ... 331s evpdf (ones (3), ones (2), ones (2)) 331s ***** error evpdf (i, 2, 2) 331s ***** error evpdf (2, i, 2) 331s ***** error evpdf (2, 2, i) 331s 8 tests, 8 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/chi2inv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/chi2inv.m 331s ***** demo 331s ## Plot various iCDFs from the chi-squared distribution 331s p = 0.001:0.001:0.999; 331s x1 = chi2inv (p, 1); 331s x2 = chi2inv (p, 2); 331s x3 = chi2inv (p, 3); 331s x4 = chi2inv (p, 4); 331s x5 = chi2inv (p, 6); 331s x6 = chi2inv (p, 9); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 331s p, x4, "-c", p, x5, "-m", p, x6, "-y") 331s grid on 331s ylim ([0, 8]) 331s legend ({"df = 1", "df = 2", "df = 3", ... 331s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 331s title ("Chi-squared iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p 331s p = [-1 0 0.3934693402873666 1 2]; 331s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 331s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 331s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 331s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 331s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 331s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 331s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 331s ***** error chi2inv () 331s ***** error chi2inv (1) 331s ***** error chi2inv (1,2,3) 331s ***** error ... 331s chi2inv (ones (3), ones (2)) 331s ***** error ... 331s chi2inv (ones (2), ones (3)) 331s ***** error chi2inv (i, 2) 331s ***** error chi2inv (2, i) 331s 14 tests, 14 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/expinv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/expinv.m 331s ***** demo 331s ## Plot various iCDFs from the exponential distribution 331s p = 0.001:0.001:0.999; 331s x1 = expinv (p, 2/3); 331s x2 = expinv (p, 1.0); 331s x3 = expinv (p, 2.0); 331s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 331s grid on 331s ylim ([0, 5]) 331s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 331s title ("Exponential iCDF") 331s xlabel ("probability") 331s ylabel ("values in x") 331s ***** shared p 331s p = [-1 0 0.3934693402873666 1 2]; 331s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 331s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 331s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 331s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 331s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 331s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 331s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 331s ***** error expinv () 331s ***** error expinv (1, 2 ,3 ,4 ,5) 331s ***** error ... 331s expinv (ones (3), ones (2)) 331s ***** error ... 331s expinv (2, 3, [1, 2]) 331s ***** error ... 331s [x, xlo, xup] = expinv (1, 2) 331s ***** error [x, xlo, xup] = ... 331s expinv (1, 2, 3, 0) 331s ***** error [x, xlo, xup] = ... 331s expinv (1, 2, 3, 1.22) 331s ***** error [x, xlo, xup] = ... 331s expinv (1, 2, 3, [0.05, 0.1]) 331s ***** error expinv (i, 2) 331s ***** error expinv (2, i) 331s ***** error ... 331s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 331s 18 tests, 18 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/unifcdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unifcdf.m 331s ***** demo 331s ## Plot various CDFs from the continuous uniform distribution 331s x = 0:0.1:10; 331s p1 = unifcdf (x, 2, 5); 331s p2 = unifcdf (x, 3, 9); 331s plot (x, p1, "-b", x, p2, "-g") 331s grid on 331s xlim ([0, 10]) 331s ylim ([0, 1]) 331s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 331s title ("Continuous uniform CDF") 331s xlabel ("values in x") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [-1 0 0.5 1 2] + 1; 331s y = [0 0 0.5 1 1]; 331s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 331s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 331s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 331s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 331s ***** assert (unifcdf (x, ones (1,5), 2), y) 331s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 331s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 331s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 331s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 331s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 331s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 331s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 331s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 331s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 331s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 331s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 331s ***** error unifcdf () 331s ***** error unifcdf (1) 331s ***** error unifcdf (1, 2) 331s ***** error unifcdf (1, 2, 3, 4) 331s ***** error unifcdf (1, 2, 3, "tail") 331s ***** error ... 331s unifcdf (ones (3), ones (2), ones (2)) 331s ***** error ... 331s unifcdf (ones (2), ones (3), ones (2)) 331s ***** error ... 331s unifcdf (ones (2), ones (2), ones (3)) 331s ***** error unifcdf (i, 2, 2) 331s ***** error unifcdf (2, i, 2) 331s ***** error unifcdf (2, 2, i) 331s 27 tests, 27 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/ncx2rnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncx2rnd.m 331s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 331s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 331s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 331s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 331s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 331s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 331s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 331s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 331s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 331s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 331s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 331s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 331s ***** assert (class (ncx2rnd (1, 1)), "double") 331s ***** assert (class (ncx2rnd (1, single (1))), "single") 331s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 331s ***** assert (class (ncx2rnd (single (1), 1)), "single") 331s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 331s ***** error ncx2rnd () 331s ***** error ncx2rnd (1) 331s ***** error ... 331s ncx2rnd (ones (3), ones (2)) 331s ***** error ... 331s ncx2rnd (ones (2), ones (3)) 331s ***** error ncx2rnd (i, 2) 331s ***** error ncx2rnd (1, i) 331s ***** error ... 331s ncx2rnd (1, 2, -1) 331s ***** error ... 331s ncx2rnd (1, 2, 1.2) 331s ***** error ... 331s ncx2rnd (1, 2, ones (2)) 331s ***** error ... 331s ncx2rnd (1, 2, [2 -1 2]) 331s ***** error ... 331s ncx2rnd (1, 2, [2 0 2.5]) 331s ***** error ... 331s ncx2rnd (1, 2, 2, -1, 5) 331s ***** error ... 331s ncx2rnd (1, 2, 2, 1.5, 5) 331s ***** error ... 331s ncx2rnd (2, ones (2), 3) 331s ***** error ... 331s ncx2rnd (2, ones (2), [3, 2]) 331s ***** error ... 331s ncx2rnd (2, ones (2), 3, 2) 331s 33 tests, 33 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/chi2rnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/chi2rnd.m 331s ***** assert (size (chi2rnd (2)), [1, 1]) 331s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 331s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 331s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 331s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 331s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 331s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 331s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 331s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 331s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 331s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 331s ***** assert (class (chi2rnd (2)), "double") 331s ***** assert (class (chi2rnd (single (2))), "single") 331s ***** assert (class (chi2rnd (single ([2 2]))), "single") 331s ***** error chi2rnd () 331s ***** error chi2rnd (i) 331s ***** error ... 331s chi2rnd (1, -1) 331s ***** error ... 331s chi2rnd (1, 1.2) 331s ***** error ... 331s chi2rnd (1, ones (2)) 331s ***** error ... 331s chi2rnd (1, [2 -1 2]) 331s ***** error ... 331s chi2rnd (1, [2 0 2.5]) 331s ***** error ... 331s chi2rnd (ones (2), ones (2)) 331s ***** error ... 331s chi2rnd (1, 2, -1, 5) 331s ***** error ... 331s chi2rnd (1, 2, 1.5, 5) 331s ***** error chi2rnd (ones (2,2), 3) 331s ***** error chi2rnd (ones (2,2), [3, 2]) 331s ***** error chi2rnd (ones (2,2), 2, 3) 331s 27 tests, 27 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/nakapdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/nbininv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nbininv.m 331s ***** demo 331s ## Plot various iCDFs from the negative binomial distribution 331s p = 0.001:0.001:0.999; 331s x1 = nbininv (p, 2, 0.15); 331s x2 = nbininv (p, 5, 0.2); 331s x3 = nbininv (p, 4, 0.4); 331s x4 = nbininv (p, 10, 0.3); 331s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 331s grid on 331s ylim ([0, 40]) 331s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 331s "r = 10, ps = 0.3"}, "location", "northwest") 331s title ("Negative binomial iCDF") 331s xlabel ("probability") 331s ylabel ("values in x (number of failures)") 331s ***** shared p 331s p = [-1 0 3/4 1 2]; 331s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 331s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 331s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 331s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 331s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 331s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 331s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 331s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 331s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 331s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 331s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 331s ***** shared y, tol 331s y = magic (3) + 1; 331s tol = 1; 331s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 331s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 331s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 331s ***** error nbininv () 331s ***** error nbininv (1) 331s ***** error nbininv (1, 2) 331s ***** error ... 331s nbininv (ones (3), ones (2), ones (2)) 331s ***** error ... 331s nbininv (ones (2), ones (3), ones (2)) 331s ***** error ... 331s nbininv (ones (2), ones (2), ones (3)) 331s ***** error nbininv (i, 2, 2) 331s ***** error nbininv (2, i, 2) 331s ***** error nbininv (2, 2, i) 331s 23 tests, 23 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/nbinpdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nbinpdf.m 331s ***** demo 331s ## Plot various PDFs from the negative binomial distribution 331s x = 0:40; 331s y1 = nbinpdf (x, 2, 0.15); 331s y2 = nbinpdf (x, 5, 0.2); 331s y3 = nbinpdf (x, 4, 0.4); 331s y4 = nbinpdf (x, 10, 0.3); 331s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 331s grid on 331s xlim ([0, 40]) 331s ylim ([0, 0.12]) 331s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 331s "r = 10, ps = 0.3"}, "location", "northeast") 331s title ("Negative binomial PDF") 331s xlabel ("values in x (number of failures)") 331s ylabel ("density") 331s ***** shared x, y 331s x = [-1 0 1 2 Inf]; 331s y = [0 1/2 1/4 1/8 NaN]; 331s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 331s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 331s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 331s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 331s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 331s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 331s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 331s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 331s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 331s ***** error nbinpdf () 331s ***** error nbinpdf (1) 331s ***** error nbinpdf (1, 2) 331s ***** error ... 331s nbinpdf (ones (3), ones (2), ones (2)) 331s ***** error ... 331s nbinpdf (ones (2), ones (3), ones (2)) 331s ***** error ... 331s nbinpdf (ones (2), ones (2), ones (3)) 331s ***** error nbinpdf (i, 2, 2) 331s ***** error nbinpdf (2, i, 2) 331s ***** error nbinpdf (2, 2, i) 331s 18 tests, 18 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/poisscdf.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/poisscdf.m 331s ***** demo 331s ## Plot various CDFs from the Poisson distribution 331s x = 0:20; 331s p1 = poisscdf (x, 1); 331s p2 = poisscdf (x, 4); 331s p3 = poisscdf (x, 10); 331s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 331s grid on 331s ylim ([0, 1]) 331s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 331s title ("Poisson CDF") 331s xlabel ("values in x (number of occurences)") 331s ylabel ("probability") 331s ***** shared x, y 331s x = [-1 0 1 2 Inf]; 331s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 331s ***** assert (poisscdf (x, ones (1,5)), y) 331s ***** assert (poisscdf (x, 1), y) 331s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 331s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 331s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 331s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 331s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 331s ***** error poisscdf () 331s ***** error poisscdf (1) 331s ***** error poisscdf (1, 2, 3) 331s ***** error poisscdf (1, 2, "tail") 331s ***** error ... 331s poisscdf (ones (3), ones (2)) 331s ***** error ... 331s poisscdf (ones (2), ones (3)) 331s ***** error poisscdf (i, 2) 331s ***** error poisscdf (2, i) 331s 15 tests, 15 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/trirnd.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/trirnd.m 331s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 331s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 331s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 331s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 331s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 331s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 331s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 331s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 331s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 331s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 331s ***** assert (class (trirnd (1, 1.5, 2)), "double") 331s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 331s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 331s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 331s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 331s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 331s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 331s ***** error trirnd () 331s ***** error trirnd (1) 331s ***** error trirnd (1, 2) 331s ***** error ... 331s trirnd (ones (3), 5 * ones (2), ones (2)) 331s ***** error ... 331s trirnd (ones (2), 5 * ones (3), ones (2)) 331s ***** error ... 331s trirnd (ones (2), 5 * ones (2), ones (3)) 331s ***** error trirnd (i, 5, 3) 331s ***** error trirnd (1, 5+i, 3) 331s ***** error trirnd (1, 5, i) 331s ***** error ... 331s trirnd (1, 5, 3, -1) 331s ***** error ... 331s trirnd (1, 5, 3, 1.2) 331s ***** error ... 331s trirnd (1, 5, 3, ones (2)) 331s ***** error ... 331s trirnd (1, 5, 3, [2 -1 2]) 331s ***** error ... 331s trirnd (1, 5, 3, [2 0 2.5]) 331s ***** error ... 331s trirnd (1, 5, 3, 2, -1, 5) 331s ***** error ... 331s trirnd (1, 5, 3, 2, 1.5, 5) 331s ***** error ... 331s trirnd (2, 5 * ones (2), 2, 3) 331s ***** error ... 331s trirnd (2, 5 * ones (2), 2, [3, 2]) 331s ***** error ... 331s trirnd (2, 5 * ones (2), 2, 3, 2) 331s 36 tests, 36 passed, 0 known failure, 0 skipped 331s [inst/dist_fun/wblinv.m] 331s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wblinv.m 331s ***** demo 331s ## Plot various iCDFs from the Weibull distribution 331s p = 0.001:0.001:0.999; 331s x1 = wblinv (p, 1, 0.5); 331s x2 = wblinv (p, 1, 1); 331s x3 = wblinv (p, 1, 1.5); 331s x4 = wblinv (p, 1, 5); 331s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 331s ylim ([0, 2.5]) 331s grid on 331s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 331s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 331s title ("Weibull iCDF") 331s xlabel ("probability") 331s ylabel ("x") 331s ***** shared p 331s p = [-1 0 0.63212055882855778 1 2]; 331s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 331s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 331s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 331s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 331s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 331s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 331s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 331s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 331s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 331s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 331s ***** error wblinv () 331s ***** error wblinv (1,2,3,4) 331s ***** error ... 331s wblinv (ones (3), ones (2), ones (2)) 331s ***** error ... 331s wblinv (ones (2), ones (3), ones (2)) 331s ***** error ... 331s wblinv (ones (2), ones (2), ones (3)) 331s ***** error wblinv (i, 2, 2) 331s ***** error wblinv (2, i, 2) 332s ***** error wblinv (2, 2, i) 332s 18 tests, 18 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/burrcdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/burrcdf.m 332s ***** demo 332s ## Plot various CDFs from the Burr type XII distribution 332s x = 0.001:0.001:5; 332s p1 = burrcdf (x, 1, 1, 1); 332s p2 = burrcdf (x, 1, 1, 2); 332s p3 = burrcdf (x, 1, 1, 3); 332s p4 = burrcdf (x, 1, 2, 1); 332s p5 = burrcdf (x, 1, 3, 1); 332s p6 = burrcdf (x, 1, 0.5, 2); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 332s x, p4, "-c", x, p5, "-m", x, p6, "-k") 332s grid on 332s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 332s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 332s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 332s "location", "southeast") 332s title ("Burr type XII CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, y 332s x = [-1, 0, 1, 2, Inf]; 332s y = [0, 0, 1/2, 2/3, 1]; 332s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 332s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 332s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 332s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 332s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 332s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 332s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 332s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 332s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 332s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 332s ***** error burrcdf () 332s ***** error burrcdf (1) 332s ***** error burrcdf (1, 2) 332s ***** error burrcdf (1, 2, 3) 332s ***** error ... 332s burrcdf (1, 2, 3, 4, 5, 6) 332s ***** error burrcdf (1, 2, 3, 4, "tail") 332s ***** error burrcdf (1, 2, 3, 4, 5) 332s ***** error ... 332s burrcdf (ones (3), ones (2), ones(2), ones(2)) 332s ***** error ... 332s burrcdf (ones (2), ones (3), ones(2), ones(2)) 332s ***** error ... 332s burrcdf (ones (2), ones (2), ones(3), ones(2)) 332s ***** error ... 332s burrcdf (ones (2), ones (2), ones(2), ones(3)) 332s ***** error burrcdf (i, 2, 3, 4) 332s ***** error burrcdf (1, i, 3, 4) 332s ***** error burrcdf (1, 2, i, 4) 332s ***** error burrcdf (1, 2, 3, i) 332s 25 tests, 25 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/wblcdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wblcdf.m 332s ***** demo 332s ## Plot various CDFs from the Weibull distribution 332s x = 0:0.001:2.5; 332s p1 = wblcdf (x, 1, 0.5); 332s p2 = wblcdf (x, 1, 1); 332s p3 = wblcdf (x, 1, 1.5); 332s p4 = wblcdf (x, 1, 5); 332s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 332s grid on 332s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 332s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 332s title ("Weibull CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, y 332s x = [-1 0 0.5 1 Inf]; 332s y = [0, 1-exp(-x(2:4)), 1]; 332s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 332s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 332s ***** assert (wblcdf (x, "upper"), 1 - y) 332s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 332s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 332s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 332s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 332s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 332s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 332s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 332s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 332s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 332s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 332s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 332s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 332s ***** error wblcdf () 332s ***** error wblcdf (1,2,3,4,5,6,7) 332s ***** error wblcdf (1, 2, 3, 4, "uper") 332s ***** error ... 332s wblcdf (ones (3), ones (2), ones (2)) 332s ***** error wblcdf (2, 3, 4, [1, 2]) 332s ***** error ... 332s [p, plo, pup] = wblcdf (1, 2, 3) 332s ***** error [p, plo, pup] = ... 332s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 332s ***** error [p, plo, pup] = ... 332s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 332s ***** error [p, plo, pup] = ... 332s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 332s ***** error wblcdf (i, 2, 2) 332s ***** error wblcdf (2, i, 2) 332s ***** error wblcdf (2, 2, i) 332s ***** error ... 332s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 332s 28 tests, 28 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/ncfrnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncfrnd.m 332s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 332s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 332s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 332s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 332s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 332s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 332s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 332s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 332s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 332s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 332s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 332s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 332s ***** assert (class (ncfrnd (1, 1, 1)), "double") 332s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 332s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 332s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 332s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 332s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 332s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 332s ***** error ncfrnd () 332s ***** error ncfrnd (1) 332s ***** error ncfrnd (1, 2) 332s ***** error ... 332s ncfrnd (ones (3), ones (2), ones (2)) 332s ***** error ... 332s ncfrnd (ones (2), ones (3), ones (2)) 332s ***** error ... 332s ncfrnd (ones (2), ones (2), ones (3)) 332s ***** error ncfrnd (i, 2, 3) 332s ***** error ncfrnd (1, i, 3) 332s ***** error ncfrnd (1, 2, i) 332s ***** error ... 332s ncfrnd (1, 2, 3, -1) 332s ***** error ... 332s ncfrnd (1, 2, 3, 1.2) 332s ***** error ... 332s ncfrnd (1, 2, 3, ones (2)) 332s ***** error ... 332s ncfrnd (1, 2, 3, [2 -1 2]) 332s ***** error ... 332s ncfrnd (1, 2, 3, [2 0 2.5]) 332s ***** error ... 332s ncfrnd (1, 2, 3, 2, -1, 5) 332s ***** error ... 332s ncfrnd (1, 2, 3, 2, 1.5, 5) 332s ***** error ... 332s ncfrnd (2, ones (2), 2, 3) 332s ***** error ... 332s ncfrnd (2, ones (2), 2, [3, 2]) 332s ***** error ... 332s ncfrnd (2, ones (2), 2, 3, 2) 332s 38 tests, 38 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/gaminv.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gaminv.m 332s ***** demo 332s ## Plot various iCDFs from the Gamma distribution 332s p = 0.001:0.001:0.999; 332s x1 = gaminv (p, 1, 2); 332s x2 = gaminv (p, 2, 2); 332s x3 = gaminv (p, 3, 2); 332s x4 = gaminv (p, 5, 1); 332s x5 = gaminv (p, 9, 0.5); 332s x6 = gaminv (p, 7.5, 1); 332s x7 = gaminv (p, 0.5, 1); 332s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 332s p, x5, "-k", p, x6, "-b", p, x7, "-c") 332s ylim ([0, 20]) 332s grid on 332s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 332s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 332s "α = 0.5, β = 1"}, "location", "northwest") 332s title ("Gamma iCDF") 332s xlabel ("probability") 332s ylabel ("x") 332s ***** shared p 332s p = [-1 0 0.63212055882855778 1 2]; 332s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 332s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 332s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 332s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 332s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 332s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 332s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 332s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 332s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 332s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 332s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 332s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 332s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 332s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 332s eps ("single")) 332s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 332s eps ("single")) 332s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 332s eps ("single")) 332s ***** error gaminv () 332s ***** error gaminv (1) 332s ***** error gaminv (1,2) 332s ***** error ... 332s gaminv (ones (3), ones (2), ones (2)) 332s ***** error ... 332s gaminv (ones (2), ones (3), ones (2)) 332s ***** error ... 332s gaminv (ones (2), ones (2), ones (3)) 332s ***** error gaminv (i, 2, 2) 332s ***** error gaminv (2, i, 2) 332s ***** error gaminv (2, 2, i) 332s 25 tests, 25 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/evcdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/logirnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logirnd.m 332s ***** assert (size (logirnd (1, 1)), [1 1]) 332s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 332s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 332s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 332s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 332s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 332s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 332s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 332s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 332s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 332s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 332s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 332s ***** assert (class (logirnd (1, 1)), "double") 332s ***** assert (class (logirnd (1, single (1))), "single") 332s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 332s ***** assert (class (logirnd (single (1), 1)), "single") 332s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 332s ***** error logirnd () 332s ***** error logirnd (1) 332s ***** error ... 332s logirnd (ones (3), ones (2)) 332s ***** error ... 332s logirnd (ones (2), ones (3)) 332s ***** error logirnd (i, 2, 3) 332s ***** error logirnd (1, i, 3) 332s ***** error ... 332s logirnd (1, 2, -1) 332s ***** error ... 332s logirnd (1, 2, 1.2) 332s ***** error ... 332s logirnd (1, 2, ones (2)) 332s ***** error ... 332s logirnd (1, 2, [2 -1 2]) 332s ***** error ... 332s logirnd (1, 2, [2 0 2.5]) 332s ***** error ... 332s logirnd (1, 2, 2, -1, 5) 332s ***** error ... 332s logirnd (1, 2, 2, 1.5, 5) 332s ***** error ... 332s logirnd (2, ones (2), 3) 332s ***** error ... 332s logirnd (2, ones (2), [3, 2]) 332s ***** error ... 332s logirnd (2, ones (2), 3, 2) 332s 33 tests, 33 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/gevrnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gevrnd.m 332s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 332s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 332s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 332s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 332s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 332s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 332s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 332s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 332s ***** assert (class (gevrnd (1,1,1)), "double") 332s ***** assert (class (gevrnd (single (1),1,1)), "single") 332s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 332s ***** assert (class (gevrnd (1,single (1),1)), "single") 332s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 332s ***** assert (class (gevrnd (1,1,single (1))), "single") 332s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 332s ***** error gevrnd () 332s ***** error gevrnd (1) 332s ***** error gevrnd (1, 2) 332s ***** error ... 332s gevrnd (ones (3), ones (2), ones (2)) 332s ***** error ... 332s gevrnd (ones (2), ones (3), ones (2)) 332s ***** error ... 332s gevrnd (ones (2), ones (2), ones (3)) 332s ***** error gevrnd (i, 2, 3) 332s ***** error gevrnd (1, i, 3) 332s ***** error gevrnd (1, 2, i) 332s ***** error ... 332s gevrnd (1, 2, 3, -1) 332s ***** error ... 332s gevrnd (1, 2, 3, 1.2) 332s ***** error ... 332s gevrnd (1, 2, 3, ones (2)) 332s ***** error ... 332s gevrnd (1, 2, 3, [2 -1 2]) 332s ***** error ... 332s gevrnd (1, 2, 3, [2 0 2.5]) 332s ***** error ... 332s gevrnd (1, 2, 3, 2, -1, 5) 332s ***** error ... 332s gevrnd (1, 2, 3, 2, 1.5, 5) 332s ***** error ... 332s gevrnd (2, ones (2), 2, 3) 332s ***** error ... 332s gevrnd (2, ones (2), 2, [3, 2]) 332s ***** error ... 332s gevrnd (2, ones (2), 2, 3, 2) 332s 34 tests, 34 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/hnrnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/betainv.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/mvnrnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvnrnd.m 332s ***** error mvnrnd () 332s ***** error mvnrnd ([2, 3, 4]) 332s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 332s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 332s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 332s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 332s 6 tests, 6 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/gppdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gppdf.m 332s ***** demo 332s ## Plot various PDFs from the generalized Pareto distribution 332s x = 0:0.001:5; 332s y1 = gppdf (x, 1, 1, 0); 332s y2 = gppdf (x, 5, 1, 0); 332s y3 = gppdf (x, 20, 1, 0); 332s y4 = gppdf (x, 1, 2, 0); 332s y5 = gppdf (x, 5, 2, 0); 332s y6 = gppdf (x, 20, 2, 0); 332s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 332s x, y4, "-c", x, y5, "-m", x, y6, "-k") 332s grid on 332s xlim ([0, 5]) 332s ylim ([0, 1]) 332s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 332s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 332s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 332s "location", "northeast") 332s title ("Generalized Pareto PDF") 332s xlabel ("values in x") 332s ylabel ("density") 332s ***** shared x, y1, y2, y3 332s x = [-Inf, -1, 0, 1/2, 1, Inf]; 332s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 332s y2 = [0, 0, 1, 4/9, 1/4, 0]; 332s y3 = [0, 0, 1, 1, 1, 0]; 332s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 332s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 332s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 332s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 332s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 332s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 332s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 332s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 332s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 332s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 332s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 332s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 332s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 332s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 332s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 332s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 332s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 332s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 332s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 332s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 332s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 332s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 332s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 332s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 332s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 332s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 332s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 332s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 332s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 332s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 332s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 332s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 332s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 332s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 332s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 332s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 332s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 332s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 332s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 332s ***** error gpcdf () 332s ***** error gpcdf (1) 332s ***** error gpcdf (1, 2) 332s ***** error gpcdf (1, 2, 3) 332s ***** error ... 332s gpcdf (ones (3), ones (2), ones(2), ones(2)) 332s ***** error ... 332s gpcdf (ones (2), ones (3), ones(2), ones(2)) 332s ***** error ... 332s gpcdf (ones (2), ones (2), ones(3), ones(2)) 332s ***** error ... 332s gpcdf (ones (2), ones (2), ones(2), ones(3)) 332s ***** error gpcdf (i, 2, 3, 4) 332s ***** error gpcdf (1, i, 3, 4) 332s ***** error gpcdf (1, 2, i, 4) 332s ***** error gpcdf (1, 2, 3, i) 332s 51 tests, 51 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/vmpdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/plpdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/frnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/frnd.m 332s ***** assert (size (frnd (1, 1)), [1 1]) 332s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 332s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 332s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 332s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 332s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 332s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 332s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 332s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 332s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 332s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 332s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 332s ***** assert (class (frnd (1, 1)), "double") 332s ***** assert (class (frnd (1, single (1))), "single") 332s ***** assert (class (frnd (1, single ([1, 1]))), "single") 332s ***** assert (class (frnd (single (1), 1)), "single") 332s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 332s ***** error frnd () 332s ***** error frnd (1) 332s ***** error ... 332s frnd (ones (3), ones (2)) 332s ***** error ... 332s frnd (ones (2), ones (3)) 332s ***** error frnd (i, 2, 3) 332s ***** error frnd (1, i, 3) 332s ***** error ... 332s frnd (1, 2, -1) 332s ***** error ... 332s frnd (1, 2, 1.2) 332s ***** error ... 332s frnd (1, 2, ones (2)) 332s ***** error ... 332s frnd (1, 2, [2 -1 2]) 332s ***** error ... 332s frnd (1, 2, [2 0 2.5]) 332s ***** error ... 332s frnd (1, 2, 2, -1, 5) 332s ***** error ... 332s frnd (1, 2, 2, 1.5, 5) 332s ***** error ... 332s frnd (2, ones (2), 3) 332s ***** error ... 332s frnd (2, ones (2), [3, 2]) 332s ***** error ... 332s frnd (2, ones (2), 3, 2) 332s 33 tests, 33 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/loglcdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/loglcdf.m 332s ***** demo 332s ## Plot various CDFs from the log-logistic distribution 332s x = 0:0.001:2; 332s p1 = loglcdf (x, log (1), 1/0.5); 332s p2 = loglcdf (x, log (1), 1); 332s p3 = loglcdf (x, log (1), 1/2); 332s p4 = loglcdf (x, log (1), 1/4); 332s p5 = loglcdf (x, log (1), 1/8); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 332s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 332s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 332s grid on 332s title ("Log-logistic CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 332s ***** shared out1, out2 332s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 332s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 332s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 332s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 332s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 332s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 332s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 332s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 332s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 332s ***** assert (class (loglcdf (1, single (2), 3)), "single") 332s ***** assert (class (loglcdf (1, 2, single (3))), "single") 332s ***** error loglcdf (1) 332s ***** error loglcdf (1, 2) 332s ***** error ... 332s loglcdf (1, 2, 3, 4) 332s ***** error ... 332s loglcdf (1, 2, 3, "uper") 332s ***** error ... 332s loglcdf (1, ones (2), ones (3)) 332s ***** error ... 332s loglcdf (1, ones (2), ones (3), "upper") 332s ***** error ... 332s loglcdf (ones (2), 1, ones (3)) 332s ***** error ... 332s loglcdf (ones (2), 1, ones (3), "upper") 332s ***** error ... 332s loglcdf (ones (2), ones (3), 1) 332s ***** error ... 332s loglcdf (ones (2), ones (3), 1, "upper") 332s ***** error loglcdf (i, 2, 3) 332s ***** error loglcdf (i, 2, 3, "upper") 332s ***** error loglcdf (1, i, 3) 332s ***** error loglcdf (1, i, 3, "upper") 332s ***** error loglcdf (1, 2, i) 332s ***** error loglcdf (1, 2, i, "upper") 332s 25 tests, 25 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/raylinv.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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/unifinv.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unifinv.m 332s ***** demo 332s ## Plot various iCDFs from the continuous uniform distribution 332s p = 0.001:0.001:0.999; 332s x1 = unifinv (p, 2, 5); 332s x2 = unifinv (p, 3, 9); 332s plot (p, x1, "-b", p, x2, "-g") 332s grid on 332s xlim ([0, 1]) 332s ylim ([0, 10]) 332s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 332s title ("Continuous uniform iCDF") 332s xlabel ("probability") 332s ylabel ("values in x") 332s ***** shared p 332s p = [-1 0 0.5 1 2]; 332s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 332s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 332s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 332s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 332s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 332s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 332s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 332s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 332s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 332s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 332s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 332s ***** error unifinv () 332s ***** error unifinv (1, 2) 332s ***** error ... 332s unifinv (ones (3), ones (2), ones (2)) 332s ***** error ... 332s unifinv (ones (2), ones (3), ones (2)) 332s ***** error ... 332s unifinv (ones (2), ones (2), ones (3)) 332s ***** error unifinv (i, 2, 2) 332s ***** error unifinv (2, i, 2) 332s ***** error unifinv (2, 2, i) 332s 19 tests, 19 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/normcdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/normcdf.m 332s ***** demo 332s ## Plot various CDFs from the normal distribution 332s x = -5:0.01:5; 332s p1 = normcdf (x, 0, 0.5); 332s p2 = normcdf (x, 0, 1); 332s p3 = normcdf (x, 0, 2); 332s p4 = normcdf (x, -2, 0.8); 332s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 332s grid on 332s xlim ([-5, 5]) 332s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 332s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 332s title ("Normal CDF") 332s xlabel ("values in x") 332s ylabel ("probability") 332s ***** shared x, y 332s x = [-Inf 1 2 Inf]; 332s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 332s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 332s ***** assert (normcdf (x, 1, ones (1,4)), y) 332s ***** assert (normcdf (x, ones (1,4), 1), y) 332s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 332s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 332s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 332s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 332s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 332s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 332s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 332s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 332s ***** error normcdf () 332s ***** error normcdf (1,2,3,4,5,6,7) 332s ***** error normcdf (1, 2, 3, 4, "uper") 332s ***** error ... 332s normcdf (ones (3), ones (2), ones (2)) 332s ***** error normcdf (2, 3, 4, [1, 2]) 332s ***** error ... 332s [p, plo, pup] = normcdf (1, 2, 3) 332s ***** error [p, plo, pup] = ... 332s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 332s ***** error [p, plo, pup] = ... 332s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 332s ***** error [p, plo, pup] = ... 332s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 332s ***** error normcdf (i, 2, 2) 332s ***** error normcdf (2, i, 2) 332s ***** error normcdf (2, 2, i) 332s ***** error ... 332s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 332s 24 tests, 24 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/copularnd.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/copularnd.m 332s ***** test 332s theta = 0.5; 332s r = copularnd ("Gaussian", theta); 332s assert (size (r), [1, 2]); 332s assert (all ((r >= 0) & (r <= 1))); 332s ***** test 332s theta = 0.5; 332s df = 2; 332s r = copularnd ("t", theta, df); 332s assert (size (r), [1, 2]); 332s assert (all ((r >= 0) & (r <= 1))); 332s ***** test 332s theta = 0.5; 332s r = copularnd ("Clayton", theta); 332s assert (size (r), [1, 2]); 332s assert (all ((r >= 0) & (r <= 1))); 332s ***** test 332s theta = 0.5; 332s n = 2; 332s r = copularnd ("Clayton", theta, n); 332s assert (size (r), [n, 2]); 332s assert (all ((r >= 0) & (r <= 1))); 332s ***** test 332s theta = [1; 2]; 332s n = 2; 332s d = 3; 332s r = copularnd ("Clayton", theta, n, d); 332s assert (size (r), [n, d]); 332s assert (all ((r >= 0) & (r <= 1))); 332s 5 tests, 5 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/raylpdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/raylpdf.m 332s ***** demo 332s ## Plot various PDFs from the Rayleigh distribution 332s x = 0:0.01:10; 332s y1 = raylpdf (x, 0.5); 332s y2 = raylpdf (x, 1); 332s y3 = raylpdf (x, 2); 332s y4 = raylpdf (x, 3); 332s y5 = raylpdf (x, 4); 332s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 332s grid on 332s ylim ([0, 1.25]) 332s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 332s "σ = 3", "σ = 4"}, "location", "northeast") 332s title ("Rayleigh PDF") 332s xlabel ("values in x") 332s ylabel ("density") 332s ***** test 332s x = 0:0.5:2.5; 332s sigma = 1:6; 332s y = raylpdf (x, sigma); 332s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 332s assert (y, expected_y, 0.001); 332s ***** test 332s x = 0:0.5:2.5; 332s y = raylpdf (x, 0.5); 332s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 332s assert (y, expected_y, 0.001); 332s ***** error raylpdf () 332s ***** error raylpdf (1) 332s ***** error ... 332s raylpdf (ones (3), ones (2)) 332s ***** error ... 332s raylpdf (ones (2), ones (3)) 332s ***** error raylpdf (i, 2) 332s ***** error raylpdf (2, i) 332s 8 tests, 8 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/gevpdf.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gevpdf.m 332s ***** demo 332s ## Plot various PDFs from the generalized extreme value distribution 332s x = -1:0.001:10; 332s y1 = gevpdf (x, 1, 1, 1); 332s y2 = gevpdf (x, 0.5, 1, 1); 332s y3 = gevpdf (x, 1, 1, 5); 332s y4 = gevpdf (x, 1, 2, 5); 332s y5 = gevpdf (x, 1, 5, 5); 332s y6 = gevpdf (x, 1, 0.5, 5); 332s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 332s x, y4, "-c", x, y5, "-m", x, y6, "-k") 332s grid on 332s xlim ([-1, 10]) 332s ylim ([0, 1.1]) 332s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 332s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 332s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 332s "location", "northeast") 332s title ("Generalized extreme value PDF") 332s xlabel ("values in x") 332s ylabel ("density") 332s ***** test 332s x = 0:0.5:2.5; 332s sigma = 1:6; 332s k = 1; 332s mu = 0; 332s y = gevpdf (x, k, sigma, mu); 332s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 332s assert (y, expected_y, 0.001); 332s ***** test 332s x = -0.5:0.5:2.5; 332s sigma = 0.5; 332s k = 1; 332s mu = 0; 332s y = gevpdf (x, k, sigma, mu); 332s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 332s assert (y, expected_y, 0.001); 332s ***** test # check for continuity for k near 0 332s x = 1; 332s sigma = 0.5; 332s k = -0.03:0.01:0.03; 332s mu = 0; 332s y = gevpdf (x, k, sigma, mu); 332s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 332s assert (y, expected_y, 0.001); 332s ***** error gevpdf () 332s ***** error gevpdf (1) 332s ***** error gevpdf (1, 2) 332s ***** error gevpdf (1, 2, 3) 332s ***** error ... 332s gevpdf (ones (3), ones (2), ones(2), ones(2)) 332s ***** error ... 332s gevpdf (ones (2), ones (3), ones(2), ones(2)) 332s ***** error ... 332s gevpdf (ones (2), ones (2), ones(3), ones(2)) 332s ***** error ... 332s gevpdf (ones (2), ones (2), ones(2), ones(3)) 332s ***** error gevpdf (i, 2, 3, 4) 332s ***** error gevpdf (1, i, 3, 4) 332s ***** error gevpdf (1, 2, i, 4) 332s ***** error gevpdf (1, 2, 3, i) 332s 15 tests, 15 passed, 0 known failure, 0 skipped 332s [inst/dist_fun/hygeinv.m] 332s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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]) 332s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 332s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 332s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 332s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 332s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 332s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 332s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 332s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 332s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 332s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 332s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 332s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 332s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 332s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 332s ***** error hygeinv () 332s ***** error hygeinv (1) 332s ***** error hygeinv (1,2) 332s ***** error hygeinv (1,2,3) 332s ***** error ... 332s hygeinv (ones (2), ones (3), 1, 1) 332s ***** error ... 332s hygeinv (1, ones (2), ones (3), 1) 332s ***** error ... 332s hygeinv (1, 1, ones (2), ones (3)) 332s ***** error hygeinv (i, 2, 2, 2) 332s ***** error hygeinv (2, i, 2, 2) 332s ***** error hygeinv (2, 2, i, 2) 332s ***** error hygeinv (2, 2, 2, i) 333s 26 tests, 26 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/bvncdf.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bvncdf.m 333s ***** demo 333s mu = [1, -1]; 333s sigma = [0.9, 0.4; 0.4, 0.3]; 333s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 333s x = [X1(:), X2(:)]; 333s p = bvncdf (x, mu, sigma); 333s Z = reshape (p, 25, 25); 333s surf (X1, X2, Z); 333s title ("Bivariate Normal Distribution"); 333s ylabel "X1" 333s xlabel "X2" 333s ***** test 333s mu = [1, -1]; 333s sigma = [0.9, 0.4; 0.4, 0.3]; 333s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 333s x = [X1(:), X2(:)]; 333s p = bvncdf (x, mu, sigma); 333s p_out = [0.00011878988774500, 0.00034404112322371, ... 333s 0.00087682502191813, 0.00195221905058185, ... 333s 0.00378235566873474, 0.00638175749734415, ... 333s 0.00943764224329656, 0.01239164888125426, ... 333s 0.01472750274376648, 0.01623228313374828]'; 333s assert (p([1:10]), p_out, 1e-16); 333s ***** test 333s mu = [1, -1]; 333s sigma = [0.9, 0.4; 0.4, 0.3]; 333s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 333s x = [X1(:), X2(:)]; 333s p = bvncdf (x, mu, sigma); 333s p_out = [0.8180695783608276, 0.8854485749482751, ... 333s 0.9308108777385832, 0.9579855743025508, ... 333s 0.9722897881414742, 0.9788150170059926, ... 333s 0.9813597788804785, 0.9821977956568989, ... 333s 0.9824283794464095, 0.9824809345614861]'; 333s assert (p([616:625]), p_out, 3e-16); 333s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 333s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 333s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 333s 5 tests, 5 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/tripdf.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tripdf.m 333s ***** demo 333s ## Plot various CDFs from the triangular distribution 333s x = 0.001:0.001:10; 333s y1 = tripdf (x, 3, 4, 6); 333s y2 = tripdf (x, 1, 2, 5); 333s y3 = tripdf (x, 2, 3, 9); 333s y4 = tripdf (x, 2, 5, 9); 333s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 333s grid on 333s xlim ([0, 10]) 333s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 333s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 333s "location", "northeast") 333s title ("Triangular CDF") 333s xlabel ("values in x") 333s ylabel ("probability") 333s ***** shared x, y, deps 333s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 333s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 333s deps = 2*eps; 333s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 333s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 333s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 333s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 333s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 333s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 333s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 333s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 333s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 333s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 333s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 333s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 333s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 333s ***** error tripdf () 333s ***** error tripdf (1) 333s ***** error tripdf (1, 2) 333s ***** error tripdf (1, 2, 3) 333s ***** error ... 333s tripdf (1, 2, 3, 4, 5) 333s ***** error ... 333s tripdf (ones (3), ones (2), ones(2), ones(2)) 333s ***** error ... 333s tripdf (ones (2), ones (3), ones(2), ones(2)) 333s ***** error ... 333s tripdf (ones (2), ones (2), ones(3), ones(2)) 333s ***** error ... 333s tripdf (ones (2), ones (2), ones(2), ones(3)) 333s ***** error tripdf (i, 2, 3, 4) 333s ***** error tripdf (1, i, 3, 4) 333s ***** error tripdf (1, 2, i, 4) 333s ***** error tripdf (1, 2, 3, i) 333s 26 tests, 26 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/mvnpdf.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvnpdf.m 333s ***** demo 333s mu = [1, -1]; 333s sigma = [0.9, 0.4; 0.4, 0.3]; 333s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 333s x = [X1(:), X2(:)]; 333s p = mvnpdf (x, mu, sigma); 333s surf (X1, X2, reshape (p, 25, 25)); 333s ***** error y = mvnpdf (); 333s ***** error y = mvnpdf ([]); 333s ***** error y = mvnpdf (ones (3,3,3)); 333s ***** error ... 333s y = mvnpdf (ones (10, 2), [4, 2, 3]); 333s ***** error ... 333s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 333s ***** error ... 333s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 333s ***** shared x, mu, sigma 333s x = [1, 2, 5, 4, 6]; 333s mu = [2, 0, -1, 1, 4]; 333s sigma = [2, 2, 2, 2, 2]; 333s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 333s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 333s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 333s 9 tests, 9 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/hninv.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hninv.m 333s ***** demo 333s ## Plot various iCDFs from the half-normal distribution 333s p = 0.001:0.001:0.999; 333s x1 = hninv (p, 0, 1); 333s x2 = hninv (p, 0, 2); 333s x3 = hninv (p, 0, 3); 333s x4 = hninv (p, 0, 5); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 333s grid on 333s ylim ([0, 10]) 333s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 333s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 333s title ("Half-normal iCDF") 333s xlabel ("probability") 333s ylabel ("x") 333s ***** shared p, x 333s p = [0, 0.3829, 0.6827, 1]; 333s x = [0, 1/2, 1, Inf]; 333s ***** assert (hninv (p, 0, 1), x, 1e-4); 333s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 333s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 333s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 333s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 333s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 333s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 333s ***** error hninv (1) 333s ***** error hninv (1, 2) 333s ***** error ... 333s hninv (1, ones (2), ones (3)) 333s ***** error ... 333s hninv (ones (2), 1, ones (3)) 333s ***** error ... 333s hninv (ones (2), ones (3), 1) 333s ***** error hninv (i, 2, 3) 333s ***** error hninv (1, i, 3) 333s ***** error hninv (1, 2, i) 333s 15 tests, 15 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/cauchyinv.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/cauchyinv.m 333s ***** demo 333s ## Plot various iCDFs from the Cauchy distribution 333s p = 0.001:0.001:0.999; 333s x1 = cauchyinv (p, 0, 0.5); 333s x2 = cauchyinv (p, 0, 1); 333s x3 = cauchyinv (p, 0, 2); 333s x4 = cauchyinv (p, -2, 1); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 333s grid on 333s ylim ([-5, 5]) 333s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 333s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 333s title ("Cauchy iCDF") 333s xlabel ("probability") 333s ylabel ("values in x") 333s ***** shared p 333s p = [-1 0 0.5 1 2]; 333s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 333s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 333s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 333s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 333s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 333s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 333s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 333s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 333s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 333s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 333s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 333s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 333s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 333s ***** error cauchyinv () 333s ***** error cauchyinv (1) 333s ***** error ... 333s cauchyinv (1, 2) 333s ***** error cauchyinv (1, 2, 3, 4) 333s ***** error ... 333s cauchyinv (ones (3), ones (2), ones(2)) 333s ***** error ... 333s cauchyinv (ones (2), ones (3), ones(2)) 333s ***** error ... 333s cauchyinv (ones (2), ones (2), ones(3)) 333s ***** error cauchyinv (i, 4, 3) 333s ***** error cauchyinv (1, i, 3) 333s ***** error cauchyinv (1, 4, i) 333s 20 tests, 20 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/geoinv.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/geoinv.m 333s ***** demo 333s ## Plot various iCDFs from the geometric distribution 333s p = 0.001:0.001:0.999; 333s x1 = geoinv (p, 0.2); 333s x2 = geoinv (p, 0.5); 333s x3 = geoinv (p, 0.7); 333s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 333s grid on 333s ylim ([0, 10]) 333s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 333s title ("Geometric iCDF") 333s xlabel ("probability") 333s ylabel ("values in x (number of failures)") 333s ***** shared p 333s p = [-1 0 0.75 1 2]; 333s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 333s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 333s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 333s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 333s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 333s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 333s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 333s ***** error geoinv () 333s ***** error geoinv (1) 333s ***** error ... 333s geoinv (ones (3), ones (2)) 333s ***** error ... 333s geoinv (ones (2), ones (3)) 333s ***** error ... 333s geoinv (i, 2) 333s ***** error ... 333s geoinv (2, i) 333s 13 tests, 13 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/mnrnd.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mnrnd.m 333s ***** test 333s n = 10; 333s pk = [0.2, 0.5, 0.3]; 333s r = mnrnd (n, pk); 333s assert (size (r), size (pk)); 333s assert (all (r >= 0)); 333s assert (all (round (r) == r)); 333s assert (sum (r) == n); 333s ***** test 333s n = 10 * ones (3, 1); 333s pk = [0.2, 0.5, 0.3]; 333s r = mnrnd (n, pk); 333s assert (size (r), [length(n), length(pk)]); 333s assert (all (r >= 0)); 333s assert (all (round (r) == r)); 333s assert (all (sum (r, 2) == n)); 333s ***** test 333s n = (1:2)'; 333s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 333s r = mnrnd (n, pk); 333s assert (size (r), size (pk)); 333s assert (all (r >= 0)); 333s assert (all (round (r) == r)); 333s assert (all (sum (r, 2) == n)); 333s 3 tests, 3 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/nakarnd.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nakarnd.m 333s ***** assert (size (nakarnd (1, 1)), [1 1]) 333s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 333s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 333s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 333s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 333s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 333s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 333s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 333s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 333s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 333s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 333s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 333s ***** assert (class (nakarnd (1, 1)), "double") 333s ***** assert (class (nakarnd (1, single (1))), "single") 333s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 333s ***** assert (class (nakarnd (single (1), 1)), "single") 333s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 333s ***** error nakarnd () 333s ***** error nakarnd (1) 333s ***** error ... 333s nakarnd (ones (3), ones (2)) 333s ***** error ... 333s nakarnd (ones (2), ones (3)) 333s ***** error nakarnd (i, 2, 3) 333s ***** error nakarnd (1, i, 3) 333s ***** error ... 333s nakarnd (1, 2, -1) 333s ***** error ... 333s nakarnd (1, 2, 1.2) 333s ***** error ... 333s nakarnd (1, 2, ones (2)) 333s ***** error ... 333s nakarnd (1, 2, [2 -1 2]) 333s ***** error ... 333s nakarnd (1, 2, [2 0 2.5]) 333s ***** error ... 333s nakarnd (1, 2, 2, -1, 5) 333s ***** error ... 333s nakarnd (1, 2, 2, 1.5, 5) 333s ***** error ... 333s nakarnd (2, ones (2), 3) 333s ***** error ... 333s nakarnd (2, ones (2), [3, 2]) 333s ***** error ... 333s nakarnd (2, ones (2), 3, 2) 333s 33 tests, 33 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/gpcdf.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gpcdf.m 333s ***** demo 333s ## Plot various CDFs from the generalized Pareto distribution 333s x = 0:0.001:5; 333s p1 = gpcdf (x, 1, 1, 0); 333s p2 = gpcdf (x, 5, 1, 0); 333s p3 = gpcdf (x, 20, 1, 0); 333s p4 = gpcdf (x, 1, 2, 0); 333s p5 = gpcdf (x, 5, 2, 0); 333s p6 = gpcdf (x, 20, 2, 0); 333s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 333s x, p4, "-c", x, p5, "-m", x, p6, "-k") 333s grid on 333s xlim ([0, 5]) 333s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 333s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 333s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 333s "location", "northwest") 333s title ("Generalized Pareto CDF") 333s xlabel ("values in x") 333s ylabel ("probability") 333s ***** shared x, y1, y1u, y2, y2u, y3, y3u 333s x = [-Inf, -1, 0, 1/2, 1, Inf]; 333s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 333s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 333s y2 = [0, 0, 0, 1/3, 1/2, 1]; 333s y2u = [1, 1, 1, 2/3, 1/2, 0]; 333s y3 = [0, 0, 0, 1/2, 1, 1]; 333s y3u = [1, 1, 1, 1/2, 0, 0]; 333s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 333s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 333s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 333s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 333s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 333s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 333s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 333s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 333s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 333s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 333s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 333s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 333s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 333s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 333s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 333s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 333s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 333s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 333s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 333s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 333s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 333s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 333s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 333s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 333s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 333s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 333s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 333s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 333s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 333s [y2u(1:3), NaN, y2u(5:6)], eps) 333s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 333s [y2u(1:3), NaN, y2u(5:6)], eps) 333s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 333s [y2u(1:3), NaN, y2u(5:6)], eps) 333s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 333s [y2u(1:3), NaN, y2u(5:6)], eps) 333s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 333s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 333s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 333s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 333s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 333s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 333s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 333s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 333s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 333s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 333s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 333s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 333s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 333s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 333s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 333s [y3u(1:3), NaN, y3u(5:6)], eps) 333s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 333s [y3u(1:3), NaN, y3u(5:6)], eps) 333s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 333s [y3u(1:3), NaN, y3u(5:6)], eps) 333s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 333s [y3u(1:3), NaN, y3u(5:6)], eps) 333s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 333s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 333s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 333s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 333s ***** error gpcdf () 333s ***** error gpcdf (1) 333s ***** error gpcdf (1, 2) 333s ***** error gpcdf (1, 2, 3) 333s ***** error gpcdf (1, 2, 3, 4, "tail") 333s ***** error gpcdf (1, 2, 3, 4, 5) 333s ***** error ... 333s gpcdf (ones (3), ones (2), ones(2), ones(2)) 333s ***** error ... 333s gpcdf (ones (2), ones (3), ones(2), ones(2)) 333s ***** error ... 333s gpcdf (ones (2), ones (2), ones(3), ones(2)) 333s ***** error ... 333s gpcdf (ones (2), ones (2), ones(2), ones(3)) 333s ***** error gpcdf (i, 2, 3, 4) 333s ***** error gpcdf (1, i, 3, 4) 333s ***** error gpcdf (1, 2, i, 4) 333s ***** error gpcdf (1, 2, 3, i) 333s 76 tests, 76 passed, 0 known failure, 0 skipped 333s [inst/dist_fun/vminv.m] 333s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/vminv.m 333s ***** demo 333s ## Plot various iCDFs from the von Mises distribution 333s 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]; 333s x1 = vminv (p1, 0, 0.5); 333s x2 = vminv (p1, 0, 1); 333s x3 = vminv (p1, 0, 2); 333s x4 = vminv (p1, 0, 4); 333s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 333s grid on 333s ylim ([-pi, pi]) 333s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 333s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 333s title ("Von Mises iCDF") 333s xlabel ("probability") 333s ylabel ("values in x") 333s ***** shared x, p0, p1 333s x = [-pi:pi/2:pi]; 333s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 333s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 333s ***** assert (vminv (p0, 0, 1), x, 5e-5) 333s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 333s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 334s ***** error vminv () 334s ***** error vminv (1) 334s ***** error vminv (1, 2) 334s ***** error ... 334s vminv (ones (3), ones (2), ones (2)) 334s ***** error ... 334s vminv (ones (2), ones (3), ones (2)) 334s ***** error ... 334s vminv (ones (2), ones (2), ones (3)) 334s ***** error vminv (i, 2, 2) 334s ***** error vminv (2, i, 2) 334s ***** error vminv (2, 2, i) 334s 12 tests, 12 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/hygernd.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hygernd.m 334s ***** assert (size (hygernd (4,2,2)), [1, 1]) 334s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 334s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 334s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 334s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 334s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 334s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 334s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 334s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 334s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 334s ***** assert (class (hygernd (4,2,2)), "double") 334s ***** assert (class (hygernd (single (4),2,2)), "single") 334s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 334s ***** assert (class (hygernd (4,single (2),2)), "single") 334s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 334s ***** assert (class (hygernd (4,2,single (2))), "single") 334s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 334s ***** error hygernd () 334s ***** error hygernd (1) 334s ***** error hygernd (1, 2) 334s ***** error ... 334s hygernd (ones (3), ones (2), ones (2)) 334s ***** error ... 334s hygernd (ones (2), ones (3), ones (2)) 334s ***** error ... 334s hygernd (ones (2), ones (2), ones (3)) 334s ***** error hygernd (i, 2, 3) 334s ***** error hygernd (1, i, 3) 334s ***** error hygernd (1, 2, i) 334s ***** error ... 334s hygernd (1, 2, 3, -1) 334s ***** error ... 334s hygernd (1, 2, 3, 1.2) 334s ***** error ... 334s hygernd (1, 2, 3, ones (2)) 334s ***** error ... 334s hygernd (1, 2, 3, [2 -1 2]) 334s ***** error ... 334s hygernd (1, 2, 3, [2 0 2.5]) 334s ***** error ... 334s hygernd (1, 2, 3, 2, -1, 5) 334s ***** error ... 334s hygernd (1, 2, 3, 2, 1.5, 5) 334s ***** error ... 334s hygernd (2, ones (2), 2, 3) 334s ***** error ... 334s hygernd (2, ones (2), 2, [3, 2]) 334s ***** error ... 334s hygernd (2, ones (2), 2, 3, 2) 334s 36 tests, 36 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/gampdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gampdf.m 334s ***** demo 334s ## Plot various PDFs from the Gamma distribution 334s x = 0:0.01:20; 334s y1 = gampdf (x, 1, 2); 334s y2 = gampdf (x, 2, 2); 334s y3 = gampdf (x, 3, 2); 334s y4 = gampdf (x, 5, 1); 334s y5 = gampdf (x, 9, 0.5); 334s y6 = gampdf (x, 7.5, 1); 334s y7 = gampdf (x, 0.5, 1); 334s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 334s x, y5, "-k", x, y6, "-b", x, y7, "-c") 334s grid on 334s ylim ([0,0.5]) 334s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 334s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 334s "α = 0.5, β = 1"}, "location", "northeast") 334s title ("Gamma PDF") 334s xlabel ("values in x") 334s ylabel ("density") 334s ***** shared x, y 334s x = [-1 0 0.5 1 Inf]; 334s y = [0 exp(-x(2:end))]; 334s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 334s ***** assert (gampdf (x, 1, ones (1,5)), y) 334s ***** assert (gampdf (x, ones (1,5), 1), y) 334s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 334s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 334s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 334s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 334s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 334s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 334s ***** error gampdf () 334s ***** error gampdf (1) 334s ***** error gampdf (1,2) 334s ***** error ... 334s gampdf (ones (3), ones (2), ones (2)) 334s ***** error ... 334s gampdf (ones (2), ones (3), ones (2)) 334s ***** error ... 334s gampdf (ones (2), ones (2), ones (3)) 334s ***** error gampdf (i, 2, 2) 334s ***** error gampdf (2, i, 2) 334s ***** error gampdf (2, 2, i) 334s 18 tests, 18 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/binopdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/binopdf.m 334s ***** demo 334s ## Plot various PDFs from the binomial distribution 334s x = 0:40; 334s y1 = binopdf (x, 20, 0.5); 334s y2 = binopdf (x, 20, 0.7); 334s y3 = binopdf (x, 40, 0.5); 334s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 334s grid on 334s ylim ([0, 0.25]) 334s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 334s "n = 40, ps = 0.5"}, "location", "northeast") 334s title ("Binomial PDF") 334s xlabel ("values in x (number of successes)") 334s ylabel ("density") 334s ***** shared x, y 334s x = [-1 0 1 2 3]; 334s y = [0 1/4 1/2 1/4 0]; 334s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 334s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 334s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 334s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 334s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 334s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 334s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 334s ***** assert (binopdf (1, 1, 1), 1) 334s ***** assert (binopdf (0, 3, 0), 1) 334s ***** assert (binopdf (2, 2, 1), 1) 334s ***** assert (binopdf (1, 2, 1), 0) 334s ***** assert (binopdf (0, 1.1, 0), NaN) 334s ***** assert (binopdf (1, 2, -1), NaN) 334s ***** assert (binopdf (1, 2, 1.5), NaN) 334s ***** assert (binopdf ([], 1, 1), []) 334s ***** assert (binopdf (1, [], 1), []) 334s ***** assert (binopdf (1, 1, []), []) 334s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 334s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 334s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 334s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 334s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 334s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 334s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 334s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 334s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 334s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 334s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 334s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 334s ***** error binopdf () 334s ***** error binopdf (1) 334s ***** error binopdf (1, 2) 334s ***** error binopdf (1, 2, 3, 4) 334s ***** error ... 334s binopdf (ones (3), ones (2), ones (2)) 334s ***** error ... 334s binopdf (ones (2), ones (3), ones (2)) 334s ***** error ... 334s binopdf (ones (2), ones (2), ones (3)) 334s ***** error binopdf (i, 2, 2) 334s ***** error binopdf (2, i, 2) 334s ***** error binopdf (2, 2, i) 334s 39 tests, 39 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/plcdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/plcdf.m 334s ***** demo 334s ## Plot various CDFs from the Piecewise linear distribution 334s data = 0:0.01:10; 334s x1 = [0, 1, 3, 4, 7, 10]; 334s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 334s x2 = [0, 2, 5, 6, 7, 8]; 334s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 334s p1 = plcdf (data, x1, Fx1); 334s p2 = plcdf (data, x2, Fx2); 334s plot (data, p1, "-b", data, p2, "g") 334s grid on 334s ylim ([0, 1]) 334s xlim ([0, 10]) 334s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 334s title ("Piecewise linear CDF") 334s xlabel ("values in data") 334s ylabel ("probability") 334s ***** test 334s data = 0:0.2:1; 334s p = plcdf (data, [0, 1], [0, 1]); 334s assert (p, data); 334s ***** test 334s data = 0:0.2:1; 334s p = plcdf (data, [0, 2], [0, 1]); 334s assert (p, 0.5 * data); 334s ***** test 334s data = 0:0.2:1; 334s p = plcdf (data, [0, 1], [0, 0.5]); 334s assert (p, 0.5 * data); 334s ***** test 334s data = 0:0.2:1; 334s p = plcdf (data, [0, 0.5], [0, 1]); 334s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 334s ***** test 334s data = 0:0.2:1; 334s p = plcdf (data, [0, 1], [0, 1], "upper"); 334s assert (p, 1 - data); 334s ***** error plcdf () 334s ***** error plcdf (1) 334s ***** error plcdf (1, 2) 334s ***** error plcdf (1, 2, 3, "uper") 334s ***** error plcdf (1, 2, 3, 4) 334s ***** error ... 334s plcdf (1, [0, 1, 2], [0, 1]) 334s ***** error ... 334s plcdf (1, [0], [1]) 334s ***** error ... 334s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 334s ***** error ... 334s plcdf (1, [0, 1, 2], [0, i, 1]) 334s ***** error ... 334s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 334s ***** error ... 334s plcdf (1, [0, i, 2], [0, 0.5, 1]) 334s ***** error ... 334s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 334s 17 tests, 17 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/tlsinv.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tlsinv.m 334s ***** demo 334s ## Plot various iCDFs from the location-scale Student's T distribution 334s p = 0.001:0.001:0.999; 334s x1 = tlsinv (p, 0, 1, 1); 334s x2 = tlsinv (p, 0, 2, 2); 334s x3 = tlsinv (p, 3, 2, 5); 334s x4 = tlsinv (p, -1, 3, Inf); 334s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 334s grid on 334s xlim ([0, 1]) 334s ylim ([-8, 8]) 334s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 334s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 334s "location", "southeast") 334s title ("Location-scale Student's T iCDF") 334s xlabel ("probability") 334s ylabel ("values in x") 334s ***** shared p 334s p = [-1 0 0.5 1 2]; 334s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 334s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 334s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 334s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 334s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 334s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 334s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 334s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 334s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 334s ***** error tlsinv () 334s ***** error tlsinv (1) 334s ***** error tlsinv (1, 2) 334s ***** error tlsinv (1, 2, 3) 334s ***** error ... 334s tlsinv (ones (3), ones (2), 1, 1) 334s ***** error ... 334s tlsinv (ones (2), 1, ones (3), 1) 334s ***** error ... 334s tlsinv (ones (2), 1, 1, ones (3)) 334s ***** error tlsinv (i, 2, 3, 4) 334s ***** error tlsinv (2, i, 3, 4) 334s ***** error tlsinv (2, 2, i, 4) 334s ***** error tlsinv (2, 2, 3, i) 334s 20 tests, 20 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/mvtcdfqmc.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvtcdfqmc.m 334s ***** error mvtcdfqmc (1, 2, 3); 334s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 334s 2 tests, 2 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/binocdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/binocdf.m 334s ***** demo 334s ## Plot various CDFs from the binomial distribution 334s x = 0:40; 334s p1 = binocdf (x, 20, 0.5); 334s p2 = binocdf (x, 20, 0.7); 334s p3 = binocdf (x, 40, 0.5); 334s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 334s grid on 334s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 334s "n = 40, ps = 0.5"}, "location", "southeast") 334s title ("Binomial CDF") 334s xlabel ("values in x (number of successes)") 334s ylabel ("probability") 334s ***** shared x, p, p1 334s x = [-1 0 1 2 3]; 334s p = [0 1/4 3/4 1 1]; 334s p1 = 1 - p; 334s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 334s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 334s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 334s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 334s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 334s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 334s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 334s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 334s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 334s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 334s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 334s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 334s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 334s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 334s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 334s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 334s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 334s ***** error binocdf () 334s ***** error binocdf (1) 334s ***** error binocdf (1, 2) 334s ***** error binocdf (1, 2, 3, 4, 5) 334s ***** error binocdf (1, 2, 3, "tail") 334s ***** error binocdf (1, 2, 3, 4) 334s ***** error ... 334s binocdf (ones (3), ones (2), ones (2)) 334s ***** error ... 334s binocdf (ones (2), ones (3), ones (2)) 334s ***** error ... 334s binocdf (ones (2), ones (2), ones (3)) 334s ***** error binocdf (i, 2, 2) 334s ***** error binocdf (2, i, 2) 334s ***** error binocdf (2, 2, i) 334s 29 tests, 29 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/gumbelrnd.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gumbelrnd.m 334s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 334s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 334s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 334s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 334s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 334s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 334s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 334s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 334s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 334s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 334s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 334s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 334s ***** assert (class (gumbelrnd (1, 1)), "double") 334s ***** assert (class (gumbelrnd (1, single (1))), "single") 334s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 334s ***** assert (class (gumbelrnd (single (1), 1)), "single") 334s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 334s ***** error gumbelrnd () 334s ***** error gumbelrnd (1) 334s ***** error ... 334s gumbelrnd (ones (3), ones (2)) 334s ***** error ... 334s gumbelrnd (ones (2), ones (3)) 334s ***** error gumbelrnd (i, 2, 3) 334s ***** error gumbelrnd (1, i, 3) 334s ***** error ... 334s gumbelrnd (1, 2, -1) 334s ***** error ... 334s gumbelrnd (1, 2, 1.2) 334s ***** error ... 334s gumbelrnd (1, 2, ones (2)) 334s ***** error ... 334s gumbelrnd (1, 2, [2 -1 2]) 334s ***** error ... 334s gumbelrnd (1, 2, [2 0 2.5]) 334s ***** error ... 334s gumbelrnd (1, 2, 2, -1, 5) 334s ***** error ... 334s gumbelrnd (1, 2, 2, 1.5, 5) 334s ***** error ... 334s gumbelrnd (2, ones (2), 3) 334s ***** error ... 334s gumbelrnd (2, ones (2), [3, 2]) 334s ***** error ... 334s gumbelrnd (2, ones (2), 3, 2) 334s 33 tests, 33 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/nctcdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nctcdf.m 334s ***** demo 334s ## Plot various CDFs from the noncentral Τ distribution 334s x = -5:0.01:5; 334s p1 = nctcdf (x, 1, 0); 334s p2 = nctcdf (x, 4, 0); 334s p3 = nctcdf (x, 1, 2); 334s p4 = nctcdf (x, 4, 2); 334s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 334s grid on 334s xlim ([-5, 5]) 334s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 334s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 334s title ("Noncentral Τ CDF") 334s xlabel ("values in x") 334s ylabel ("probability") 334s ***** demo 334s ## Compare the noncentral T CDF with MU = 1 to the T CDF 334s ## with the same number of degrees of freedom (10). 334s 334s x = -5:0.1:5; 334s p1 = nctcdf (x, 10, 1); 334s p2 = tcdf (x, 10); 334s plot (x, p1, "-", x, p2, "-") 334s grid on 334s xlim ([-5, 5]) 334s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 334s title ("Noncentral T vs T CDFs") 334s xlabel ("values in x") 334s ylabel ("probability") 334s ***** test 334s x = -2:0.1:2; 334s p = nctcdf (x, 10, 1); 334s assert (p(1), 0.003302485766631558, 1e-14); 334s assert (p(2), 0.004084668193532631, 1e-14); 334s assert (p(3), 0.005052800319478737, 1e-14); 334s assert (p(41), 0.8076115625303751, 1e-14); 334s ***** test 334s p = nctcdf (12, 10, 3); 334s assert (p, 0.9997719343243797, 1e-14); 334s ***** test 334s p = nctcdf (2, 3, 2); 334s assert (p, 0.4430757822176028, 1e-14); 334s ***** test 334s p = nctcdf (2, 3, 2, "upper"); 334s assert (p, 0.5569242177823971, 1e-14); 334s ***** test 334s p = nctcdf ([3, 6], 3, 2, "upper"); 334s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 334s ***** error nctcdf () 334s ***** error nctcdf (1) 334s ***** error nctcdf (1, 2) 334s ***** error nctcdf (1, 2, 3, "tail") 334s ***** error nctcdf (1, 2, 3, 4) 334s ***** error ... 334s nctcdf (ones (3), ones (2), ones (2)) 334s ***** error ... 334s nctcdf (ones (2), ones (3), ones (2)) 334s ***** error ... 334s nctcdf (ones (2), ones (2), ones (3)) 334s ***** error nctcdf (i, 2, 2) 334s ***** error nctcdf (2, i, 2) 334s ***** error nctcdf (2, 2, i) 334s 16 tests, 16 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/ricernd.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ricernd.m 334s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 334s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 334s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 334s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 334s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 334s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 334s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 334s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 334s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 334s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 334s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 334s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 334s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 334s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 334s ***** assert (class (ricernd (1, 1)), "double") 334s ***** assert (class (ricernd (1, single (0))), "single") 334s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 334s ***** assert (class (ricernd (1, single (1), 2)), "single") 334s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 334s ***** assert (class (ricernd (single (1), 1, 2)), "single") 334s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 334s ***** error ricernd () 334s ***** error ricernd (1) 334s ***** error ... 334s ricernd (ones (3), ones (2)) 334s ***** error ... 334s ricernd (ones (2), ones (3)) 334s ***** error ricernd (i, 2) 334s ***** error ricernd (1, i) 334s ***** error ... 334s ricernd (1, 1/2, -1) 334s ***** error ... 334s ricernd (1, 1/2, 1.2) 334s ***** error ... 334s ricernd (1, 1/2, ones (2)) 334s ***** error ... 334s ricernd (1, 1/2, [2 -1 2]) 334s ***** error ... 334s ricernd (1, 1/2, [2 0 2.5]) 334s ***** error ... 334s ricernd (1, 1/2, 2, -1, 5) 334s ***** error ... 334s ricernd (1, 1/2, 2, 1.5, 5) 334s ***** error ... 334s ricernd (2, 1/2 * ones (2), 3) 334s ***** error ... 334s ricernd (2, 1/2 * ones (2), [3, 2]) 334s ***** error ... 334s ricernd (2, 1/2 * ones (2), 3, 2) 334s ***** error ... 334s ricernd (2 * ones (2), 1/2, 3) 334s ***** error ... 334s ricernd (2 * ones (2), 1/2, [3, 2]) 334s ***** error ... 334s ricernd (2 * ones (2), 1/2, 3, 2) 334s 40 tests, 40 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/norminv.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/norminv.m 334s ***** demo 334s ## Plot various iCDFs from the normal distribution 334s p = 0.001:0.001:0.999; 334s x1 = norminv (p, 0, 0.5); 334s x2 = norminv (p, 0, 1); 334s x3 = norminv (p, 0, 2); 334s x4 = norminv (p, -2, 0.8); 334s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 334s grid on 334s ylim ([-5, 5]) 334s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 334s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 334s title ("Normal iCDF") 334s xlabel ("probability") 334s ylabel ("values in x") 334s ***** shared p 334s p = [-1 0 0.5 1 2]; 334s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 334s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 334s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 334s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 334s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 334s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 334s ***** assert (norminv (p), probit (p)) 334s ***** assert (norminv (0.31254), probit (0.31254)) 334s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 334s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 334s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 334s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 334s ***** error norminv () 334s ***** error ... 334s norminv (ones (3), ones (2), ones (2)) 334s ***** error ... 334s norminv (ones (2), ones (3), ones (2)) 334s ***** error ... 334s norminv (ones (2), ones (2), ones (3)) 334s ***** error norminv (i, 2, 2) 334s ***** error norminv (2, i, 2) 334s ***** error norminv (2, 2, i) 334s 19 tests, 19 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/mvncdf.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvncdf.m 334s ***** demo 334s mu = [1, -1]; 334s Sigma = [0.9, 0.4; 0.4, 0.3]; 334s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 334s X = [X1(:), X2(:)]; 334s p = mvncdf (X, mu, Sigma); 334s Z = reshape (p, 25, 25); 334s surf (X1, X2, Z); 334s title ("Bivariate Normal Distribution"); 334s ylabel "X1" 334s xlabel "X2" 334s ***** demo 334s mu = [0, 0]; 334s Sigma = [0.25, 0.3; 0.3, 1]; 334s p = mvncdf ([0 0], [1 1], mu, Sigma); 334s x1 = -3:.2:3; 334s x2 = -3:.2:3; 334s [X1, X2] = meshgrid (x1, x2); 334s X = [X1(:), X2(:)]; 334s p = mvnpdf (X, mu, Sigma); 334s p = reshape (p, length (x2), length (x1)); 334s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 334s xlabel ("x"); 334s ylabel ("p"); 334s title ("Probability over Rectangular Region"); 334s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 334s ***** test 334s fD = (-2:2)'; 334s X = repmat (fD, 1, 4); 334s p = mvncdf (X); 334s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 334s ***** test 334s mu = [1, -1]; 334s Sigma = [0.9, 0.4; 0.4, 0.3]; 334s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 334s X = [X1(:), X2(:)]; 334s p = mvncdf (X, mu, Sigma); 334s p_out = [0.00011878988774500, 0.00034404112322371, ... 334s 0.00087682502191813, 0.00195221905058185, ... 334s 0.00378235566873474, 0.00638175749734415, ... 334s 0.00943764224329656, 0.01239164888125426, ... 334s 0.01472750274376648, 0.01623228313374828]'; 334s assert (p([1:10]), p_out, 1e-16); 334s ***** test 334s mu = [1, -1]; 334s Sigma = [0.9, 0.4; 0.4, 0.3]; 334s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 334s X = [X1(:), X2(:)]; 334s p = mvncdf (X, mu, Sigma); 334s p_out = [0.8180695783608276, 0.8854485749482751, ... 334s 0.9308108777385832, 0.9579855743025508, ... 334s 0.9722897881414742, 0.9788150170059926, ... 334s 0.9813597788804785, 0.9821977956568989, ... 334s 0.9824283794464095, 0.9824809345614861]'; 334s assert (p([616:625]), p_out, 3e-16); 334s ***** test 334s mu = [0, 0]; 334s Sigma = [0.25, 0.3; 0.3, 1]; 334s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 334s assert (p, 0.2097424404755626, 1e-16); 334s assert (err, 1e-08); 334s ***** test 334s x = [1 2]; 334s mu = [0.5 1.5]; 334s sigma = [1.0, 0.5; 0.5, 1.0]; 334s p = mvncdf (x, mu, sigma); 334s assert (p, 0.546244443857090, 1e-15); 334s ***** test 334s x = [1 2]; 334s mu = [0.5 1.5]; 334s sigma = [1.0, 0.5; 0.5, 1.0]; 334s a = [-inf 0]; 334s p = mvncdf (a, x, mu, sigma); 334s assert (p, 0.482672935215631, 1e-15); 334s ***** error p = mvncdf (randn (25,26), [], eye (26)); 334s ***** error p = mvncdf (randn (25,8), [], eye (9)); 334s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 334s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 334s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 334s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 334s 12 tests, 12 passed, 0 known failure, 0 skipped 334s [inst/dist_fun/riceinv.m] 334s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/riceinv.m 334s ***** demo 334s ## Plot various iCDFs from the Rician distribution 334s p = 0.001:0.001:0.999; 334s x1 = riceinv (p, 0, 1); 334s x2 = riceinv (p, 0.5, 1); 334s x3 = riceinv (p, 1, 1); 334s x4 = riceinv (p, 2, 1); 334s x5 = riceinv (p, 4, 1); 334s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 334s grid on 334s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 334s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 334s title ("Rician iCDF") 334s xlabel ("probability") 334s ylabel ("values in x") 334s ***** shared p 334s p = [-1 0 0.75 1 2]; 334s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 334s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 335s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 335s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 335s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 335s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 335s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 335s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 335s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 335s ***** assert (riceinv ([p, NaN], single (1), 2), ... 335s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 335s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 335s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 335s ***** error riceinv () 335s ***** error riceinv (1) 335s ***** error riceinv (1,2) 335s ***** error riceinv (1,2,3,4) 335s ***** error ... 335s riceinv (ones (3), ones (2), ones (2)) 335s ***** error ... 335s riceinv (ones (2), ones (3), ones (2)) 335s ***** error ... 335s riceinv (ones (2), ones (2), ones (3)) 335s ***** error riceinv (i, 2, 2) 335s ***** error riceinv (2, i, 2) 335s ***** error riceinv (2, 2, i) 335s 20 tests, 20 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/trnd.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/trnd.m 335s ***** assert (size (trnd (2)), [1, 1]) 335s ***** assert (size (trnd (ones (2,1))), [2, 1]) 335s ***** assert (size (trnd (ones (2,2))), [2, 2]) 335s ***** assert (size (trnd (1, 3)), [3, 3]) 335s ***** assert (size (trnd (1, [4 1])), [4, 1]) 335s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 335s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 335s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 335s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 335s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 335s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 335s ***** assert (trnd (0, 1, 1), NaN) 335s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 335s ***** assert (class (trnd (2)), "double") 335s ***** assert (class (trnd (single (2))), "single") 335s ***** assert (class (trnd (single ([2 2]))), "single") 335s ***** error trnd () 335s ***** error trnd (i) 335s ***** error ... 335s trnd (1, -1) 335s ***** error ... 335s trnd (1, 1.2) 335s ***** error ... 335s trnd (1, ones (2)) 335s ***** error ... 335s trnd (1, [2 -1 2]) 335s ***** error ... 335s trnd (1, [2 0 2.5]) 335s ***** error ... 335s trnd (ones (2), ones (2)) 335s ***** error ... 335s trnd (1, 2, -1, 5) 335s ***** error ... 335s trnd (1, 2, 1.5, 5) 335s ***** error trnd (ones (2,2), 3) 335s ***** error trnd (ones (2,2), [3, 2]) 335s ***** error trnd (ones (2,2), 2, 3) 335s 29 tests, 29 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/nakainv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nakainv.m 335s ***** demo 335s ## Plot various iCDFs from the Nakagami distribution 335s p = 0.001:0.001:0.999; 335s x1 = nakainv (p, 0.5, 1); 335s x2 = nakainv (p, 1, 1); 335s x3 = nakainv (p, 1, 2); 335s x4 = nakainv (p, 1, 3); 335s x5 = nakainv (p, 2, 1); 335s x6 = nakainv (p, 2, 2); 335s x7 = nakainv (p, 5, 1); 335s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 335s p, x5, "-k", p, x6, "-b", p, x7, "-c") 335s grid on 335s ylim ([0, 3]) 335s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 335s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 335s "μ = 5, ω = 1"}, "location", "northwest") 335s title ("Nakagami iCDF") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** shared p, y 335s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 335s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 335s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 335s ***** assert (nakainv (p, 1, 1), y, eps) 335s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 335s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 335s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 335s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 335s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 335s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 335s ***** error nakainv () 335s ***** error nakainv (1) 335s ***** error nakainv (1, 2) 335s ***** error ... 335s nakainv (ones (3), ones (2), ones(2)) 335s ***** error ... 335s nakainv (ones (2), ones (3), ones(2)) 335s ***** error ... 335s nakainv (ones (2), ones (2), ones(3)) 335s ***** error nakainv (i, 4, 3) 335s ***** error nakainv (1, i, 3) 335s ***** error nakainv (1, 4, i) 335s 17 tests, 17 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/fpdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/fpdf.m 335s ***** demo 335s ## Plot various PDFs from the F distribution 335s x = 0.01:0.01:4; 335s y1 = fpdf (x, 1, 1); 335s y2 = fpdf (x, 2, 1); 335s y3 = fpdf (x, 5, 2); 335s y4 = fpdf (x, 10, 1); 335s y5 = fpdf (x, 100, 100); 335s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 335s grid on 335s ylim ([0, 2.5]) 335s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 335s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 335s "df1 = 100, df2 = 100"}, "location", "northeast") 335s title ("F PDF") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** shared x, y 335s x = [-1 0 0.5 1 2]; 335s y = [0 0 4/9 1/4 1/9]; 335s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 335s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 335s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 335s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 335s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 335s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 335s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 335s rand ("seed", 1234); # for reproducibility 335s xr = rand (10,1); 335s xr = xr(x > 0.1 & x < 0.9); 335s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 335s assert (fpdf (xr, 1, 2), yr, 5*eps); 335s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 335s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 335s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 335s ***** error fpdf () 335s ***** error fpdf (1) 335s ***** error fpdf (1,2) 335s ***** error ... 335s fpdf (ones (3), ones (2), ones (2)) 335s ***** error ... 335s fpdf (ones (2), ones (3), ones (2)) 335s ***** error ... 335s fpdf (ones (2), ones (2), ones (3)) 335s ***** error fpdf (i, 2, 2) 335s ***** error fpdf (2, i, 2) 335s ***** error fpdf (2, 2, i) 335s 19 tests, 19 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/burrpdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/burrpdf.m 335s ***** demo 335s ## Plot various PDFs from the Burr type XII distribution 335s x = 0.001:0.001:3; 335s y1 = burrpdf (x, 1, 1, 1); 335s y2 = burrpdf (x, 1, 1, 2); 335s y3 = burrpdf (x, 1, 1, 3); 335s y4 = burrpdf (x, 1, 2, 1); 335s y5 = burrpdf (x, 1, 3, 1); 335s y6 = burrpdf (x, 1, 0.5, 2); 335s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 335s x, y4, "-c", x, y5, "-m", x, y6, "-k") 335s grid on 335s ylim ([0, 2]) 335s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 335s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 335s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 335s "location", "northeast") 335s title ("Burr type XII PDF") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** shared x, y 335s x = [-1, 0, 1, 2, Inf]; 335s y = [0, 1, 1/4, 1/9, 0]; 335s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 335s ***** assert (burrpdf (x, 1, 1, 1), y) 335s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 335s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 335s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 335s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 335s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 335s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 335s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 335s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 335s ***** error burrpdf () 335s ***** error burrpdf (1) 335s ***** error burrpdf (1, 2) 335s ***** error burrpdf (1, 2, 3) 335s ***** error ... 335s burrpdf (1, 2, 3, 4, 5) 335s ***** error ... 335s burrpdf (ones (3), ones (2), ones(2), ones(2)) 335s ***** error ... 335s burrpdf (ones (2), ones (3), ones(2), ones(2)) 335s ***** error ... 335s burrpdf (ones (2), ones (2), ones(3), ones(2)) 335s ***** error ... 335s burrpdf (ones (2), ones (2), ones(2), ones(3)) 335s ***** error burrpdf (i, 2, 3, 4) 335s ***** error burrpdf (1, i, 3, 4) 335s ***** error burrpdf (1, 2, i, 4) 335s ***** error burrpdf (1, 2, 3, i) 335s 23 tests, 23 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/exprnd.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/exprnd.m 335s ***** assert (size (exprnd (2)), [1, 1]) 335s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 335s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 335s ***** assert (size (exprnd (1, 3)), [3, 3]) 335s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 335s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 335s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 335s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 335s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 335s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 335s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 335s ***** assert (class (exprnd (2)), "double") 335s ***** assert (class (exprnd (single (2))), "single") 335s ***** assert (class (exprnd (single ([2 2]))), "single") 335s ***** error exprnd () 335s ***** error exprnd (i) 335s ***** error ... 335s exprnd (1, -1) 335s ***** error ... 335s exprnd (1, 1.2) 335s ***** error ... 335s exprnd (1, ones (2)) 335s ***** error ... 335s exprnd (1, [2 -1 2]) 335s ***** error ... 335s exprnd (1, [2 0 2.5]) 335s ***** error ... 335s exprnd (ones (2), ones (2)) 335s ***** error ... 335s exprnd (1, 2, -1, 5) 335s ***** error ... 335s exprnd (1, 2, 1.5, 5) 335s ***** error exprnd (ones (2,2), 3) 335s ***** error exprnd (ones (2,2), [3, 2]) 335s ***** error exprnd (ones (2,2), 2, 3) 335s 27 tests, 27 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/plrnd.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/plrnd.m 335s ***** shared x, Fx 335s x = [0, 1, 3, 4, 7, 10]; 335s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 335s ***** assert (size (plrnd (x, Fx)), [1, 1]) 335s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 335s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 335s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 335s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 335s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 335s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 335s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 335s ***** assert (class (plrnd (x, Fx)), "double") 335s ***** assert (class (plrnd (x, single (Fx))), "single") 335s ***** assert (class (plrnd (single (x), Fx)), "single") 335s ***** error plrnd () 335s ***** error plrnd (1) 335s ***** error ... 335s plrnd ([0, 1, 2], [0, 1]) 335s ***** error ... 335s plrnd ([0], [1]) 335s ***** error ... 335s plrnd ([0, 1, 2], [0, 1, 1.5]) 335s ***** error ... 335s plrnd ([0, 1, 2], [0, i, 1]) 335s ***** error ... 335s plrnd ([0, i, 2], [0, 0.5, 1]) 335s ***** error ... 335s plrnd ([0, i, 2], [0, 0.5i, 1]) 335s ***** error ... 335s plrnd (x, Fx, -1) 335s ***** error ... 335s plrnd (x, Fx, 1.2) 335s ***** error ... 335s plrnd (x, Fx, ones (2)) 335s ***** error ... 335s plrnd (x, Fx, [2 -1 2]) 335s ***** error ... 335s plrnd (x, Fx, [2 0 2.5]) 335s ***** error ... 335s plrnd (x, Fx, 2, -1, 5) 335s ***** error ... 335s plrnd (x, Fx, 2, 1.5, 5) 335s 26 tests, 26 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/wblpdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wblpdf.m 335s ***** demo 335s ## Plot various PDFs from the Weibul distribution 335s x = 0:0.001:2.5; 335s y1 = wblpdf (x, 1, 0.5); 335s y2 = wblpdf (x, 1, 1); 335s y3 = wblpdf (x, 1, 1.5); 335s y4 = wblpdf (x, 1, 5); 335s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 335s grid on 335s ylim ([0, 2.5]) 335s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 335s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 335s title ("Weibul PDF") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** shared x,y 335s x = [-1 0 0.5 1 Inf]; 335s y = [0, exp(-x(2:4)), NaN]; 335s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 335s ***** assert (wblpdf (x, 1, ones (1,5)), y) 335s ***** assert (wblpdf (x, ones (1,5), 1), y) 335s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 335s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 335s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 335s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 335s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 335s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 335s ***** error wblpdf () 335s ***** error wblpdf (1,2,3,4) 335s ***** error wblpdf (ones (3), ones (2), ones (2)) 335s ***** error wblpdf (ones (2), ones (3), ones (2)) 335s ***** error wblpdf (ones (2), ones (2), ones (3)) 335s ***** error wblpdf (i, 2, 2) 335s ***** error wblpdf (2, i, 2) 335s ***** error wblpdf (2, 2, i) 335s 17 tests, 17 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/chi2pdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/chi2pdf.m 335s ***** demo 335s ## Plot various PDFs from the chi-squared distribution 335s x = 0:0.01:8; 335s y1 = chi2pdf (x, 1); 335s y2 = chi2pdf (x, 2); 335s y3 = chi2pdf (x, 3); 335s y4 = chi2pdf (x, 4); 335s y5 = chi2pdf (x, 6); 335s y6 = chi2pdf (x, 9); 335s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 335s x, y4, "-c", x, y5, "-m", x, y6, "-y") 335s grid on 335s xlim ([0, 8]) 335s ylim ([0, 0.5]) 335s legend ({"df = 1", "df = 2", "df = 3", ... 335s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 335s title ("Chi-squared PDF") 335s xlabel ("values in x") 335s ylabel ("density") 335s ***** shared x, y 335s x = [-1 0 0.5 1 Inf]; 335s y = [0, 1/2 * exp(-x(2:5)/2)]; 335s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 335s ***** assert (chi2pdf (x, 2), y) 335s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 335s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 335s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 335s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 335s ***** error chi2pdf () 335s ***** error chi2pdf (1) 335s ***** error chi2pdf (1,2,3) 335s ***** error ... 335s chi2pdf (ones (3), ones (2)) 335s ***** error ... 335s chi2pdf (ones (2), ones (3)) 335s ***** error chi2pdf (i, 2) 335s ***** error chi2pdf (2, i) 335s 13 tests, 13 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/gamcdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gamcdf.m 335s ***** demo 335s ## Plot various CDFs from the Gamma distribution 335s x = 0:0.01:20; 335s p1 = gamcdf (x, 1, 2); 335s p2 = gamcdf (x, 2, 2); 335s p3 = gamcdf (x, 3, 2); 335s p4 = gamcdf (x, 5, 1); 335s p5 = gamcdf (x, 9, 0.5); 335s p6 = gamcdf (x, 7.5, 1); 335s p7 = gamcdf (x, 0.5, 1); 335s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 335s x, p5, "-k", x, p6, "-b", x, p7, "-c") 335s grid on 335s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 335s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 335s "α = 0.5, β = 1"}, "location", "southeast") 335s title ("Gamma CDF") 335s xlabel ("values in x") 335s ylabel ("probability") 335s ***** shared x, y, u 335s x = [-1, 0, 0.5, 1, 2, Inf]; 335s y = [0, gammainc(x(2:end), 1)]; 335s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 335s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 335s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 335s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 335s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 335s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 335s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 335s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 335s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 335s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 335s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 335s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 335s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 335s ***** error gamcdf () 335s ***** error gamcdf (1) 335s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 335s ***** error gamcdf (1, 2, 3, "uper") 335s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 335s ***** error gamcdf (2, 3, 4, [1, 2]) 335s ***** error ... 335s [p, plo, pup] = gamcdf (1, 2, 3) 335s ***** error ... 335s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 335s ***** error [p, plo, pup] = ... 335s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 335s ***** error [p, plo, pup] = ... 335s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 335s ***** error [p, plo, pup] = ... 335s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 335s ***** error ... 335s gamcdf (ones (3), ones (2), ones (2)) 335s ***** error ... 335s gamcdf (ones (2), ones (3), ones (2)) 335s ***** error ... 335s gamcdf (ones (2), ones (2), ones (3)) 335s ***** error gamcdf (i, 2, 2) 335s ***** error gamcdf (2, i, 2) 335s ***** error gamcdf (2, 2, i) 335s ***** error ... 335s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 335s 30 tests, 30 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/logiinv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logiinv.m 335s ***** demo 335s ## Plot various iCDFs from the logistic distribution 335s p = 0.001:0.001:0.999; 335s x1 = logiinv (p, 5, 2); 335s x2 = logiinv (p, 9, 3); 335s x3 = logiinv (p, 9, 4); 335s x4 = logiinv (p, 6, 2); 335s x5 = logiinv (p, 2, 1); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 335s grid on 335s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 335s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 335s title ("Logistic iCDF") 335s xlabel ("probability") 335s ylabel ("x") 335s ***** test 335s p = [0.01:0.01:0.99]; 335s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 335s ***** shared p 335s p = [-1 0 0.5 1 2]; 335s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 335s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 335s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 335s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 335s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 335s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 335s ***** error logiinv () 335s ***** error logiinv (1) 335s ***** error ... 335s logiinv (1, 2) 335s ***** error ... 335s logiinv (1, ones (2), ones (3)) 335s ***** error ... 335s logiinv (ones (2), 1, ones (3)) 335s ***** error ... 335s logiinv (ones (2), ones (3), 1) 335s ***** error logiinv (i, 2, 3) 335s ***** error logiinv (1, i, 3) 335s ***** error logiinv (1, 2, i) 335s 16 tests, 16 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/poissinv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/poissinv.m 335s ***** demo 335s ## Plot various iCDFs from the Poisson distribution 335s p = 0.001:0.001:0.999; 335s x1 = poissinv (p, 13); 335s x2 = poissinv (p, 4); 335s x3 = poissinv (p, 10); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 335s grid on 335s ylim ([0, 20]) 335s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 335s title ("Poisson iCDF") 335s xlabel ("probability") 335s ylabel ("values in x (number of occurences)") 335s ***** shared p 335s p = [-1 0 0.5 1 2]; 335s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 335s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 335s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 335s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 335s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 335s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 335s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 335s ***** error poissinv () 335s ***** error poissinv (1) 335s ***** error ... 335s poissinv (ones (3), ones (2)) 335s ***** error ... 335s poissinv (ones (2), ones (3)) 335s ***** error poissinv (i, 2) 335s ***** error poissinv (2, i) 335s 13 tests, 13 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/invginv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/invginv.m 335s ***** demo 335s ## Plot various iCDFs from the inverse Gaussian distribution 335s p = 0.001:0.001:0.999; 335s x1 = invginv (p, 1, 0.2); 335s x2 = invginv (p, 1, 1); 335s x3 = invginv (p, 1, 3); 335s x4 = invginv (p, 3, 0.2); 335s x5 = invginv (p, 3, 1); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 335s grid on 335s ylim ([0, 3]) 335s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 335s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 335s title ("Inverse Gaussian iCDF") 335s xlabel ("probability") 335s ylabel ("x") 335s ***** shared p, x 335s p = [0, 0.3829, 0.6827, 1]; 335s x = [0, 0.5207, 1.0376, Inf]; 335s ***** assert (invginv (p, 1, 1), x, 1e-4); 335s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 335s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 335s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 335s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 335s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 335s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 335s ***** error invginv (1) 335s ***** error invginv (1, 2) 335s ***** error ... 335s invginv (1, ones (2), ones (3)) 335s ***** error ... 335s invginv (ones (2), 1, ones (3)) 335s ***** error ... 335s invginv (ones (2), ones (3), 1) 335s ***** error invginv (i, 2, 3) 335s ***** error invginv (1, i, 3) 335s ***** error invginv (1, 2, i) 335s 15 tests, 15 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/hygepdf.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/hygepdf.m 335s ***** demo 335s ## Plot various PDFs from the hypergeometric distribution 335s x = 0:60; 335s y1 = hygepdf (x, 500, 50, 100); 335s y2 = hygepdf (x, 500, 60, 200); 335s y3 = hygepdf (x, 500, 70, 300); 335s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 335s grid on 335s xlim ([0, 60]) 335s ylim ([0, 0.18]) 335s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 335s "m = 500, k = 70, μ = 300"}, "location", "northeast") 335s title ("Hypergeometric PDF") 335s xlabel ("values in x (number of successes)") 335s ylabel ("density") 335s ***** shared x, y 335s x = [-1 0 1 2 3]; 335s y = [0 1/6 4/6 1/6 0]; 335s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 335s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 335s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 335s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 335s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 335s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 335s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 335s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 335s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 335s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 335s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 335s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 335s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 335s ***** test 335s z = zeros(3,5); 335s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 335s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 335s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 335s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 335s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 335s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 335s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 335s ***** error hygepdf () 335s ***** error hygepdf (1) 335s ***** error hygepdf (1,2) 335s ***** error hygepdf (1,2,3) 335s ***** error ... 335s hygepdf (1, ones (3), ones (2), ones (2)) 335s ***** error ... 335s hygepdf (1, ones (2), ones (3), ones (2)) 335s ***** error ... 335s hygepdf (1, ones (2), ones (2), ones (3)) 335s ***** error hygepdf (i, 2, 2, 2) 335s ***** error hygepdf (2, i, 2, 2) 335s ***** error hygepdf (2, 2, i, 2) 335s ***** error hygepdf (2, 2, 2, i) 335s 25 tests, 25 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/triinv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/triinv.m 335s ***** demo 335s ## Plot various iCDFs from the triangular distribution 335s p = 0.001:0.001:0.999; 335s x1 = triinv (p, 3, 6, 4); 335s x2 = triinv (p, 1, 5, 2); 335s x3 = triinv (p, 2, 9, 3); 335s x4 = triinv (p, 2, 9, 5); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 335s grid on 335s ylim ([0, 10]) 335s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 335s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 335s "location", "northwest") 335s title ("Triangular CDF") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** shared p, y 335s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 335s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 335s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 335s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 335s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 335s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 335s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 335s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 335s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 335s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 335s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 335s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 335s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 335s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 335s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 335s ***** error triinv () 335s ***** error triinv (1) 335s ***** error triinv (1, 2) 335s ***** error triinv (1, 2, 3) 335s ***** error ... 335s triinv (1, 2, 3, 4, 5) 335s ***** error ... 335s triinv (ones (3), ones (2), ones(2), ones(2)) 335s ***** error ... 335s triinv (ones (2), ones (3), ones(2), ones(2)) 335s ***** error ... 335s triinv (ones (2), ones (2), ones(3), ones(2)) 335s ***** error ... 335s triinv (ones (2), ones (2), ones(2), ones(3)) 335s ***** error triinv (i, 2, 3, 4) 335s ***** error triinv (1, i, 3, 4) 335s ***** error triinv (1, 2, i, 4) 335s ***** error triinv (1, 2, 3, i) 335s 26 tests, 26 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/wblrnd.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wblrnd.m 335s ***** assert (size (wblrnd (1, 1)), [1 1]) 335s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 335s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 335s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 335s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 335s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 335s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 335s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 335s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 335s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 335s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 335s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 335s ***** assert (class (wblrnd (1, 1)), "double") 335s ***** assert (class (wblrnd (1, single (1))), "single") 335s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 335s ***** assert (class (wblrnd (single (1), 1)), "single") 335s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 335s ***** error wblrnd () 335s ***** error wblrnd (1) 335s ***** error ... 335s wblrnd (ones (3), ones (2)) 335s ***** error ... 335s wblrnd (ones (2), ones (3)) 335s ***** error wblrnd (i, 2, 3) 335s ***** error wblrnd (1, i, 3) 335s ***** error ... 335s wblrnd (1, 2, -1) 335s ***** error ... 335s wblrnd (1, 2, 1.2) 335s ***** error ... 335s wblrnd (1, 2, ones (2)) 335s ***** error ... 335s wblrnd (1, 2, [2 -1 2]) 335s ***** error ... 335s wblrnd (1, 2, [2 0 2.5]) 335s ***** error ... 335s wblrnd (1, 2, 2, -1, 5) 335s ***** error ... 335s wblrnd (1, 2, 2, 1.5, 5) 335s ***** error ... 335s wblrnd (2, ones (2), 3) 335s ***** error ... 335s wblrnd (2, ones (2), [3, 2]) 335s ***** error ... 335s wblrnd (2, ones (2), 3, 2) 335s 33 tests, 33 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/burrinv.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/burrinv.m 335s ***** demo 335s ## Plot various iCDFs from the Burr type XII distribution 335s p = 0.001:0.001:0.999; 335s x1 = burrinv (p, 1, 1, 1); 335s x2 = burrinv (p, 1, 1, 2); 335s x3 = burrinv (p, 1, 1, 3); 335s x4 = burrinv (p, 1, 2, 1); 335s x5 = burrinv (p, 1, 3, 1); 335s x6 = burrinv (p, 1, 0.5, 2); 335s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 335s p, x4, "-c", p, x5, "-m", p, x6, "-k") 335s grid on 335s ylim ([0, 5]) 335s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 335s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 335s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 335s "location", "northwest") 335s title ("Burr type XII iCDF") 335s xlabel ("probability") 335s ylabel ("values in x") 335s ***** shared p, y 335s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 335s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 335s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 335s ***** assert (burrinv (p, 1, 1, 1), y, eps) 335s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 335s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 335s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 335s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 335s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 335s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 335s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 335s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 335s ***** error burrinv () 335s ***** error burrinv (1) 335s ***** error burrinv (1, 2) 335s ***** error burrinv (1, 2, 3) 335s ***** error ... 335s burrinv (1, 2, 3, 4, 5) 335s ***** error ... 335s burrinv (ones (3), ones (2), ones(2), ones(2)) 335s ***** error ... 335s burrinv (ones (2), ones (3), ones(2), ones(2)) 335s ***** error ... 335s burrinv (ones (2), ones (2), ones(3), ones(2)) 335s ***** error ... 335s burrinv (ones (2), ones (2), ones(2), ones(3)) 335s ***** error burrinv (i, 2, 3, 4) 335s ***** error burrinv (1, i, 3, 4) 335s ***** error burrinv (1, 2, i, 4) 335s ***** error burrinv (1, 2, 3, i) 335s 23 tests, 23 passed, 0 known failure, 0 skipped 335s [inst/dist_fun/wishrnd.m] 335s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/wishrnd.m 335s ***** assert(size (wishrnd (1,2)), [1, 1]); 335s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 335s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 335s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 335s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 335s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 335s ***** error wishrnd () 335s ***** error wishrnd (1) 336s ***** error wishrnd ([1; 1], 2) 336s 9 tests, 9 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/cauchypdf.m] 336s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/cauchypdf.m 336s ***** demo 336s ## Plot various PDFs from the Cauchy distribution 336s x = -5:0.01:5; 336s y1 = cauchypdf (x, 0, 0.5); 336s y2 = cauchypdf (x, 0, 1); 336s y3 = cauchypdf (x, 0, 2); 336s y4 = cauchypdf (x, -2, 1); 336s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 336s grid on 336s xlim ([-5, 5]) 336s ylim ([0, 0.7]) 336s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 336s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 336s title ("Cauchy PDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** shared x, y 336s x = [-1 0 0.5 1 2]; 336s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 336s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 336s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 336s ***** assert (cauchypdf (x, ones (1,5), 2), y) 336s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 336s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 336s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 336s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 336s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 336s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 336s ***** test 336s x = rand (10, 1); 336s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 336s ***** error cauchypdf () 336s ***** error cauchypdf (1) 336s ***** error ... 336s cauchypdf (1, 2) 336s ***** error cauchypdf (1, 2, 3, 4) 336s ***** error ... 336s cauchypdf (ones (3), ones (2), ones(2)) 336s ***** error ... 336s cauchypdf (ones (2), ones (3), ones(2)) 336s ***** error ... 336s cauchypdf (ones (2), ones (2), ones(3)) 336s ***** error cauchypdf (i, 4, 3) 336s ***** error cauchypdf (1, i, 3) 336s ***** error cauchypdf (1, 4, i) 336s 20 tests, 20 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/bisapdf.m] 336s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bisapdf.m 336s ***** demo 336s ## Plot various PDFs from the Birnbaum-Saunders distribution 336s x = 0.01:0.01:4; 336s y1 = bisapdf (x, 1, 0.5); 336s y2 = bisapdf (x, 1, 1); 336s y3 = bisapdf (x, 1, 2); 336s y4 = bisapdf (x, 1, 5); 336s y5 = bisapdf (x, 1, 10); 336s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 336s grid on 336s ylim ([0, 1.5]) 336s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 336s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 336s title ("Birnbaum-Saunders PDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** demo 336s ## Plot various PDFs from the Birnbaum-Saunders distribution 336s x = 0.01:0.01:6; 336s y1 = bisapdf (x, 1, 0.3); 336s y2 = bisapdf (x, 2, 0.3); 336s y3 = bisapdf (x, 1, 0.5); 336s y4 = bisapdf (x, 3, 0.5); 336s y5 = bisapdf (x, 5, 0.5); 336s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 336s grid on 336s ylim ([0, 1.5]) 336s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 336s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 336s title ("Birnbaum-Saunders CDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** shared x, y 336s x = [-1, 0, 1, 2, Inf]; 336s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 336s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 336s ***** assert (bisapdf (x, 1, 1), y, eps) 336s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 336s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 336s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 336s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 336s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 336s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 336s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 336s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 336s ***** error bisapdf () 336s ***** error bisapdf (1) 336s ***** error bisapdf (1, 2) 336s ***** error bisapdf (1, 2, 3, 4) 336s ***** error ... 336s bisapdf (ones (3), ones (2), ones(2)) 336s ***** error ... 336s bisapdf (ones (2), ones (3), ones(2)) 336s ***** error ... 336s bisapdf (ones (2), ones (2), ones(3)) 336s ***** error bisapdf (i, 4, 3) 336s ***** error bisapdf (1, i, 3) 336s ***** error bisapdf (1, 4, i) 336s 20 tests, 20 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/ricepdf.m] 336s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ricepdf.m 336s ***** demo 336s ## Plot various PDFs from the Rician distribution 336s x = 0:0.01:8; 336s y1 = ricepdf (x, 0, 1); 336s y2 = ricepdf (x, 0.5, 1); 336s y3 = ricepdf (x, 1, 1); 336s y4 = ricepdf (x, 2, 1); 336s y5 = ricepdf (x, 4, 1); 336s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 336s grid on 336s ylim ([0, 0.65]) 336s xlim ([0, 8]) 336s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 336s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 336s title ("Rician PDF") 336s xlabel ("values in x") 336s ylabel ("density") 336s ***** shared x, y 336s x = [-1 0 0.5 1 2]; 336s y = [0 0 0.1073 0.1978 0.2846]; 336s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 336s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 336s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 336s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 336s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 336s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 336s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 336s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 336s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 336s ***** error ricepdf () 336s ***** error ricepdf (1) 336s ***** error ricepdf (1,2) 336s ***** error ricepdf (1,2,3,4) 336s ***** error ... 336s ricepdf (ones (3), ones (2), ones (2)) 336s ***** error ... 336s ricepdf (ones (2), ones (3), ones (2)) 336s ***** error ... 336s ricepdf (ones (2), ones (2), ones (3)) 336s ***** error ricepdf (i, 2, 2) 336s ***** error ricepdf (2, i, 2) 336s ***** error ricepdf (2, 2, i) 336s 19 tests, 19 passed, 0 known failure, 0 skipped 336s [inst/dist_fun/mvtcdf.m] 336s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mvtcdf.m 336s ***** demo 336s ## Compute the cdf of a multivariate Student's t distribution with 336s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 336s 336s rho = [1, 0.4; 0.4, 1]; 336s df = 2; 336s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 336s X = [X1(:), X2(:)]; 336s p = mvtcdf (X, rho, df); 336s surf (X1, X2, reshape (p, 25, 25)); 336s title ("Bivariate Student's t cummulative distribution function"); 336s ***** test 336s x = [1, 2]; 336s rho = [1, 0.5; 0.5, 1]; 336s df = 4; 336s a = [-1, 0]; 336s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 336s ***** test 336s x = [1, 2;2, 4;1, 5]; 336s rho = [1, 0.5; 0.5, 1]; 336s df = 4; 336s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 336s assert (mvtcdf(x, rho, df), p, 1e-14); 336s ***** test 336s x = [1, 2, 2, 4, 1, 5]; 336s rho = eye (6); 336s rho(rho == 0) = 0.5; 336s df = 4; 336s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 344s ***** error mvtcdf (1) 344s ***** error mvtcdf (1, 2) 344s ***** error ... 344s mvtcdf (1, [2, 3; 3, 2], 1) 344s ***** error ... 344s mvtcdf ([2, 3, 4], ones (2), 1) 344s ***** error ... 344s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 344s ***** error ... 344s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 344s ***** error ... 344s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 344s 10 tests, 10 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/logicdf.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logicdf.m 344s ***** demo 344s ## Plot various CDFs from the logistic distribution 344s x = -5:0.01:20; 344s p1 = logicdf (x, 5, 2); 344s p2 = logicdf (x, 9, 3); 344s p3 = logicdf (x, 9, 4); 344s p4 = logicdf (x, 6, 2); 344s p5 = logicdf (x, 2, 1); 344s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 344s grid on 344s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 344s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 344s title ("Logistic CDF") 344s xlabel ("values in x") 344s ylabel ("probability") 344s ***** shared x, y 344s x = [-Inf -log(3) 0 log(3) Inf]; 344s y = [0, 1/4, 1/2, 3/4, 1]; 344s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 344s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 344s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 344s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 344s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 344s ***** error logicdf () 344s ***** error logicdf (1) 344s ***** error ... 344s logicdf (1, 2) 344s ***** error logicdf (1, 2, 3, "tail") 344s ***** error logicdf (1, 2, 3, 4) 344s ***** error ... 344s logicdf (1, ones (2), ones (3)) 344s ***** error ... 344s logicdf (ones (2), 1, ones (3)) 344s ***** error ... 344s logicdf (ones (2), ones (3), 1) 344s ***** error logicdf (i, 2, 3) 344s ***** error logicdf (1, i, 3) 344s ***** error logicdf (1, 2, i) 344s 16 tests, 16 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/mnpdf.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/mnpdf.m 344s ***** test 344s x = [1, 4, 2]; 344s pk = [0.2, 0.5, 0.3]; 344s y = mnpdf (x, pk); 344s assert (y, 0.11812, 0.001); 344s ***** test 344s x = [1, 4, 2; 1, 0, 9]; 344s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 344s y = mnpdf (x, pk); 344s assert (y, [0.11812; 0.13422], 0.001); 344s 2 tests, 2 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/evinv.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/evinv.m 344s ***** demo 344s ## Plot various iCDFs from the extreme value distribution 344s p = 0.001:0.001:0.999; 344s x1 = evinv (p, 0.5, 2); 344s x2 = evinv (p, 1.0, 2); 344s x3 = evinv (p, 1.5, 3); 344s x4 = evinv (p, 3.0, 4); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 344s grid on 344s ylim ([-10, 10]) 344s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 344s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 344s title ("Extreme value iCDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** shared p, x 344s p = [0, 0.05, 0.5 0.95]; 344s x = [-Inf, -2.9702, -0.3665, 1.0972]; 344s ***** assert (evinv (p), x, 1e-4) 344s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 344s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 344s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 344s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 344s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 344s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 344s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 344s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 344s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 344s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 344s ***** error evinv () 344s ***** error evinv (1,2,3,4,5,6) 344s ***** error ... 344s evinv (ones (3), ones (2), ones (2)) 344s ***** error ... 344s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 344s ***** error ... 344s [p, plo, pup] = evinv (1, 2, 3) 344s ***** error [p, plo, pup] = ... 344s evinv (1, 2, 3, [1, 0; 0, 1], 0) 344s ***** error [p, plo, pup] = ... 344s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 344s ***** error evinv (i, 2, 2) 344s ***** error evinv (2, i, 2) 344s ***** error evinv (2, 2, i) 344s ***** error ... 344s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 344s 22 tests, 22 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/unidrnd.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unidrnd.m 344s ***** assert (size (unidrnd (2)), [1, 1]) 344s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 344s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 344s ***** assert (size (unidrnd (1, 3)), [3, 3]) 344s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 344s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 344s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 344s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 344s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 344s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 344s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 344s ***** assert (unidrnd (0, 1, 1), NaN) 344s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 344s ***** assert (class (unidrnd (2)), "double") 344s ***** assert (class (unidrnd (single (2))), "single") 344s ***** assert (class (unidrnd (single ([2 2]))), "single") 344s ***** error unidrnd () 344s ***** error unidrnd (i) 344s ***** error ... 344s unidrnd (1, -1) 344s ***** error ... 344s unidrnd (1, 1.2) 344s ***** error ... 344s unidrnd (1, ones (2)) 344s ***** error ... 344s unidrnd (1, [2 -1 2]) 344s ***** error ... 344s unidrnd (1, [2 0 2.5]) 344s ***** error ... 344s unidrnd (ones (2), ones (2)) 344s ***** error ... 344s unidrnd (1, 2, -1, 5) 344s ***** error ... 344s unidrnd (1, 2, 1.5, 5) 344s ***** error unidrnd (ones (2,2), 3) 344s ***** error unidrnd (ones (2,2), [3, 2]) 344s ***** error unidrnd (ones (2,2), 2, 3) 344s 29 tests, 29 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/gpinv.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gpinv.m 344s ***** demo 344s ## Plot various iCDFs from the generalized Pareto distribution 344s p = 0.001:0.001:0.999; 344s x1 = gpinv (p, 1, 1, 0); 344s x2 = gpinv (p, 5, 1, 0); 344s x3 = gpinv (p, 20, 1, 0); 344s x4 = gpinv (p, 1, 2, 0); 344s x5 = gpinv (p, 5, 2, 0); 344s x6 = gpinv (p, 20, 2, 0); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 344s p, x4, "-c", p, x5, "-m", p, x6, "-k") 344s grid on 344s ylim ([0, 5]) 344s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 344s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 344s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 344s "location", "southeast") 344s title ("Generalized Pareto iCDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** shared p, y1, y2, y3 344s p = [-1, 0, 1/2, 1, 2]; 344s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 344s y2 = [NaN, 0, 1, Inf, NaN]; 344s y3 = [NaN, 0, 1/2, 1, NaN]; 344s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 344s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 344s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 344s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 344s ***** assert (gpinv (p, 0, 1, 0), y1) 344s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 344s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 344s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 344s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 344s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 344s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 344s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 344s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 344s ***** assert (gpinv (p, 1, 1, 0), y2) 344s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 344s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 344s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 344s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 344s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 344s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 344s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 344s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 344s ***** assert (gpinv (p, -1, 1, 0), y3) 344s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 344s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 344s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 344s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 344s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 344s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 344s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 344s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 344s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 344s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 344s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 344s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 344s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 344s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 344s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 344s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 344s ***** error gpinv () 344s ***** error gpinv (1) 344s ***** error gpinv (1, 2) 344s ***** error gpinv (1, 2, 3) 344s ***** error ... 344s gpinv (ones (3), ones (2), ones(2), ones(2)) 344s ***** error ... 344s gpinv (ones (2), ones (3), ones(2), ones(2)) 344s ***** error ... 344s gpinv (ones (2), ones (2), ones(3), ones(2)) 344s ***** error ... 344s gpinv (ones (2), ones (2), ones(2), ones(3)) 344s ***** error gpinv (i, 2, 3, 4) 344s ***** error gpinv (1, i, 3, 4) 344s ***** error gpinv (1, 2, i, 4) 344s ***** error gpinv (1, 2, 3, i) 344s 51 tests, 51 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/tinv.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tinv.m 344s ***** demo 344s ## Plot various iCDFs from the Student's T distribution 344s p = 0.001:0.001:0.999; 344s x1 = tinv (p, 1); 344s x2 = tinv (p, 2); 344s x3 = tinv (p, 5); 344s x4 = tinv (p, Inf); 344s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 344s grid on 344s xlim ([0, 1]) 344s ylim ([-5, 5]) 344s legend ({"df = 1", "df = 2", ... 344s "df = 5", 'df = \infty'}, "location", "northwest") 344s title ("Student's T iCDF") 344s xlabel ("probability") 344s ylabel ("values in x") 344s ***** shared p 344s p = [-1 0 0.5 1 2]; 344s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 344s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 344s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 344s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 344s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 344s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 344s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 344s ***** error tinv () 344s ***** error tinv (1) 344s ***** error ... 344s tinv (ones (3), ones (2)) 344s ***** error ... 344s tinv (ones (2), ones (3)) 344s ***** error tinv (i, 2) 344s ***** error tinv (2, i) 344s 13 tests, 13 passed, 0 known failure, 0 skipped 344s [inst/dist_fun/iwishrnd.m] 344s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/iwishrnd.m 344s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 344s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 344s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 344s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 344s ***** error iwishrnd () 344s ***** error iwishrnd (1) 345s ***** error iwishrnd ([-3 1; 1 3],1) 345s ***** error iwishrnd ([1; 1],1) 345s 8 tests, 8 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/bisacdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/bisacdf.m 345s ***** demo 345s ## Plot various CDFs from the Birnbaum-Saunders distribution 345s x = 0.01:0.01:4; 345s p1 = bisacdf (x, 1, 0.5); 345s p2 = bisacdf (x, 1, 1); 345s p3 = bisacdf (x, 1, 2); 345s p4 = bisacdf (x, 1, 5); 345s p5 = bisacdf (x, 1, 10); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 345s grid on 345s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 345s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 345s title ("Birnbaum-Saunders CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** demo 345s ## Plot various CDFs from the Birnbaum-Saunders distribution 345s x = 0.01:0.01:6; 345s p1 = bisacdf (x, 1, 0.3); 345s p2 = bisacdf (x, 2, 0.3); 345s p3 = bisacdf (x, 1, 0.5); 345s p4 = bisacdf (x, 3, 0.5); 345s p5 = bisacdf (x, 5, 0.5); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 345s grid on 345s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 345s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 345s title ("Birnbaum-Saunders CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x, y 345s x = [-1, 0, 1, 2, Inf]; 345s y = [0, 0, 1/2, 0.76024993890652337, 1]; 345s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 345s ***** assert (bisacdf (x, 1, 1), y, eps) 345s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 345s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 345s ***** assert (bisacdf (x, 1, 1), y, eps) 345s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 345s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 345s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 345s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 345s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 345s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 345s ***** error bisacdf () 345s ***** error bisacdf (1) 345s ***** error bisacdf (1, 2) 345s ***** error ... 345s bisacdf (1, 2, 3, 4, 5) 345s ***** error bisacdf (1, 2, 3, "tail") 345s ***** error bisacdf (1, 2, 3, 4) 345s ***** error ... 345s bisacdf (ones (3), ones (2), ones(2)) 345s ***** error ... 345s bisacdf (ones (2), ones (3), ones(2)) 345s ***** error ... 345s bisacdf (ones (2), ones (2), ones(3)) 345s ***** error bisacdf (i, 4, 3) 345s ***** error bisacdf (1, i, 3) 345s ***** error bisacdf (1, 4, i) 345s 23 tests, 23 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/logninv.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logninv.m 345s ***** demo 345s ## Plot various iCDFs from the log-normal distribution 345s p = 0.001:0.001:0.999; 345s x1 = logninv (p, 0, 1); 345s x2 = logninv (p, 0, 0.5); 345s x3 = logninv (p, 0, 0.25); 345s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 345s grid on 345s ylim ([0, 3]) 345s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 345s "location", "northwest") 345s title ("Log-normal iCDF") 345s xlabel ("probability") 345s ylabel ("values in x") 345s ***** shared p 345s p = [-1 0 0.5 1 2]; 345s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 345s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 345s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 345s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 345s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 345s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 345s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 345s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 345s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 345s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 345s ***** error logninv () 345s ***** error logninv (1,2,3,4) 345s ***** error logninv (ones (3), ones (2), ones (2)) 345s ***** error logninv (ones (2), ones (3), ones (2)) 345s ***** error logninv (ones (2), ones (2), ones (3)) 345s ***** error logninv (i, 2, 2) 345s ***** error logninv (2, i, 2) 345s ***** error logninv (2, 2, i) 345s 18 tests, 18 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/betapdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/betapdf.m 345s ***** demo 345s ## Plot various PDFs from the Beta distribution 345s x = 0.001:0.001:0.999; 345s y1 = betapdf (x, 0.5, 0.5); 345s y2 = betapdf (x, 5, 1); 345s y3 = betapdf (x, 1, 3); 345s y4 = betapdf (x, 2, 2); 345s y5 = betapdf (x, 2, 5); 345s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 345s grid on 345s ylim ([0, 2.5]) 345s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 345s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 345s title ("Beta PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** shared x, y 345s x = [-1 0 0.5 1 2]; 345s y = [0 2 1 0 0]; 345s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 345s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 345s ***** assert (betapdf (x, ones (1, 5), 2), y) 345s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 345s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 345s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 345s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 345s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 345s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 345s ***** test 345s x = rand (10,1); 345s y = 1 ./ (pi * sqrt (x .* (1 - x))); 345s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 345s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 345s ***** error betapdf () 345s ***** error betapdf (1) 345s ***** error betapdf (1,2) 345s ***** error betapdf (1,2,3,4) 345s ***** error ... 345s betapdf (ones (3), ones (2), ones (2)) 345s ***** error ... 345s betapdf (ones (2), ones (3), ones (2)) 345s ***** error ... 345s betapdf (ones (2), ones (2), ones (3)) 345s ***** error betapdf (i, 2, 2) 345s ***** error betapdf (2, i, 2) 345s ***** error betapdf (2, 2, i) 345s 21 tests, 21 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/jsucdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/jsucdf.m 345s ***** error jsucdf () 345s ***** error jsucdf (1, 2, 3, 4) 345s ***** error ... 345s jsucdf (1, ones (2), ones (3)) 345s 3 tests, 3 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/normpdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/normpdf.m 345s ***** demo 345s ## Plot various PDFs from the normal distribution 345s x = -5:0.01:5; 345s y1 = normpdf (x, 0, 0.5); 345s y2 = normpdf (x, 0, 1); 345s y3 = normpdf (x, 0, 2); 345s y4 = normpdf (x, -2, 0.8); 345s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 345s grid on 345s xlim ([-5, 5]) 345s ylim ([0, 0.9]) 345s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 345s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 345s title ("Normal PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** shared x, y 345s x = [-Inf, 1, 2, Inf]; 345s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 345s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 345s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 345s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 345s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 345s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 345s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 345s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 345s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 345s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 345s ***** error normpdf () 345s ***** error ... 345s normpdf (ones (3), ones (2), ones (2)) 345s ***** error ... 345s normpdf (ones (2), ones (3), ones (2)) 345s ***** error ... 345s normpdf (ones (2), ones (2), ones (3)) 345s ***** error normpdf (i, 2, 2) 345s ***** error normpdf (2, i, 2) 345s ***** error normpdf (2, 2, i) 345s 16 tests, 16 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/unifpdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unifpdf.m 345s ***** demo 345s ## Plot various PDFs from the continuous uniform distribution 345s x = 0:0.001:10; 345s y1 = unifpdf (x, 2, 5); 345s y2 = unifpdf (x, 3, 9); 345s plot (x, y1, "-b", x, y2, "-g") 345s grid on 345s xlim ([0, 10]) 345s ylim ([0, 0.4]) 345s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 345s title ("Continuous uniform PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** shared x, y 345s x = [-1 0 0.5 1 2] + 1; 345s y = [0 1 1 1 0]; 345s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 345s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 345s ***** assert (unifpdf (x, ones (1,5), 2), y) 345s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 345s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 345s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 345s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 345s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 345s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 345s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 345s ***** error unifpdf () 345s ***** error unifpdf (1) 345s ***** error unifpdf (1, 2) 345s ***** error ... 345s unifpdf (ones (3), ones (2), ones (2)) 345s ***** error ... 345s unifpdf (ones (2), ones (3), ones (2)) 345s ***** error ... 345s unifpdf (ones (2), ones (2), ones (3)) 345s ***** error unifpdf (i, 2, 2) 345s ***** error unifpdf (2, i, 2) 345s ***** error unifpdf (2, 2, i) 345s 19 tests, 19 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/unidinv.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/unidinv.m 345s ***** demo 345s ## Plot various iCDFs from the discrete uniform distribution 345s p = 0.001:0.001:0.999; 345s x1 = unidinv (p, 5); 345s x2 = unidinv (p, 9); 345s plot (p, x1, "-b", p, x2, "-g") 345s grid on 345s xlim ([0, 1]) 345s ylim ([0, 10]) 345s legend ({"N = 5", "N = 9"}, "location", "northwest") 345s title ("Discrete uniform iCDF") 345s xlabel ("probability") 345s ylabel ("values in x") 345s ***** shared p 345s p = [-1 0 0.5 1 2]; 345s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 345s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 345s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 345s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 345s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 345s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 345s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 345s ***** error unidinv () 345s ***** error unidinv (1) 345s ***** error ... 345s unidinv (ones (3), ones (2)) 345s ***** error ... 345s unidinv (ones (2), ones (3)) 345s ***** error unidinv (i, 2) 345s ***** error unidinv (2, i) 345s 13 tests, 13 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/loglinv.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/loglinv.m 345s ***** demo 345s ## Plot various iCDFs from the log-logistic distribution 345s p = 0.001:0.001:0.999; 345s x1 = loglinv (p, log (1), 1/0.5); 345s x2 = loglinv (p, log (1), 1); 345s x3 = loglinv (p, log (1), 1/2); 345s x4 = loglinv (p, log (1), 1/4); 345s x5 = loglinv (p, log (1), 1/8); 345s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 345s ylim ([0, 20]) 345s grid on 345s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 345s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 345s title ("Log-logistic iCDF") 345s xlabel ("probability") 345s ylabel ("x") 345s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 345s ***** shared p, out1, out2 345s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 345s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 345s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 345s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 345s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 345s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 345s ***** assert (class (loglinv (single (1), 2, 3)), "single") 345s ***** assert (class (loglinv (1, single (2), 3)), "single") 345s ***** assert (class (loglinv (1, 2, single (3))), "single") 345s ***** error loglinv (1) 345s ***** error loglinv (1, 2) 345s ***** error ... 345s loglinv (1, ones (2), ones (3)) 345s ***** error ... 345s loglinv (ones (2), 1, ones (3)) 345s ***** error ... 345s loglinv (ones (2), ones (3), 1) 345s ***** error loglinv (i, 2, 3) 345s ***** error loglinv (1, i, 3) 345s ***** error loglinv (1, 2, i) 345s 14 tests, 14 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/binornd.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/binornd.m 345s ***** assert (size (binornd (2, 1/2)), [1 1]) 345s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 345s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 345s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 345s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 345s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 345s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 345s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 345s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 345s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 345s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 345s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 345s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (class (binornd (1, 1)), "double") 345s ***** assert (class (binornd (1, single (0))), "single") 345s ***** assert (class (binornd (1, single ([0, 0]))), "single") 345s ***** assert (class (binornd (1, single (1), 2)), "single") 345s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 345s ***** assert (class (binornd (single (1), 1, 2)), "single") 345s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 345s ***** error binornd () 345s ***** error binornd (1) 345s ***** error ... 345s binornd (ones (3), ones (2)) 345s ***** error ... 345s binornd (ones (2), ones (3)) 345s ***** error binornd (i, 2) 345s ***** error binornd (1, i) 345s ***** error ... 345s binornd (1, 1/2, -1) 345s ***** error ... 345s binornd (1, 1/2, 1.2) 345s ***** error ... 345s binornd (1, 1/2, ones (2)) 345s ***** error ... 345s binornd (1, 1/2, [2 -1 2]) 345s ***** error ... 345s binornd (1, 1/2, [2 0 2.5]) 345s ***** error ... 345s binornd (1, 1/2, 2, -1, 5) 345s ***** error ... 345s binornd (1, 1/2, 2, 1.5, 5) 345s ***** error ... 345s binornd (2, 1/2 * ones (2), 3) 345s ***** error ... 345s binornd (2, 1/2 * ones (2), [3, 2]) 345s ***** error ... 345s binornd (2, 1/2 * ones (2), 3, 2) 345s ***** error ... 345s binornd (2 * ones (2), 1/2, 3) 345s ***** error ... 345s binornd (2 * ones (2), 1/2, [3, 2]) 345s ***** error ... 345s binornd (2 * ones (2), 1/2, 3, 2) 345s 40 tests, 40 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/laplacecdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/laplacecdf.m 345s ***** demo 345s ## Plot various CDFs from the Laplace distribution 345s x = -10:0.01:10; 345s p1 = laplacecdf (x, 0, 1); 345s p2 = laplacecdf (x, 0, 2); 345s p3 = laplacecdf (x, 0, 4); 345s p4 = laplacecdf (x, -5, 4); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 345s grid on 345s xlim ([-10, 10]) 345s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 345s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 345s title ("Laplace CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x, y 345s x = [-Inf, -log(2), 0, log(2), Inf]; 345s y = [0, 1/4, 1/2, 3/4, 1]; 345s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 345s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 345s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 345s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 345s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 345s ***** error laplacecdf () 345s ***** error laplacecdf (1) 345s ***** error ... 345s laplacecdf (1, 2) 345s ***** error ... 345s laplacecdf (1, 2, 3, 4, 5) 345s ***** error laplacecdf (1, 2, 3, "tail") 345s ***** error laplacecdf (1, 2, 3, 4) 345s ***** error ... 345s laplacecdf (ones (3), ones (2), ones (2)) 345s ***** error ... 345s laplacecdf (ones (2), ones (3), ones (2)) 345s ***** error ... 345s laplacecdf (ones (2), ones (2), ones (3)) 345s ***** error laplacecdf (i, 2, 2) 345s ***** error laplacecdf (2, i, 2) 345s ***** error laplacecdf (2, 2, i) 345s 17 tests, 17 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/gumbelinv.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/gumbelinv.m 345s ***** demo 345s ## Plot various iCDFs from the Gumbel distribution 345s p = 0.001:0.001:0.999; 345s x1 = gumbelinv (p, 0.5, 2); 345s x2 = gumbelinv (p, 1.0, 2); 345s x3 = gumbelinv (p, 1.5, 3); 345s x4 = gumbelinv (p, 3.0, 4); 345s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 345s grid on 345s ylim ([-5, 20]) 345s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 345s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 345s title ("Gumbel iCDF") 345s xlabel ("probability") 345s ylabel ("values in x") 345s ***** shared p, x 345s p = [0, 0.05, 0.5 0.95]; 345s x = [-Inf, -1.0972, 0.3665, 2.9702]; 345s ***** assert (gumbelinv (p), x, 1e-4) 345s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 345s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 345s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 345s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 345s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 345s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 345s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 345s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 345s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 345s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 345s p = [0.05, 0.5, 0.95]; 345s x = gumbelinv(p); 345s ***** assert (gumbelcdf(x), p, 1e-4) 345s ***** error gumbelinv () 345s ***** error gumbelinv (1,2,3,4,5,6) 345s ***** error ... 345s gumbelinv (ones (3), ones (2), ones (2)) 345s ***** error ... 345s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 345s ***** error ... 345s [p, plo, pup] = gumbelinv (1, 2, 3) 345s ***** error [p, plo, pup] = ... 345s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 345s ***** error [p, plo, pup] = ... 345s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 345s ***** error gumbelinv (i, 2, 2) 345s ***** error gumbelinv (2, i, 2) 345s ***** error gumbelinv (2, 2, i) 345s ***** error ... 345s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 345s 23 tests, 23 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/evrnd.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/evrnd.m 345s ***** assert (size (evrnd (1, 1)), [1 1]) 345s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 345s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 345s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 345s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 345s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 345s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 345s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 345s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 345s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 345s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (class (evrnd (1, 1)), "double") 345s ***** assert (class (evrnd (1, single (1))), "single") 345s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 345s ***** assert (class (evrnd (single (1), 1)), "single") 345s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 345s ***** error evrnd () 345s ***** error evrnd (1) 345s ***** error ... 345s evrnd (ones (3), ones (2)) 345s ***** error ... 345s evrnd (ones (2), ones (3)) 345s ***** error evrnd (i, 2, 3) 345s ***** error evrnd (1, i, 3) 345s ***** error ... 345s evrnd (1, 2, -1) 345s ***** error ... 345s evrnd (1, 2, 1.2) 345s ***** error ... 345s evrnd (1, 2, ones (2)) 345s ***** error ... 345s evrnd (1, 2, [2 -1 2]) 345s ***** error ... 345s evrnd (1, 2, [2 0 2.5]) 345s ***** error ... 345s evrnd (1, 2, 2, -1, 5) 345s ***** error ... 345s evrnd (1, 2, 2, 1.5, 5) 345s ***** error ... 345s evrnd (2, ones (2), 3) 345s ***** error ... 345s evrnd (2, ones (2), [3, 2]) 345s ***** error ... 345s evrnd (2, ones (2), 3, 2) 345s 33 tests, 33 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/tlscdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/tlscdf.m 345s ***** demo 345s ## Plot various CDFs from the location-scale Student's T distribution 345s x = -8:0.01:8; 345s p1 = tlscdf (x, 0, 1, 1); 345s p2 = tlscdf (x, 0, 2, 2); 345s p3 = tlscdf (x, 3, 2, 5); 345s p4 = tlscdf (x, -1, 3, Inf); 345s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 345s grid on 345s xlim ([-8, 8]) 345s ylim ([0, 1]) 345s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 345s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 345s "location", "northwest") 345s title ("Location-scale Student's T CDF") 345s xlabel ("values in x") 345s ylabel ("probability") 345s ***** shared x,y 345s x = [-Inf 0 1 Inf]; 345s y = [0 1/2 3/4 1]; 345s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 345s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 345s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 345s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 345s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 345s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 345s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 345s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 345s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 345s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 345s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 345s ***** error tlscdf () 345s ***** error tlscdf (1) 345s ***** error tlscdf (1, 2) 345s ***** error tlscdf (1, 2, 3) 345s ***** error tlscdf (1, 2, 3, 4, "uper") 345s ***** error tlscdf (1, 2, 3, 4, 5) 345s ***** error ... 345s tlscdf (ones (3), ones (2), 1, 1) 345s ***** error ... 345s tlscdf (ones (3), 1, ones (2), 1) 345s ***** error ... 345s tlscdf (ones (3), 1, 1, ones (2)) 345s ***** error ... 345s tlscdf (ones (3), ones (2), 1, 1, "upper") 345s ***** error ... 345s tlscdf (ones (3), 1, ones (2), 1, "upper") 345s ***** error ... 345s tlscdf (ones (3), 1, 1, ones (2), "upper") 345s ***** error tlscdf (i, 2, 1, 1) 345s ***** error tlscdf (2, i, 1, 1) 345s ***** error tlscdf (2, 1, i, 1) 345s ***** error tlscdf (2, 1, 1, i) 345s 27 tests, 27 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/nctrnd.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nctrnd.m 345s ***** assert (size (nctrnd (1, 1)), [1 1]) 345s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 345s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 345s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 345s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 345s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 345s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 345s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 345s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 345s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 345s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 345s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 345s ***** assert (class (nctrnd (1, 1)), "double") 345s ***** assert (class (nctrnd (1, single (1))), "single") 345s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 345s ***** assert (class (nctrnd (single (1), 1)), "single") 345s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 345s ***** error nctrnd () 345s ***** error nctrnd (1) 345s ***** error ... 345s nctrnd (ones (3), ones (2)) 345s ***** error ... 345s nctrnd (ones (2), ones (3)) 345s ***** error nctrnd (i, 2) 345s ***** error nctrnd (1, i) 345s ***** error ... 345s nctrnd (1, 2, -1) 345s ***** error ... 345s nctrnd (1, 2, 1.2) 345s ***** error ... 345s nctrnd (1, 2, ones (2)) 345s ***** error ... 345s nctrnd (1, 2, [2 -1 2]) 345s ***** error ... 345s nctrnd (1, 2, [2 0 2.5]) 345s ***** error ... 345s nctrnd (1, 2, 2, -1, 5) 345s ***** error ... 345s nctrnd (1, 2, 2, 1.5, 5) 345s ***** error ... 345s nctrnd (2, ones (2), 3) 345s ***** error ... 345s nctrnd (2, ones (2), [3, 2]) 345s ***** error ... 345s nctrnd (2, ones (2), 3, 2) 345s 33 tests, 33 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/laplacepdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/laplacepdf.m 345s ***** demo 345s ## Plot various PDFs from the Laplace distribution 345s x = -10:0.01:10; 345s y1 = laplacepdf (x, 0, 1); 345s y2 = laplacepdf (x, 0, 2); 345s y3 = laplacepdf (x, 0, 4); 345s y4 = laplacepdf (x, -5, 4); 345s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 345s grid on 345s xlim ([-10, 10]) 345s ylim ([0, 0.6]) 345s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 345s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 345s title ("Laplace PDF") 345s xlabel ("values in x") 345s ylabel ("density") 345s ***** shared x, y 345s x = [-Inf -log(2) 0 log(2) Inf]; 345s y = [0, 1/4, 1/2, 1/4, 0]; 345s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 345s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 345s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 345s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 345s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 345s ***** error laplacepdf () 345s ***** error laplacepdf (1) 345s ***** error ... 345s laplacepdf (1, 2) 345s ***** error laplacepdf (1, 2, 3, 4) 345s ***** error ... 345s laplacepdf (1, ones (2), ones (3)) 345s ***** error ... 345s laplacepdf (ones (2), 1, ones (3)) 345s ***** error ... 345s laplacepdf (ones (2), ones (3), 1) 345s ***** error laplacepdf (i, 2, 3) 345s ***** error laplacepdf (1, i, 3) 345s ***** error laplacepdf (1, 2, i) 345s 15 tests, 15 passed, 0 known failure, 0 skipped 345s [inst/dist_fun/iwishpdf.m] 345s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/iwishpdf.m 345s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 345s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 345s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 345s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 345s ***** error iwishpdf () 345s ***** error iwishpdf (1, 2) 346s ***** error iwishpdf (1, 2, 0) 346s 6 tests, 6 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/lognrnd.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/lognrnd.m 346s ***** assert (size (lognrnd (1, 1)), [1 1]) 346s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 346s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 346s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 346s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 346s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 346s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 346s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 346s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 346s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 346s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 346s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 346s ***** assert (class (lognrnd (1, 1)), "double") 346s ***** assert (class (lognrnd (1, single (1))), "single") 346s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 346s ***** assert (class (lognrnd (single (1), 1)), "single") 346s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 346s ***** error lognrnd () 346s ***** error lognrnd (1) 346s ***** error ... 346s lognrnd (ones (3), ones (2)) 346s ***** error ... 346s lognrnd (ones (2), ones (3)) 346s ***** error lognrnd (i, 2, 3) 346s ***** error lognrnd (1, i, 3) 346s ***** error ... 346s lognrnd (1, 2, -1) 346s ***** error ... 346s lognrnd (1, 2, 1.2) 346s ***** error ... 346s lognrnd (1, 2, ones (2)) 346s ***** error ... 346s lognrnd (1, 2, [2 -1 2]) 346s ***** error ... 346s lognrnd (1, 2, [2 0 2.5]) 346s ***** error ... 346s lognrnd (1, 2, 2, -1, 5) 346s ***** error ... 346s lognrnd (1, 2, 2, 1.5, 5) 346s ***** error ... 346s lognrnd (2, ones (2), 3) 346s ***** error ... 346s lognrnd (2, ones (2), [3, 2]) 346s ***** error ... 346s lognrnd (2, ones (2), 3, 2) 346s 33 tests, 33 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/nctpdf.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/nctpdf.m 346s ***** demo 346s ## Plot various PDFs from the noncentral T distribution 346s x = -5:0.01:10; 346s y1 = nctpdf (x, 1, 0); 346s y2 = nctpdf (x, 4, 0); 346s y3 = nctpdf (x, 1, 2); 346s y4 = nctpdf (x, 4, 2); 346s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 346s grid on 346s xlim ([-5, 10]) 346s ylim ([0, 0.4]) 346s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 346s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 346s title ("Noncentral T PDF") 346s xlabel ("values in x") 346s ylabel ("density") 346s ***** demo 346s ## Compare the noncentral T PDF with MU = 1 to the T PDF 346s ## with the same number of degrees of freedom (10). 346s 346s x = -5:0.1:5; 346s y1 = nctpdf (x, 10, 1); 346s y2 = tpdf (x, 10); 346s plot (x, y1, "-", x, y2, "-"); 346s grid on 346s xlim ([-5, 5]) 346s ylim ([0, 0.4]) 346s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 346s title ("Noncentral T vs T PDFs") 346s xlabel ("values in x") 346s ylabel ("density") 346s ***** shared x1, df, mu 346s x1 = [-Inf, 2, NaN, 4, Inf]; 346s df = [2, 0, -1, 1, 4]; 346s mu = [1, NaN, 3, -1, 2]; 346s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 346s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 346s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 346s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 346s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 346s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 346s 0.0146500727180389, 0.3082302682110299], 1e-14); 346s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 346s 0.00401787561306999, 0.0972086534042828], 1e-14); 346s ***** error nctpdf () 346s ***** error nctpdf (1) 346s ***** error nctpdf (1, 2) 346s ***** error ... 346s nctpdf (ones (3), ones (2), ones (2)) 346s ***** error ... 346s nctpdf (ones (2), ones (3), ones (2)) 346s ***** error ... 346s nctpdf (ones (2), ones (2), ones (3)) 346s ***** error nctpdf (i, 2, 2) 346s ***** error nctpdf (2, i, 2) 346s ***** error nctpdf (2, 2, i) 346s 16 tests, 16 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/logncdf.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/logncdf.m 346s ***** demo 346s ## Plot various CDFs from the log-normal distribution 346s x = 0:0.01:3; 346s p1 = logncdf (x, 0, 1); 346s p2 = logncdf (x, 0, 0.5); 346s p3 = logncdf (x, 0, 0.25); 346s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 346s grid on 346s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 346s "location", "southeast") 346s title ("Log-normal CDF") 346s xlabel ("values in x") 346s ylabel ("probability") 346s ***** shared x, y 346s x = [-1, 0, 1, e, Inf]; 346s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 346s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 346s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 346s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 346s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 346s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 346s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 346s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 346s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 346s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 346s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 346s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 346s ***** error logncdf () 346s ***** error logncdf (1,2,3,4,5,6,7) 346s ***** error logncdf (1, 2, 3, 4, "uper") 346s ***** error ... 346s logncdf (ones (3), ones (2), ones (2)) 346s ***** error logncdf (2, 3, 4, [1, 2]) 346s ***** error ... 346s [p, plo, pup] = logncdf (1, 2, 3) 346s ***** error [p, plo, pup] = ... 346s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 346s ***** error [p, plo, pup] = ... 346s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 346s ***** error [p, plo, pup] = ... 346s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 346s ***** error logncdf (i, 2, 2) 346s ***** error logncdf (2, i, 2) 346s ***** error logncdf (2, 2, i) 346s ***** error ... 346s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 346s 24 tests, 24 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/geopdf.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/geopdf.m 346s ***** demo 346s ## Plot various PDFs from the geometric distribution 346s x = 0:10; 346s y1 = geopdf (x, 0.2); 346s y2 = geopdf (x, 0.5); 346s y3 = geopdf (x, 0.7); 346s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 346s grid on 346s ylim ([0, 0.8]) 346s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 346s title ("Geometric PDF") 346s xlabel ("values in x (number of failures)") 346s ylabel ("density") 346s ***** shared x, y 346s x = [-1 0 1 Inf]; 346s y = [0, 1/2, 1/4, NaN]; 346s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 346s ***** assert (geopdf (x, 0.5), y) 346s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 346s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 346s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 346s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 346s ***** error geopdf () 346s ***** error geopdf (1) 346s ***** error geopdf (1,2,3) 346s ***** error geopdf (ones (3), ones (2)) 346s ***** error geopdf (ones (2), ones (3)) 346s ***** error geopdf (i, 2) 346s ***** error geopdf (2, i) 346s 13 tests, 13 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/vmrnd.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/vmrnd.m 346s ***** assert (size (vmrnd (1, 1)), [1 1]) 346s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 346s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 346s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 346s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 346s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 346s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 346s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 346s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 346s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 346s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 346s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 346s ***** assert (class (vmrnd (1, 1)), "double") 346s ***** assert (class (vmrnd (1, single (1))), "single") 346s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 346s ***** assert (class (vmrnd (single (1), 1)), "single") 346s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 346s ***** error vmrnd () 346s ***** error vmrnd (1) 346s ***** error ... 346s vmrnd (ones (3), ones (2)) 346s ***** error ... 346s vmrnd (ones (2), ones (3)) 346s ***** error vmrnd (i, 2, 3) 346s ***** error vmrnd (1, i, 3) 346s ***** error ... 346s vmrnd (1, 2, -1) 346s ***** error ... 346s vmrnd (1, 2, 1.2) 346s ***** error ... 346s vmrnd (1, 2, ones (2)) 346s ***** error ... 346s vmrnd (1, 2, [2 -1 2]) 346s ***** error ... 346s vmrnd (1, 2, [2 0 2.5]) 346s ***** error ... 346s vmrnd (1, 2, 2, -1, 5) 346s ***** error ... 346s vmrnd (1, 2, 2, 1.5, 5) 346s ***** error ... 346s vmrnd (2, ones (2), 3) 346s ***** error ... 346s vmrnd (2, ones (2), [3, 2]) 346s ***** error ... 346s vmrnd (2, ones (2), 3, 2) 346s 33 tests, 33 passed, 0 known failure, 0 skipped 346s [inst/dist_fun/ncx2inv.m] 346s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_fun/ncx2inv.m 346s ***** demo 346s ## Plot various iCDFs from the noncentral chi-squared distribution 346s p = 0.001:0.001:0.999; 346s x1 = ncx2inv (p, 2, 1); 346s x2 = ncx2inv (p, 2, 2); 346s x3 = ncx2inv (p, 2, 3); 346s x4 = ncx2inv (p, 4, 1); 346s x5 = ncx2inv (p, 4, 2); 346s x6 = ncx2inv (p, 4, 3); 346s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 346s p, x4, "-m", p, x5, "-c", p, x6, "-y") 346s grid on 346s ylim ([0, 10]) 346s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 346s "df = 2, λ = 3", "df = 4, λ = 1", ... 346s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 346s title ("Noncentral chi-squared iCDF") 346s xlabel ("probability") 346s ylabel ("values in x") 346s ***** demo 346s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 346s ## chi-squared CDF with the same number of degrees of freedom (4). 346s 346s p = 0.001:0.001:0.999; 346s x1 = ncx2inv (p, 4, 2); 346s x2 = chi2inv (p, 4); 346s plot (p, x1, "-", p, x2, "-"); 346s grid on 346s ylim ([0, 10]) 346s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 346s title ("Noncentral chi-squared vs chi-squared quantile functions") 346s xlabel ("probability") 346s ylabel ("values in x") 346s ***** test 346s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 346s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 346s ***** test 346s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 346s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 346s ***** test 346s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 346s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 346s ***** test 346s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 346s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 346s ***** test 346s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 346s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 347s ***** test 347s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 347s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 347s ***** test 347s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 347s ***** error ncx2inv () 347s ***** error ncx2inv (1) 347s ***** error ncx2inv (1, 2) 347s ***** error ... 347s ncx2inv (ones (3), ones (2), ones (2)) 347s ***** error ... 347s ncx2inv (ones (2), ones (3), ones (2)) 347s ***** error ... 347s ncx2inv (ones (2), ones (2), ones (3)) 347s ***** error ncx2inv (i, 2, 2) 347s ***** error ncx2inv (2, i, 2) 347s ***** error ncx2inv (2, 2, i) 347s 16 tests, 16 passed, 0 known failure, 0 skipped 347s [inst/canoncorr.m] 347s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/canoncorr.m 347s ***** shared X,Y,A,B,r,U,V,k 347s k = 10; 347s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 347s [A,B,r,U,V,stats] = canoncorr (X,Y); 347s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 347s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 347s ***** assert (r, [0.99590 0.26754], 1E-5); 347s ***** assert (U, center(X) * A, 10*eps); 347s ***** assert (V, center(Y) * B, 10*eps); 347s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 347s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 347s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 347s ***** assert (r, ones(1, 5), 10*eps); 347s 8 tests, 8 passed, 0 known failure, 0 skipped 347s [inst/plsregress.m] 347s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/plsregress.m 347s ***** demo 347s ## Perform Partial Least-Squares Regression 347s 347s ## Load the spectra data set and use the near infrared (NIR) spectral 347s ## intensities (NIR) as the predictor and the corresponding octave 347s ## ratings (octave) as the response. 347s load spectra 347s 347s ## Perform PLS regression with 10 components 347s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 347s 347s ## Plot the percentage of explained variance in the response variable 347s ## (PCTVAR) as a function of the number of components. 347s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 347s xlim ([1, 10]); 347s xlabel ("Number of PLS components"); 347s ylabel ("Percentage of Explained Variance in octane"); 347s title ("Explained Variance per PLS components"); 347s 347s ## Compute the fitted response and display the residuals. 347s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 347s residuals = octane - octane_fitted; 347s figure 347s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 347s xlabel ("Observations"); 347s ylabel ("Residuals"); 347s title ("Residuals in octane's fitted responce"); 347s ***** demo 347s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 347s 347s ## Load the spectra data set and use the near infrared (NIR) spectral 347s ## intensities (NIR) as the predictor and the corresponding octave 347s ## ratings (octave) as the response. Variables with a VIP score greater than 347s ## 1 are considered important for the projection of the PLS regression model. 347s load spectra 347s 347s ## Perform PLS regression with 10 components 347s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 347s plsregress (NIR, octane, 10); 347s 347s ## Calculate the normalized PLS weights 347s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 347s 347s ## Calculate the VIP scores for 10 components 347s nobs = size (xload, 1); 347s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 347s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 347s 347s ## Find variables with a VIP score greater than or equal to 1 347s VIPidx = find (VIPscore >= 1); 347s 347s ## Plot the VIP scores 347s scatter (1:length (VIPscore), VIPscore, "xb"); 347s hold on 347s scatter (VIPidx, VIPscore (VIPidx), "xr"); 347s plot ([1, length(VIPscore)], [1, 1], "--k"); 347s hold off 347s axis ("tight"); 347s xlabel ("Predictor Variables"); 347s ylabel ("VIP scores"); 347s title ("VIP scores for each predictror variable with 10 components"); 347s ***** test 347s load spectra 347s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 347s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 347s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 347s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 347s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 347s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 347s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 347s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 347s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 347s assert (xload(1,:), xload1_out, 1e-4); 347s assert (yload, yload_out, 1e-4); 347s assert (xscore(1,:), xscore1_out, 1e-4); 347s assert (yscore(1,:), yscore1_out, 1e-4); 347s ***** test 347s load spectra 347s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 347s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 347s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 347s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 347s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 347s assert (xload(1,:), xload1_out, 1e-4); 347s assert (yload, yload_out, 1e-4); 347s assert (xscore(1,:), xscore1_out, 1e-4); 347s assert (yscore(1,:), yscore1_out, 1e-4); 347s ***** error 347s plsregress (1) 347s ***** error plsregress (1, "asd") 347s ***** error plsregress (1, {1,2,3}) 347s ***** error plsregress ("asd", 1) 347s ***** error plsregress ({1,2,3}, 1) 347s ***** error ... 347s plsregress (ones (20,3), ones (15,1)) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 0) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), -5) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3.2) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), [2, 3]) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 4) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 347s ***** error ... 347s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 347s ***** error plsregress (1, 2) 347s 24 tests, 24 passed, 0 known failure, 0 skipped 347s [inst/nanmin.m] 347s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/nanmin.m 347s ***** demo 347s ## Find the column minimum values and their indices 347s ## for matrix data with missing values. 347s 347s x = magic (3); 347s x([1, 6:9]) = NaN 347s [y, ind] = nanmin (x) 347s ***** demo 347s ## Find the minimum of all the values in an array, ignoring missing values. 347s ## Create a 2-by-5-by-3 array x with some missing values. 347s 347s x = reshape (1:30, [2, 5, 3]); 347s x([10:12, 25]) = NaN 347s 347s ## Find the minimum of the elements of x. 347s 347s y = nanmin (x, [], 'all') 347s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 347s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 347s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 347s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 347s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 347s ***** shared x, y 347s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 347s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 347s y = x; 347s y(2,3,1) = 0.51; 347s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 347s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 347s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 347s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 347s ***** assert (nanmin (x, [], 'all'), -2.95) 347s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 347s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 347s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 347s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 347s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 347s ***** test 347s xx = repmat ([1:20;6:25], [5 2 6 3]); 347s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 347s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 347s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 347s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 347s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 347s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 347s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 347s ***** assert (nanmin (magic (3), [], 3), magic (3)) 347s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 347s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 347s ***** assert (nanmin (ones (2), 3), ones (2,2)) 347s ***** error ... 347s nanmin (y, [], [1, 1, 2]) 347s ***** error ... 347s [v, idx] = nanmin(x, y, [1 2]) 347s 24 tests, 24 passed, 0 known failure, 0 skipped 347s [inst/knnsearch.m] 347s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/knnsearch.m 347s ***** demo 347s ## find 10 nearest neighbour of a point using different distance metrics 347s ## and compare the results by plotting 347s load fisheriris 347s X = meas(:,3:4); 347s Y = species; 347s point = [5, 1.45]; 347s 347s ## calculate 10 nearest-neighbours by minkowski distance 347s [id, d] = knnsearch (X, point, "K", 10); 347s 347s ## calculate 10 nearest-neighbours by minkowski distance 347s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 347s 347s ## calculate 10 nearest-neighbours by chebychev distance 347s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 347s 347s ## plotting the results 347s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 347s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 347s xlabel("Petal length (cm)"); 347s ylabel("Petal width (cm)"); 347s 347s line (point(1), point(2), "marker", "X", "color", "k", ... 347s "linewidth", 2, "displayname", "query point") 347s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 347s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 347s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 347s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 347s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 347s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 347s xlim ([4.5 5.5]); 347s ylim ([1 2]); 347s axis square; 347s ***** demo 347s ## knnsearch on iris dataset using kdtree method 347s load fisheriris 347s X = meas(:,3:4); 347s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 347s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 347s 347s ## new point to be predicted 347s point = [5 1.45]; 347s 347s line (point(1), point(2), "marker", "X", "color", "k", ... 347s "linewidth", 2, "displayname", "query point") 347s 347s ## knnsearch using kdtree method 347s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 347s 347s ## plotting predicted neighbours 347s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 347s "linestyle", "none", "markersize", 10, ... 347s "displayname", "nearest neighbour") 347s xlim ([4 6]) 347s ylim ([1 3]) 347s axis square 347s ## details of predicted labels 347s tabulate (species(idx)) 347s 347s ctr = point - d(end); 347s diameter = 2 * d(end); 347s ## Draw a circle around the 10 nearest neighbors. 347s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 347s 347s ## here only 8 neighbours are plotted instead of 10 since the dataset 347s ## contains duplicate values 347s ***** shared X, Y 347s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 347s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * sqrt (2)); 347s ***** test 347s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 347s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * sqrt (2)); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 347s assert (iscell (idx), true); 347s assert (iscell (D), true) 347s assert (idx {1}, [1]); 347s assert (idx {2}, [1, 2]); 347s assert (D{1}, ones (1, 1) * sqrt (2)); 347s assert (D{2}, ones (1, 2) * sqrt (2)); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 347s assert (idx, [1, 2; 1, 2]); 347s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * sqrt (2)); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 347s assert (idx, [1, 2; 1, 2]); 347s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 347s ***** test 347s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 347s yy = [2, 4; 2, 6]; 347s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 347s assert (idx, [3; 2]); 347s assert (D, [0; 3.162277660168377], 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * sqrt (2)); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 347s assert (idx, [1; 1]); 347s assert (D, [2; 2]); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 347s assert (idx, [1; 1]); 347s assert (D, [1; 1]); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 347s assert (idx, [2; 3]); 347s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 347s assert (idx, [1; 1]); 347s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 347s assert (idx, [1; 1]); 347s assert (D, [0.5; 0.5]); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 347s assert (idx, [1; 1]); 347s assert (D, [0.5; 0.5]); 347s ***** test 347s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 347s assert (idx, [1, 2; 1, 2]); 347s assert (D, [0.5, 1; 0.5, 0.5]); 347s ***** test 347s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 347s b = [1, 1]; 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 347s assert (iscell (idx), true); 347s assert (iscell (D), true) 347s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 347s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 347s ***** test 347s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 347s b = [1, 1]; 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 347s assert (iscell (idx), true); 347s assert (iscell (D), true) 347s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 347s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 347s ***** test 347s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 347s b = [1, 1]; 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 347s assert (iscell (idx), false); 347s assert (iscell (D), false) 347s assert (idx, [4, 2, 3, 6, 1]); 347s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 347s ***** test 347s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 347s b = [1, 1]; 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 347s assert (iscell (idx), false); 347s assert (iscell (D), false) 347s assert (idx, [4, 2, 3, 6, 1]); 347s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 347s ***** test 347s load fisheriris 347s a = meas; 347s b = min(meas); 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 347s assert (idx, [42, 9, 14, 39, 13]); 347s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 347s ***** test 347s load fisheriris 347s a = meas; 347s b = mean(meas); 347s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 347s assert (idx, [65, 83, 89, 72, 100]); 347s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 348s ***** test 348s load fisheriris 348s a = meas; 348s b = max(meas); 348s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 348s assert (idx, [118, 132, 110, 106, 136]); 348s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 348s 348s ***** test 348s load fisheriris 348s a = meas; 348s b = max(meas); 348s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 348s assert ( iscell (idx), true); 348s assert ( iscell (D), true); 348s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 348s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 348s ***** error knnsearch (1) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (4)) 348s ***** error ... 348s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 348s ***** error ... 348s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 348s 42 tests, 42 passed, 0 known failure, 0 skipped 348s [inst/dist_obj/TriangularDistribution.m] 348s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/TriangularDistribution.m 348s ***** shared pd, t 348s pd = TriangularDistribution (0, 3, 5); 348s t = truncate (pd, 2, 4); 348s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 348s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 348s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 348s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 348s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 348s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 348s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 348s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 348s ***** assert (iqr (pd), 1.4824, 1e-4); 348s ***** assert (iqr (t), 0.8678, 1e-4); 348s ***** assert (mean (pd), 2.6667, 1e-4); 348s ***** assert (mean (t), 2.9649, 1e-4); 348s ***** assert (median (pd), 2.7386, 1e-4); 348s ***** assert (median (t), 2.9580, 1e-4); 348s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 348s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 348s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 348s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 348s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 348s ***** assert (any (random (t, 1000, 1) < 2), false); 348s ***** assert (any (random (t, 1000, 1) > 4), false); 348s ***** assert (std (pd), 1.0274, 1e-4); 348s ***** assert (std (t), 0.5369, 1e-4); 348s ***** assert (var (pd), 1.0556, 1e-4); 348s ***** assert (var (t), 0.2882, 1e-4); 348s ***** error ... 348s TriangularDistribution (i, 1, 2) 348s ***** error ... 348s TriangularDistribution (Inf, 1, 2) 348s ***** error ... 348s TriangularDistribution ([1, 2], 1, 2) 348s ***** error ... 348s TriangularDistribution ("a", 1, 2) 348s ***** error ... 348s TriangularDistribution (NaN, 1, 2) 348s ***** error ... 348s TriangularDistribution (1, i, 2) 348s ***** error ... 348s TriangularDistribution (1, Inf, 2) 348s ***** error ... 348s TriangularDistribution (1, [1, 2], 2) 348s ***** error ... 348s TriangularDistribution (1, "a", 2) 348s ***** error ... 348s TriangularDistribution (1, NaN, 2) 348s ***** error ... 348s TriangularDistribution (1, 2, i) 348s ***** error ... 348s TriangularDistribution (1, 2, Inf) 348s ***** error ... 348s TriangularDistribution (1, 2, [1, 2]) 348s ***** error ... 348s TriangularDistribution (1, 2, "a") 348s ***** error ... 348s TriangularDistribution (1, 2, NaN) 348s ***** error ... 348s TriangularDistribution (1, 1, 1) 348s ***** error ... 348s TriangularDistribution (1, 0.5, 2) 348s ***** error ... 348s cdf (TriangularDistribution, 2, "uper") 348s ***** error ... 348s cdf (TriangularDistribution, 2, 3) 348s ***** error ... 348s plot (TriangularDistribution, "Parent") 348s ***** error ... 348s plot (TriangularDistribution, "PlotType", 12) 348s ***** error ... 348s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 348s ***** error ... 348s plot (TriangularDistribution, "PlotType", "pdfcdf") 348s ***** error ... 348s plot (TriangularDistribution, "Discrete", "pdfcdf") 348s ***** error ... 348s plot (TriangularDistribution, "Discrete", [1, 0]) 348s ***** error ... 348s plot (TriangularDistribution, "Discrete", {true}) 348s ***** error ... 348s plot (TriangularDistribution, "Parent", 12) 348s ***** error ... 348s plot (TriangularDistribution, "Parent", "hax") 348s ***** error ... 348s plot (TriangularDistribution, "invalidNAME", "pdf") 348s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 348s plot (TriangularDistribution, "PlotType", "probability") 348s ***** error ... 348s truncate (TriangularDistribution) 348s ***** error ... 348s truncate (TriangularDistribution, 2) 348s ***** error ... 348s truncate (TriangularDistribution, 4, 2) 348s ***** shared pd 348s pd = TriangularDistribution (0, 1, 2); 348s pd(2) = TriangularDistribution (0, 1, 2); 348s ***** error cdf (pd, 1) 348s ***** error icdf (pd, 0.5) 348s ***** error iqr (pd) 348s ***** error mean (pd) 348s ***** error median (pd) 348s ***** error pdf (pd, 1) 348s ***** error plot (pd) 348s ***** error random (pd) 348s ***** error std (pd) 348s ***** error ... 348s truncate (pd, 2, 4) 348s ***** error var (pd) 348s 69 tests, 69 passed, 0 known failure, 0 skipped 348s [inst/dist_obj/LoglogisticDistribution.m] 348s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/LoglogisticDistribution.m 348s ***** shared pd, t 348s pd = LoglogisticDistribution; 348s t = truncate (pd, 2, 4); 348s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 348s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 348s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 348s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 348s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 348s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 348s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 348s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 348s ***** assert (iqr (pd), 2.6667, 1e-4); 348s ***** assert (iqr (t), 0.9524, 1e-4); 348s ***** assert (mean (pd), Inf); 348s ***** assert (mean (t), 2.8312, 1e-4); 348s ***** assert (median (pd), 1, 1e-4); 348s ***** assert (median (t), 2.75, 1e-4); 348s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 348s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 348s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 348s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 348s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 348s ***** assert (any (random (t, 1000, 1) < 2), false); 348s ***** assert (any (random (t, 1000, 1) > 4), false); 348s ***** assert (std (pd), Inf); 348s ***** assert (std (t), 0.5674, 1e-4); 348s ***** assert (var (pd), Inf); 348s ***** assert (var (t), 0.3220, 1e-4); 348s ***** error ... 348s LoglogisticDistribution(Inf, 1) 348s ***** error ... 348s LoglogisticDistribution(i, 1) 348s ***** error ... 348s LoglogisticDistribution("a", 1) 348s ***** error ... 348s LoglogisticDistribution([1, 2], 1) 348s ***** error ... 348s LoglogisticDistribution(NaN, 1) 348s ***** error ... 348s LoglogisticDistribution(1, 0) 348s ***** error ... 348s LoglogisticDistribution(1, -1) 348s ***** error ... 348s LoglogisticDistribution(1, Inf) 348s ***** error ... 348s LoglogisticDistribution(1, i) 348s ***** error ... 348s LoglogisticDistribution(1, "a") 348s ***** error ... 348s LoglogisticDistribution(1, [1, 2]) 348s ***** error ... 348s LoglogisticDistribution(1, NaN) 348s ***** error ... 348s cdf (LoglogisticDistribution, 2, "uper") 348s ***** error ... 348s cdf (LoglogisticDistribution, 2, 3) 348s ***** shared x 348s x = loglrnd (1, 1, [1, 100]); 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", "") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 348s "parameter", {"mu", "sigma", "param"}) 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 348s ***** error ... 348s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 348s "parameter", "mu", "NAME", "value") 349s ***** error ... 349s plot (LoglogisticDistribution, "Parent") 349s ***** error ... 349s plot (LoglogisticDistribution, "PlotType", 12) 349s ***** error ... 349s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 349s ***** error ... 349s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 349s ***** error ... 349s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 349s ***** error ... 349s plot (LoglogisticDistribution, "Discrete", [1, 0]) 349s ***** error ... 349s plot (LoglogisticDistribution, "Discrete", {true}) 349s ***** error ... 349s plot (LoglogisticDistribution, "Parent", 12) 349s ***** error ... 349s plot (LoglogisticDistribution, "Parent", "hax") 349s ***** error ... 349s plot (LoglogisticDistribution, "invalidNAME", "pdf") 349s ***** error ... 349s plot (LoglogisticDistribution, "PlotType", "probability") 349s ***** error ... 349s proflik (LoglogisticDistribution, 2) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 3) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), [1, 2]) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), {1}) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display") 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 349s ***** error ... 349s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 349s ***** error ... 349s truncate (LoglogisticDistribution) 349s ***** error ... 349s truncate (LoglogisticDistribution, 2) 349s ***** error ... 349s truncate (LoglogisticDistribution, 4, 2) 349s ***** shared pd 349s pd = LoglogisticDistribution(1, 1); 349s pd(2) = LoglogisticDistribution(1, 3); 349s ***** error cdf (pd, 1) 349s ***** error icdf (pd, 0.5) 349s ***** error iqr (pd) 349s ***** error mean (pd) 349s ***** error median (pd) 349s ***** error negloglik (pd) 349s ***** error paramci (pd) 349s ***** error pdf (pd, 1) 349s ***** error plot (pd) 349s ***** error proflik (pd, 2) 349s ***** error random (pd) 349s ***** error std (pd) 349s ***** error ... 349s truncate (pd, 2, 4) 349s ***** error var (pd) 349s 95 tests, 95 passed, 0 known failure, 0 skipped 349s [inst/dist_obj/PiecewiseLinearDistribution.m] 349s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/PiecewiseLinearDistribution.m 349s ***** shared pd, t 349s load patients 349s [f, x] = ecdf (Weight); 349s f = f(1:5:end); 349s x = x(1:5:end); 349s pd = PiecewiseLinearDistribution (x, f); 349s t = truncate (pd, 130, 180); 349s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 349s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 349s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 349s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 349s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 349s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 349s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 349s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 349s ***** assert (iqr (pd), 50.0833, 1e-4); 349s ***** assert (iqr (t), 36.8077, 1e-4); 349s ***** assert (mean (pd), 153.61, 1e-10); 349s ***** assert (mean (t), 152.311, 1e-3); 352s ***** assert (median (pd), 142, 1e-10); 352s ***** assert (median (t), 141.9462, 1e-4); 352s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 352s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 352s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 352s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 352s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 352s ***** assert (any (random (t, 1000, 1) < 130), false); 352s ***** assert (any (random (t, 1000, 1) > 180), false); 352s ***** assert (std (pd), 26.5196, 1e-4); 352s ***** assert (std (t), 18.2941, 1e-4); 357s ***** assert (var (pd), 703.2879, 1e-4); 357s ***** assert (var (t), 334.6757, 1e-4); 363s ***** error ... 363s PiecewiseLinearDistribution ([0, i], [0, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 1], [0, i]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0], [1]) 363s ***** error ... 363s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 363s ***** error ... 363s cdf (PiecewiseLinearDistribution, 2, "uper") 363s ***** error ... 363s cdf (PiecewiseLinearDistribution, 2, 3) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Parent") 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "PlotType", 12) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Discrete", {true}) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Parent", 12) 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "Parent", "hax") 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 363s ***** error ... 363s plot (PiecewiseLinearDistribution, "PlotType", "probability") 363s ***** error ... 363s truncate (PiecewiseLinearDistribution) 363s ***** error ... 363s truncate (PiecewiseLinearDistribution, 2) 363s ***** error ... 363s truncate (PiecewiseLinearDistribution, 4, 2) 363s ***** shared pd 363s pd = PiecewiseLinearDistribution (); 363s pd(2) = PiecewiseLinearDistribution (); 363s ***** error cdf (pd, 1) 363s ***** error icdf (pd, 0.5) 363s ***** error iqr (pd) 363s ***** error mean (pd) 363s ***** error median (pd) 363s ***** error pdf (pd, 1) 363s ***** error plot (pd) 363s ***** error random (pd) 363s ***** error std (pd) 363s ***** error ... 363s truncate (pd, 2, 4) 363s ***** error var (pd) 363s 63 tests, 63 passed, 0 known failure, 0 skipped 363s [inst/dist_obj/LoguniformDistribution.m] 363s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/LoguniformDistribution.m 363s ***** shared pd, t 363s pd = LoguniformDistribution (1, 4); 363s t = truncate (pd, 2, 4); 363s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 363s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 363s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 363s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 363s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 363s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 363s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 363s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 363s ***** assert (iqr (pd), 1.4142, 1e-4); 363s ***** assert (iqr (t), 0.9852, 1e-4); 363s ***** assert (mean (pd), 2.1640, 1e-4); 363s ***** assert (mean (t), 2.8854, 1e-4); 363s ***** assert (median (pd), 2); 363s ***** assert (median (t), 2.8284, 1e-4); 363s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 363s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 363s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 363s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 363s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 363s ***** assert (any (random (pd, 1000, 1) < 1), false); 363s ***** assert (any (random (pd, 1000, 1) > 4), false); 363s ***** assert (any (random (t, 1000, 1) < 2), false); 363s ***** assert (any (random (t, 1000, 1) > 4), false); 363s ***** assert (std (pd), 0.8527, 1e-4); 363s ***** assert (std (t), 0.5751, 1e-4); 363s ***** assert (var (pd), 0.7270, 1e-4); 363s ***** assert (var (t), 0.3307, 1e-4); 363s ***** error ... 363s LoguniformDistribution (i, 1) 363s ***** error ... 363s LoguniformDistribution (Inf, 1) 363s ***** error ... 363s LoguniformDistribution ([1, 2], 1) 363s ***** error ... 363s LoguniformDistribution ("a", 1) 363s ***** error ... 363s LoguniformDistribution (NaN, 1) 363s ***** error ... 363s LoguniformDistribution (1, i) 363s ***** error ... 363s LoguniformDistribution (1, Inf) 363s ***** error ... 363s LoguniformDistribution (1, [1, 2]) 363s ***** error ... 363s LoguniformDistribution (1, "a") 363s ***** error ... 363s LoguniformDistribution (1, NaN) 363s ***** error ... 363s LoguniformDistribution (2, 1) 363s ***** error ... 363s cdf (LoguniformDistribution, 2, "uper") 363s ***** error ... 363s cdf (LoguniformDistribution, 2, 3) 363s ***** error ... 363s plot (LoguniformDistribution, "Parent") 363s ***** error ... 363s plot (LoguniformDistribution, "PlotType", 12) 363s ***** error ... 363s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 363s ***** error ... 363s plot (LoguniformDistribution, "PlotType", "pdfcdf") 363s ***** error ... 363s plot (LoguniformDistribution, "Discrete", "pdfcdf") 363s ***** error ... 363s plot (LoguniformDistribution, "Discrete", [1, 0]) 363s ***** error ... 363s plot (LoguniformDistribution, "Discrete", {true}) 363s ***** error ... 363s plot (LoguniformDistribution, "Parent", 12) 363s ***** error ... 363s plot (LoguniformDistribution, "Parent", "hax") 363s ***** error ... 363s plot (LoguniformDistribution, "invalidNAME", "pdf") 363s ***** error ... 363s plot (LoguniformDistribution, "PlotType", "probability") 363s ***** error ... 363s truncate (LoguniformDistribution) 363s ***** error ... 363s truncate (LoguniformDistribution, 2) 363s ***** error ... 363s truncate (LoguniformDistribution, 4, 2) 363s ***** shared pd 363s pd = LoguniformDistribution(1, 4); 363s pd(2) = LoguniformDistribution(2, 5); 363s ***** error cdf (pd, 1) 363s ***** error icdf (pd, 0.5) 363s ***** error iqr (pd) 363s ***** error mean (pd) 363s ***** error median (pd) 363s ***** error pdf (pd, 1) 363s ***** error plot (pd) 363s ***** error random (pd) 363s ***** error std (pd) 363s ***** error ... 363s truncate (pd, 2, 4) 363s ***** error var (pd) 363s 65 tests, 65 passed, 0 known failure, 0 skipped 363s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 363s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 363s ***** shared pd, t 363s pd = GeneralizedExtremeValueDistribution; 363s t = truncate (pd, 2, 4); 363s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 363s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 363s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 363s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 363s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 363s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 363s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 363s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 363s ***** assert (iqr (pd), 1.5725, 1e-4); 363s ***** assert (iqr (t), 0.8164, 1e-4); 363s ***** assert (mean (pd), 0.5772, 1e-4); 363s ***** assert (mean (t), 2.7043, 1e-4); 363s ***** assert (median (pd), 0.3665, 1e-4); 363s ***** assert (median (t), 2.5887, 1e-4); 363s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 363s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 363s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 363s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 363s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 363s ***** assert (any (random (t, 1000, 1) < 2), false); 363s ***** assert (any (random (t, 1000, 1) > 4), false); 363s ***** assert (std (pd), 1.2825, 1e-4); 363s ***** assert (std (t), 0.5289, 1e-4); 363s ***** assert (var (pd), 1.6449, 1e-4); 363s ***** assert (var (t), 0.2798, 1e-4); 363s ***** error ... 363s GeneralizedExtremeValueDistribution(Inf, 1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(i, 1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution("a", 1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(NaN, 1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 0, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, -1, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, Inf, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, i, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, "a", 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, NaN, 1) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 1, Inf) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 1, i) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 1, "a") 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 363s ***** error ... 363s GeneralizedExtremeValueDistribution(1, 1, NaN) 363s ***** error ... 363s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 363s ***** error ... 363s cdf (GeneralizedExtremeValueDistribution, 2, 3) 363s ***** shared x 363s x = gevrnd (1, 1, 1, [1, 100]); 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 363s ***** error ... 363s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 363s "parameter", "sigma", "alpha", {0.05}) 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 364s "parameter", {"k", "sigma", "mu", "param"}) 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 364s "parameter", {"k", "sigma", "mu", "param"}) 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 364s "parameter", "param") 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 364s "NAME", "value") 364s ***** error ... 364s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 364s "parameter", "sigma", "NAME", "value") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Parent") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 364s ***** error ... 364s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution, 2) 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 364s ***** error ... 364s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 365s "Display", ["on"; "on"]) 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 365s ***** error ... 365s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 365s "Display", "on") 365s ***** error ... 365s truncate (GeneralizedExtremeValueDistribution) 365s ***** error ... 365s truncate (GeneralizedExtremeValueDistribution, 2) 365s ***** error ... 365s truncate (GeneralizedExtremeValueDistribution, 4, 2) 365s ***** shared pd 365s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 365s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 365s ***** error cdf (pd, 1) 365s ***** error icdf (pd, 0.5) 365s ***** error iqr (pd) 365s ***** error mean (pd) 365s ***** error median (pd) 365s ***** error negloglik (pd) 365s ***** error paramci (pd) 365s ***** error pdf (pd, 1) 365s ***** error plot (pd) 365s ***** error proflik (pd, 2) 365s ***** error random (pd) 365s ***** error std (pd) 365s ***** error ... 365s truncate (pd, 2, 4) 365s ***** error var (pd) 365s 100 tests, 100 passed, 0 known failure, 0 skipped 365s [inst/dist_obj/LognormalDistribution.m] 365s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/LognormalDistribution.m 365s ***** shared pd, t 365s pd = LognormalDistribution; 365s t = truncate (pd, 2, 4); 365s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 365s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 365s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 365s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 365s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 365s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 365s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 365s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 365s ***** assert (iqr (pd), 1.4536, 1e-4); 365s ***** assert (iqr (t), 0.8989, 1e-4); 365s ***** assert (mean (pd), 1.6487, 1e-4); 365s ***** assert (mean (t), 2.7692, 1e-4); 365s ***** assert (median (pd), 1, 1e-4); 365s ***** assert (median (t), 2.6653, 1e-4); 365s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 365s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 365s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 365s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 365s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 365s ***** assert (any (random (t, 1000, 1) < 2), false); 365s ***** assert (any (random (t, 1000, 1) > 4), false); 365s ***** assert (std (pd), 2.1612, 1e-4); 365s ***** assert (std (t), 0.5540, 1e-4); 365s ***** assert (var (pd), 4.6708, 1e-4); 365s ***** assert (var (t), 0.3069, 1e-4); 365s ***** error ... 365s LognormalDistribution(Inf, 1) 365s ***** error ... 365s LognormalDistribution(i, 1) 365s ***** error ... 365s LognormalDistribution("a", 1) 365s ***** error ... 365s LognormalDistribution([1, 2], 1) 365s ***** error ... 365s LognormalDistribution(NaN, 1) 365s ***** error ... 365s LognormalDistribution(1, 0) 365s ***** error ... 365s LognormalDistribution(1, -1) 365s ***** error ... 365s LognormalDistribution(1, Inf) 365s ***** error ... 365s LognormalDistribution(1, i) 365s ***** error ... 365s LognormalDistribution(1, "a") 365s ***** error ... 365s LognormalDistribution(1, [1, 2]) 365s ***** error ... 365s LognormalDistribution(1, NaN) 365s ***** error ... 365s cdf (LognormalDistribution, 2, "uper") 365s ***** error ... 365s cdf (LognormalDistribution, 2, 3) 365s ***** shared x 365s randn ("seed", 1); 365s x = lognrnd (1, 1, [1, 100]); 365s ***** error ... 365s paramci (LognormalDistribution.fit (x), "alpha") 365s ***** error ... 365s paramci (LognormalDistribution.fit (x), "alpha", 0) 365s ***** error ... 365s paramci (LognormalDistribution.fit (x), "alpha", 1) 365s ***** error ... 365s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 365s ***** error ... 365s paramci (LognormalDistribution.fit (x), "alpha", "") 365s ***** error ... 366s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 366s "parameter", {"mu", "sigma", "param"}) 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "parameter", "param") 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "NAME", "value") 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 366s ***** error ... 366s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 366s "NAME", "value") 366s ***** error ... 366s plot (LognormalDistribution, "Parent") 366s ***** error ... 366s plot (LognormalDistribution, "PlotType", 12) 366s ***** error ... 366s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 366s ***** error ... 366s plot (LognormalDistribution, "PlotType", "pdfcdf") 366s ***** error ... 366s plot (LognormalDistribution, "Discrete", "pdfcdf") 366s ***** error ... 366s plot (LognormalDistribution, "Discrete", [1, 0]) 366s ***** error ... 366s plot (LognormalDistribution, "Discrete", {true}) 366s ***** error ... 366s plot (LognormalDistribution, "Parent", 12) 366s ***** error ... 366s plot (LognormalDistribution, "Parent", "hax") 366s ***** error ... 366s plot (LognormalDistribution, "invalidNAME", "pdf") 366s ***** error ... 366s plot (LognormalDistribution, "PlotType", "probability") 366s ***** error ... 366s proflik (LognormalDistribution, 2) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 3) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), [1, 2]) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), {1}) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, ones (2)) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, "Display") 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 366s ***** error ... 366s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 367s ***** error ... 367s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 367s ***** error ... 367s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 367s ***** error ... 367s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 367s ***** error ... 367s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 367s ***** error ... 367s truncate (LognormalDistribution) 367s ***** error ... 367s truncate (LognormalDistribution, 2) 367s ***** error ... 367s truncate (LognormalDistribution, 4, 2) 367s ***** shared pd 367s pd = LognormalDistribution(1, 1); 367s pd(2) = LognormalDistribution(1, 3); 367s ***** error cdf (pd, 1) 367s ***** error icdf (pd, 0.5) 367s ***** error iqr (pd) 367s ***** error mean (pd) 367s ***** error median (pd) 367s ***** error negloglik (pd) 367s ***** error paramci (pd) 367s ***** error pdf (pd, 1) 367s ***** error plot (pd) 367s ***** error proflik (pd, 2) 367s ***** error random (pd) 367s ***** error std (pd) 367s ***** error ... 367s truncate (pd, 2, 4) 367s ***** error var (pd) 367s 95 tests, 95 passed, 0 known failure, 0 skipped 367s [inst/dist_obj/NormalDistribution.m] 367s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/NormalDistribution.m 367s ***** shared pd, t 367s pd = NormalDistribution; 367s t = truncate (pd, -2, 2); 367s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 367s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 367s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 367s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 367s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 367s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 367s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 367s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 367s ***** assert (iqr (pd), 1.3490, 1e-4); 367s ***** assert (iqr (t), 1.2782, 1e-4); 367s ***** assert (mean (pd), 0); 367s ***** assert (mean (t), 0, 3e-16); 367s ***** assert (median (pd), 0); 367s ***** assert (median (t), 0, 3e-16); 367s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 367s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 367s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 367s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 367s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 367s ***** assert (any (random (t, 1000, 1) < -2), false); 367s ***** assert (any (random (t, 1000, 1) > 2), false); 367s ***** assert (std (pd), 1); 367s ***** assert (std (t), 0.8796, 1e-4); 367s ***** assert (var (pd), 1); 367s ***** assert (var (t), 0.7737, 1e-4); 367s ***** error ... 367s NormalDistribution(Inf, 1) 367s ***** error ... 367s NormalDistribution(i, 1) 367s ***** error ... 367s NormalDistribution("a", 1) 367s ***** error ... 367s NormalDistribution([1, 2], 1) 367s ***** error ... 367s NormalDistribution(NaN, 1) 367s ***** error ... 367s NormalDistribution(1, 0) 367s ***** error ... 367s NormalDistribution(1, -1) 367s ***** error ... 367s NormalDistribution(1, Inf) 367s ***** error ... 367s NormalDistribution(1, i) 367s ***** error ... 367s NormalDistribution(1, "a") 367s ***** error ... 367s NormalDistribution(1, [1, 2]) 367s ***** error ... 367s NormalDistribution(1, NaN) 367s ***** error ... 367s cdf (NormalDistribution, 2, "uper") 367s ***** error ... 367s cdf (NormalDistribution, 2, 3) 367s ***** shared x 367s x = normrnd (1, 1, [1, 100]); 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha") 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", 0) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", 1) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", "") 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 367s "parameter", {"mu", "sigma", "param"}) 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "parameter", "param") 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "NAME", "value") 367s ***** error ... 367s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 368s ***** error ... 368s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 368s "NAME", "value") 368s ***** error ... 368s plot (NormalDistribution, "Parent") 368s ***** error ... 368s plot (NormalDistribution, "PlotType", 12) 368s ***** error ... 368s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 368s ***** error ... 368s plot (NormalDistribution, "PlotType", "pdfcdf") 368s ***** error ... 368s plot (NormalDistribution, "Discrete", "pdfcdf") 368s ***** error ... 368s plot (NormalDistribution, "Discrete", [1, 0]) 368s ***** error ... 368s plot (NormalDistribution, "Discrete", {true}) 368s ***** error ... 368s plot (NormalDistribution, "Parent", 12) 368s ***** error ... 368s plot (NormalDistribution, "Parent", "hax") 368s ***** error ... 368s plot (NormalDistribution, "invalidNAME", "pdf") 368s ***** error ... 368s plot (NormalDistribution, "PlotType", "probability") 368s ***** error ... 368s proflik (NormalDistribution, 2) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 3) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), [1, 2]) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), {1}) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, ones (2)) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display") 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display", 1) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 368s ***** error ... 368s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 368s ***** error ... 368s truncate (NormalDistribution) 368s ***** error ... 368s truncate (NormalDistribution, 2) 368s ***** error ... 368s truncate (NormalDistribution, 4, 2) 368s ***** shared pd 368s pd = NormalDistribution(1, 1); 368s pd(2) = NormalDistribution(1, 3); 368s ***** error cdf (pd, 1) 368s ***** error icdf (pd, 0.5) 368s ***** error iqr (pd) 368s ***** error mean (pd) 368s ***** error median (pd) 368s ***** error negloglik (pd) 368s ***** error paramci (pd) 368s ***** error pdf (pd, 1) 368s ***** error plot (pd) 368s ***** error proflik (pd, 2) 368s ***** error random (pd) 368s ***** error std (pd) 368s ***** error ... 368s truncate (pd, 2, 4) 368s ***** error var (pd) 368s 95 tests, 95 passed, 0 known failure, 0 skipped 368s [inst/dist_obj/BetaDistribution.m] 368s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/BetaDistribution.m 368s ***** demo 368s ## Generate a data set of 5000 random samples from a Beta distribution with 368s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 368s ## a PDF of the fitted distribution superimposed on a histogram of the data 368s 368s pd = makedist ("Beta", "a", 2, "b", 4) 368s randg ("seed", 21); 368s data = random (pd, 5000, 1); 368s pd = fitdist (data, "Beta") 368s plot (pd) 368s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 368s pd.a, pd.b)) 368s ***** demo 368s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 368s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 368s ## this truncated distribution and superimpose a histogram with 100 bins 368s ## scaled accordingly 368s 368s pd = makedist ("Beta", "a", 2, "b", 4) 368s t = truncate (pd, 0.1, 0.8) 368s randg ("seed", 21); 368s data = random (t, 10000, 1); 368s plot (t) 368s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 368s hold on 368s hist (data, 100, 140) 368s hold off 368s ***** demo 368s ## Generate a data set of 100 random samples from a Beta distribution with 368s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 368s ## its CDF superimposed over an empirical CDF of the data 368s 368s pd = makedist ("Beta", "a", 2, "b", 4) 368s randg ("seed", 21); 368s data = random (pd, 100, 1); 368s pd = fitdist (data, "Beta") 368s plot (pd, "plottype", "cdf") 368s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 368s pd.a, pd.b)) 368s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 368s ***** demo 368s ## Generate a data set of 200 random samples from a Beta distribution with 368s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 368s ## distribution fit to the data. 368s 368s pd = makedist ("Beta", "a", 2, "b", 4) 368s randg ("seed", 21); 368s data = random (pd, 200, 1); 368s pd = fitdist (data, "Beta") 368s plot (pd, "plottype", "probability") 368s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 368s pd.a, pd.b)) 368s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 368s ***** shared pd, t 368s pd = BetaDistribution; 368s t = truncate (pd, 0.2, 0.8); 368s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 368s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 368s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 368s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 368s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 368s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 368s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 368s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 368s ***** assert (iqr (pd), 0.5, 1e-4); 368s ***** assert (iqr (t), 0.3, 1e-4); 368s ***** assert (mean (pd), 0.5); 368s ***** assert (mean (t), 0.5, 1e-6); 368s ***** assert (median (pd), 0.5); 368s ***** assert (median (t), 0.5, 1e-6); 368s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 368s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 368s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 368s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 368s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 368s ***** assert (any (random (t, 1000, 1) < 0.2), false); 368s ***** assert (any (random (t, 1000, 1) > 0.8), false); 368s ***** assert (std (pd), 0.2887, 1e-4); 368s ***** assert (std (t), 0.1732, 1e-4); 369s ***** assert (var (pd), 0.0833, 1e-4); 369s ***** assert (var (t), 0.0300, 1e-4); 369s ***** error ... 369s BetaDistribution(0, 1) 369s ***** error ... 369s BetaDistribution(Inf, 1) 369s ***** error ... 369s BetaDistribution(i, 1) 369s ***** error ... 369s BetaDistribution("a", 1) 369s ***** error ... 369s BetaDistribution([1, 2], 1) 369s ***** error ... 369s BetaDistribution(NaN, 1) 369s ***** error ... 369s BetaDistribution(1, 0) 369s ***** error ... 369s BetaDistribution(1, -1) 369s ***** error ... 369s BetaDistribution(1, Inf) 369s ***** error ... 369s BetaDistribution(1, i) 369s ***** error ... 369s BetaDistribution(1, "a") 369s ***** error ... 369s BetaDistribution(1, [1, 2]) 369s ***** error ... 369s BetaDistribution(1, NaN) 369s ***** error ... 369s cdf (BetaDistribution, 2, "uper") 369s ***** error ... 369s cdf (BetaDistribution, 2, 3) 369s ***** shared x 369s randg ("seed", 1); 369s x = betarnd (1, 1, [100, 1]); 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 0) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 1) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", "") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 369s "parameter", {"a", "b", "param"}) 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "parameter", "param") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "NAME", "value") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 369s ***** error ... 369s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 369s "NAME", "value") 369s ***** error ... 369s plot (BetaDistribution, "Parent") 369s ***** error ... 369s plot (BetaDistribution, "PlotType", 12) 369s ***** error ... 369s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 369s ***** error ... 369s plot (BetaDistribution, "PlotType", "pdfcdf") 369s ***** error ... 369s plot (BetaDistribution, "Discrete", "pdfcdf") 369s ***** error ... 369s plot (BetaDistribution, "Discrete", [1, 0]) 369s ***** error ... 369s plot (BetaDistribution, "Discrete", {true}) 369s ***** error ... 369s plot (BetaDistribution, "Parent", 12) 369s ***** error ... 369s plot (BetaDistribution, "Parent", "hax") 369s ***** error ... 369s plot (BetaDistribution, "invalidNAME", "pdf") 369s ***** error ... 369s plot (BetaDistribution, "PlotType", "probability") 369s ***** error ... 369s proflik (BetaDistribution, 2) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 3) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), [1, 2]) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), {1}) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, ones (2)) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display") 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display", 1) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 369s ***** error ... 369s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 369s ***** error ... 369s truncate (BetaDistribution) 369s ***** error ... 369s truncate (BetaDistribution, 2) 369s ***** error ... 369s truncate (BetaDistribution, 4, 2) 369s ***** shared pd 369s pd = BetaDistribution(1, 1); 369s pd(2) = BetaDistribution(1, 3); 369s ***** error cdf (pd, 1) 369s ***** error icdf (pd, 0.5) 369s ***** error iqr (pd) 369s ***** error mean (pd) 369s ***** error median (pd) 369s ***** error negloglik (pd) 369s ***** error paramci (pd) 369s ***** error pdf (pd, 1) 369s ***** error plot (pd) 369s ***** error proflik (pd, 2) 369s ***** error random (pd) 369s ***** error std (pd) 369s ***** error ... 369s truncate (pd, 2, 4) 369s ***** error var (pd) 369s 96 tests, 96 passed, 0 known failure, 0 skipped 369s [inst/dist_obj/NakagamiDistribution.m] 369s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/NakagamiDistribution.m 369s ***** shared pd, t 369s pd = NakagamiDistribution; 369s t = truncate (pd, 2, 4); 369s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 369s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 369s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 369s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 369s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 369s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 369s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 369s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 369s ***** assert (iqr (pd), 0.6411, 1e-4); 369s ***** assert (iqr (t), 0.2502, 1e-4); 369s ***** assert (mean (pd), 0.8862, 1e-4); 369s ***** assert (mean (t), 2.2263, 1e-4); 369s ***** assert (median (pd), 0.8326, 1e-4); 369s ***** assert (median (t), 2.1664, 1e-4); 369s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 369s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 369s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 369s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 369s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 369s ***** assert (any (random (t, 1000, 1) < 2), false); 369s ***** assert (any (random (t, 1000, 1) > 4), false); 369s ***** assert (std (pd), 0.4633, 1e-4); 369s ***** assert (std (t), 0.2083, 1e-4); 369s ***** assert (var (pd), 0.2146, 1e-4); 369s ***** assert (var (t), 0.0434, 1e-4); 369s ***** error ... 369s NakagamiDistribution(Inf, 1) 369s ***** error ... 369s NakagamiDistribution(i, 1) 369s ***** error ... 369s NakagamiDistribution("a", 1) 369s ***** error ... 369s NakagamiDistribution([1, 2], 1) 369s ***** error ... 369s NakagamiDistribution(NaN, 1) 369s ***** error ... 369s NakagamiDistribution(1, 0) 369s ***** error ... 369s NakagamiDistribution(1, -1) 369s ***** error ... 369s NakagamiDistribution(1, Inf) 369s ***** error ... 369s NakagamiDistribution(1, i) 369s ***** error ... 369s NakagamiDistribution(1, "a") 369s ***** error ... 369s NakagamiDistribution(1, [1, 2]) 369s ***** error ... 369s NakagamiDistribution(1, NaN) 369s ***** error ... 369s cdf (NakagamiDistribution, 2, "uper") 369s ***** error ... 369s cdf (NakagamiDistribution, 2, 3) 369s ***** shared x 369s x = nakarnd (1, 0.5, [1, 100]); 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 0) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 1) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", "") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 369s "parameter", {"mu", "omega", "param"}) 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "parameter", "param") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "NAME", "value") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 369s ***** error ... 369s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 369s "NAME", "value") 369s ***** error ... 369s plot (NakagamiDistribution, "Parent") 369s ***** error ... 369s plot (NakagamiDistribution, "PlotType", 12) 369s ***** error ... 369s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 369s ***** error ... 369s plot (NakagamiDistribution, "PlotType", "pdfcdf") 369s ***** error ... 369s plot (NakagamiDistribution, "Discrete", "pdfcdf") 369s ***** error ... 369s plot (NakagamiDistribution, "Discrete", [1, 0]) 369s ***** error ... 369s plot (NakagamiDistribution, "Discrete", {true}) 369s ***** error ... 369s plot (NakagamiDistribution, "Parent", 12) 370s ***** error ... 370s plot (NakagamiDistribution, "Parent", "hax") 370s ***** error ... 370s plot (NakagamiDistribution, "invalidNAME", "pdf") 370s ***** error ... 370s plot (NakagamiDistribution, "PlotType", "probability") 370s ***** error ... 370s proflik (NakagamiDistribution, 2) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 3) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), [1, 2]) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), {1}) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display") 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 370s ***** error ... 370s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 370s ***** error ... 370s truncate (NakagamiDistribution) 370s ***** error ... 370s truncate (NakagamiDistribution, 2) 370s ***** error ... 370s truncate (NakagamiDistribution, 4, 2) 370s ***** shared pd 370s pd = NakagamiDistribution(1, 0.5); 370s pd(2) = NakagamiDistribution(1, 0.6); 370s ***** error cdf (pd, 1) 370s ***** error icdf (pd, 0.5) 370s ***** error iqr (pd) 370s ***** error mean (pd) 370s ***** error median (pd) 370s ***** error negloglik (pd) 370s ***** error paramci (pd) 370s ***** error pdf (pd, 1) 370s ***** error plot (pd) 370s ***** error proflik (pd, 2) 370s ***** error random (pd) 370s ***** error std (pd) 370s ***** error ... 370s truncate (pd, 2, 4) 370s ***** error var (pd) 370s 95 tests, 95 passed, 0 known failure, 0 skipped 370s [inst/dist_obj/ExtremeValueDistribution.m] 370s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/ExtremeValueDistribution.m 370s ***** shared pd, t 370s pd = ExtremeValueDistribution (0, 1); 370s t = truncate (pd, 2, 4); 370s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 370s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 370s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 370s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 370s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 370s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 370s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 370s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 370s ***** assert (iqr (pd), 1.5725, 1e-4); 370s ***** assert (iqr (t), 0.1338, 1e-4); 370s ***** assert (mean (pd), -0.5772, 1e-4); 370s ***** assert (mean (t), 2.1206, 1e-4); 370s ***** assert (median (pd), -0.3665, 1e-4); 370s ***** assert (median (t), 2.0897, 1e-4); 370s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 370s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 370s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 370s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 370s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 370s ***** assert (any (random (t, 1000, 1) < 2), false); 370s ***** assert (any (random (t, 1000, 1) > 4), false); 370s ***** assert (std (pd), 1.2825, 1e-4); 370s ***** assert (std (t), 0.1091, 1e-4); 370s ***** assert (var (pd), 1.6449, 1e-4); 370s ***** assert (var (t), 0.0119, 1e-4); 370s ***** error ... 370s ExtremeValueDistribution(Inf, 1) 370s ***** error ... 370s ExtremeValueDistribution(i, 1) 370s ***** error ... 370s ExtremeValueDistribution("a", 1) 370s ***** error ... 370s ExtremeValueDistribution([1, 2], 1) 370s ***** error ... 370s ExtremeValueDistribution(NaN, 1) 370s ***** error ... 370s ExtremeValueDistribution(1, 0) 370s ***** error ... 370s ExtremeValueDistribution(1, -1) 370s ***** error ... 370s ExtremeValueDistribution(1, Inf) 370s ***** error ... 370s ExtremeValueDistribution(1, i) 370s ***** error ... 370s ExtremeValueDistribution(1, "a") 370s ***** error ... 370s ExtremeValueDistribution(1, [1, 2]) 370s ***** error ... 370s ExtremeValueDistribution(1, NaN) 370s ***** error ... 370s cdf (ExtremeValueDistribution, 2, "uper") 370s ***** error ... 370s cdf (ExtremeValueDistribution, 2, 3) 370s ***** shared x 370s rand ("seed", 1); 370s x = evrnd (1, 1, [1000, 1]); 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), ... 370s "parameter", "mu", "alpha", {0.05}) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), ... 370s "parameter", {"mu", "sigma", "param"}) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 370s "parameter", {"mu", "sigma", "param"}) 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 370s "parameter", "param") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 370s ***** error ... 370s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 370s "parameter", "mu", "NAME", "value") 370s ***** error ... 370s plot (ExtremeValueDistribution, "Parent") 370s ***** error ... 370s plot (ExtremeValueDistribution, "PlotType", 12) 370s ***** error ... 370s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 370s ***** error ... 370s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 370s ***** error ... 370s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 370s ***** error ... 370s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 370s ***** error ... 370s plot (ExtremeValueDistribution, "Discrete", {true}) 370s ***** error ... 370s plot (ExtremeValueDistribution, "Parent", 12) 370s ***** error ... 370s plot (ExtremeValueDistribution, "Parent", "hax") 370s ***** error ... 370s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 370s ***** error ... 370s plot (ExtremeValueDistribution, "PlotType", "probability") 370s ***** error ... 370s proflik (ExtremeValueDistribution, 2) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 3) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), {1}) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 370s ***** error ... 370s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 370s ***** error ... 370s truncate (ExtremeValueDistribution) 370s ***** error ... 370s truncate (ExtremeValueDistribution, 2) 370s ***** error ... 370s truncate (ExtremeValueDistribution, 4, 2) 370s ***** shared pd 370s pd = ExtremeValueDistribution(1, 1); 370s pd(2) = ExtremeValueDistribution(1, 3); 370s ***** error cdf (pd, 1) 370s ***** error icdf (pd, 0.5) 370s ***** error iqr (pd) 370s ***** error mean (pd) 370s ***** error median (pd) 370s ***** error negloglik (pd) 370s ***** error paramci (pd) 370s ***** error pdf (pd, 1) 370s ***** error plot (pd) 370s ***** error proflik (pd, 2) 370s ***** error random (pd) 370s ***** error std (pd) 370s ***** error ... 370s truncate (pd, 2, 4) 370s ***** error var (pd) 370s 95 tests, 95 passed, 0 known failure, 0 skipped 370s [inst/dist_obj/UniformDistribution.m] 370s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/UniformDistribution.m 370s ***** shared pd, t 370s pd = UniformDistribution (0, 5); 370s t = truncate (pd, 2, 4); 370s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 370s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 370s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 370s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 370s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 370s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 370s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 370s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 370s ***** assert (iqr (pd), 2.5, 1e-14); 370s ***** assert (iqr (t), 1, 1e-14); 370s ***** assert (mean (pd), 2.5, 1e-14); 370s ***** assert (mean (t), 3, 1e-14); 370s ***** assert (median (pd), 2.5, 1e-14); 370s ***** assert (median (t), 3, 1e-14); 370s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 370s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 370s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 370s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 370s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 370s ***** assert (any (random (t, 1000, 1) < 2), false); 370s ***** assert (any (random (t, 1000, 1) > 4), false); 370s ***** assert (std (pd), 1.4434, 1e-4); 370s ***** assert (std (t), 0.5774, 1e-4); 370s ***** assert (var (pd), 2.0833, 1e-4); 370s ***** assert (var (t), 0.3333, 1e-4); 370s ***** error ... 370s UniformDistribution (i, 1) 370s ***** error ... 370s UniformDistribution (Inf, 1) 370s ***** error ... 370s UniformDistribution ([1, 2], 1) 370s ***** error ... 370s UniformDistribution ("a", 1) 370s ***** error ... 370s UniformDistribution (NaN, 1) 370s ***** error ... 370s UniformDistribution (1, i) 370s ***** error ... 370s UniformDistribution (1, Inf) 370s ***** error ... 370s UniformDistribution (1, [1, 2]) 370s ***** error ... 370s UniformDistribution (1, "a") 370s ***** error ... 370s UniformDistribution (1, NaN) 370s ***** error ... 370s UniformDistribution (2, 1) 370s ***** error ... 370s cdf (UniformDistribution, 2, "uper") 370s ***** error ... 370s cdf (UniformDistribution, 2, 3) 370s ***** error ... 370s plot (UniformDistribution, "Parent") 370s ***** error ... 370s plot (UniformDistribution, "PlotType", 12) 370s ***** error ... 370s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 370s ***** error ... 370s plot (UniformDistribution, "PlotType", "pdfcdf") 370s ***** error ... 370s plot (UniformDistribution, "Discrete", "pdfcdf") 370s ***** error ... 370s plot (UniformDistribution, "Discrete", [1, 0]) 370s ***** error ... 370s plot (UniformDistribution, "Discrete", {true}) 370s ***** error ... 370s plot (UniformDistribution, "Parent", 12) 370s ***** error ... 370s plot (UniformDistribution, "Parent", "hax") 370s ***** error ... 370s plot (UniformDistribution, "invalidNAME", "pdf") 370s ***** error ... 370s plot (UniformDistribution, "PlotType", "probability") 370s ***** error ... 370s truncate (UniformDistribution) 370s ***** error ... 370s truncate (UniformDistribution, 2) 370s ***** error ... 370s truncate (UniformDistribution, 4, 2) 370s ***** shared pd 370s pd = UniformDistribution (0, 1); 370s pd(2) = UniformDistribution (0, 2); 370s ***** error cdf (pd, 1) 370s ***** error icdf (pd, 0.5) 370s ***** error iqr (pd) 370s ***** error mean (pd) 370s ***** error median (pd) 370s ***** error pdf (pd, 1) 370s ***** error plot (pd) 370s ***** error random (pd) 370s ***** error std (pd) 370s ***** error ... 370s truncate (pd, 2, 4) 370s ***** error var (pd) 370s 63 tests, 63 passed, 0 known failure, 0 skipped 370s [inst/dist_obj/WeibullDistribution.m] 370s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/WeibullDistribution.m 370s ***** shared pd, t 370s pd = WeibullDistribution; 370s t = truncate (pd, 2, 4); 370s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 370s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 370s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 371s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 371s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 371s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 371s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 371s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 371s ***** assert (iqr (pd), 1.0986, 1e-4); 371s ***** assert (iqr (t), 0.8020, 1e-4); 371s ***** assert (mean (pd), 1, 1e-14); 371s ***** assert (mean (t), 2.6870, 1e-4); 371s ***** assert (median (pd), 0.6931, 1e-4); 371s ***** assert (median (t), 2.5662, 1e-4); 371s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 371s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 371s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 371s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 371s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 371s ***** assert (any (random (t, 1000, 1) < 2), false); 371s ***** assert (any (random (t, 1000, 1) > 4), false); 371s ***** assert (std (pd), 1, 1e-14); 371s ***** assert (std (t), 0.5253, 1e-4); 371s ***** assert (var (pd), 1, 1e-14); 371s ***** assert (var (t), 0.2759, 1e-4); 371s ***** error ... 371s WeibullDistribution(0, 1) 371s ***** error ... 371s WeibullDistribution(-1, 1) 371s ***** error ... 371s WeibullDistribution(Inf, 1) 371s ***** error ... 371s WeibullDistribution(i, 1) 371s ***** error ... 371s WeibullDistribution("a", 1) 371s ***** error ... 371s WeibullDistribution([1, 2], 1) 371s ***** error ... 371s WeibullDistribution(NaN, 1) 371s ***** error ... 371s WeibullDistribution(1, 0) 371s ***** error ... 371s WeibullDistribution(1, -1) 371s ***** error ... 371s WeibullDistribution(1, Inf) 371s ***** error ... 371s WeibullDistribution(1, i) 371s ***** error ... 371s WeibullDistribution(1, "a") 371s ***** error ... 371s WeibullDistribution(1, [1, 2]) 371s ***** error ... 371s WeibullDistribution(1, NaN) 371s ***** error ... 371s cdf (WeibullDistribution, 2, "uper") 371s ***** error ... 371s cdf (WeibullDistribution, 2, 3) 371s ***** shared x 371s x = wblrnd (1, 1, [1, 100]); 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 0) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 1) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", "") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 371s "parameter", {"lambda", "k", "param"}) 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "parameter", "param") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "NAME", "value") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 371s ***** error ... 371s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 371s "NAME", "value") 371s ***** error ... 371s plot (WeibullDistribution, "Parent") 371s ***** error ... 371s plot (WeibullDistribution, "PlotType", 12) 371s ***** error ... 371s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 371s ***** error ... 371s plot (WeibullDistribution, "PlotType", "pdfcdf") 371s ***** error ... 371s plot (WeibullDistribution, "Discrete", "pdfcdf") 371s ***** error ... 371s plot (WeibullDistribution, "Discrete", [1, 0]) 371s ***** error ... 371s plot (WeibullDistribution, "Discrete", {true}) 371s ***** error ... 371s plot (WeibullDistribution, "Parent", 12) 371s ***** error ... 371s plot (WeibullDistribution, "Parent", "hax") 371s ***** error ... 371s plot (WeibullDistribution, "invalidNAME", "pdf") 371s ***** error ... 371s plot (WeibullDistribution, "PlotType", "probability") 371s ***** error ... 371s proflik (WeibullDistribution, 2) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 3) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), [1, 2]) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), {1}) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, ones (2)) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display") 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 371s ***** error ... 371s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 371s ***** error ... 371s truncate (WeibullDistribution) 371s ***** error ... 371s truncate (WeibullDistribution, 2) 371s ***** error ... 371s truncate (WeibullDistribution, 4, 2) 371s ***** shared pd 371s pd = WeibullDistribution(1, 1); 371s pd(2) = WeibullDistribution(1, 3); 371s ***** error cdf (pd, 1) 371s ***** error icdf (pd, 0.5) 371s ***** error iqr (pd) 371s ***** error mean (pd) 371s ***** error median (pd) 371s ***** error negloglik (pd) 371s ***** error paramci (pd) 371s ***** error pdf (pd, 1) 371s ***** error plot (pd) 371s ***** error proflik (pd, 2) 371s ***** error random (pd) 371s ***** error std (pd) 371s ***** error ... 371s truncate (pd, 2, 4) 371s ***** error var (pd) 371s 97 tests, 97 passed, 0 known failure, 0 skipped 371s [inst/dist_obj/MultinomialDistribution.m] 371s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/MultinomialDistribution.m 371s ***** shared pd, t 371s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 371s t = truncate (pd, 2, 4); 371s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 371s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 371s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 371s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 371s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 371s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 371s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 371s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 371s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 371s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 371s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 371s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 371s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 371s ***** assert (iqr (pd), 2); 371s ***** assert (iqr (t), 2); 371s ***** assert (mean (pd), 3.3, 1e-14); 371s ***** assert (mean (t), 3, eps); 371s ***** assert (median (pd), 3); 371s ***** assert (median (t), 3); 371s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 371s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 371s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 371s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 371s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 371s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 371s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 371s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 371s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 371s ***** assert (std (pd), 1.4177, 1e-4); 371s ***** assert (std (t), 0.7559, 1e-4); 371s ***** assert (var (pd), 2.0100, 1e-4); 371s ***** assert (var (t), 0.5714, 1e-4); 371s ***** error ... 371s MultinomialDistribution(0) 371s ***** error ... 371s MultinomialDistribution(-1) 371s ***** error ... 371s MultinomialDistribution(Inf) 371s ***** error ... 371s MultinomialDistribution(i) 371s ***** error ... 371s MultinomialDistribution("a") 371s ***** error ... 371s MultinomialDistribution([1, 2]) 371s ***** error ... 371s MultinomialDistribution(NaN) 371s ***** error ... 371s cdf (MultinomialDistribution, 2, "uper") 371s ***** error ... 371s cdf (MultinomialDistribution, 2, 3) 371s ***** error ... 371s cdf (MultinomialDistribution, i) 371s ***** error ... 371s plot (MultinomialDistribution, "Parent") 371s ***** error ... 371s plot (MultinomialDistribution, "PlotType", 12) 371s ***** error ... 371s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 371s ***** error ... 371s plot (MultinomialDistribution, "PlotType", "pdfcdf") 371s ***** error ... 371s plot (MultinomialDistribution, "Discrete", "pdfcdf") 371s ***** error ... 371s plot (MultinomialDistribution, "Discrete", [1, 0]) 371s ***** error ... 371s plot (MultinomialDistribution, "Discrete", {true}) 371s ***** error ... 371s plot (MultinomialDistribution, "Parent", 12) 371s ***** error ... 371s plot (MultinomialDistribution, "Parent", "hax") 371s ***** error ... 371s plot (MultinomialDistribution, "invalidNAME", "pdf") 371s ***** error ... 371s plot (MultinomialDistribution, "PlotType", "probability") 371s ***** error ... 371s truncate (MultinomialDistribution) 371s ***** error ... 371s truncate (MultinomialDistribution, 2) 371s ***** error ... 371s truncate (MultinomialDistribution, 4, 2) 371s ***** shared pd 371s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 371s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 371s ***** error cdf (pd, 1) 371s ***** error icdf (pd, 0.5) 371s ***** error iqr (pd) 371s ***** error mean (pd) 371s ***** error median (pd) 371s ***** error pdf (pd, 1) 371s ***** error plot (pd) 371s ***** error random (pd) 371s ***** error std (pd) 371s ***** error ... 371s truncate (pd, 2, 4) 371s ***** error var (pd) 371s 64 tests, 64 passed, 0 known failure, 0 skipped 371s [inst/dist_obj/BurrDistribution.m] 371s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/BurrDistribution.m 371s ***** demo 371s ## Generate a data set of 5000 random samples from a Burr type XII 371s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 371s ## XII distribution to this data and plot a PDF of the fitted distribution 371s ## superimposed on a histogram of the data 371s 371s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 371s rand ("seed", 21); 371s data = random (pd, 5000, 1); 371s pd = fitdist (data, "Burr") 371s plot (pd) 371s msg = strcat (["Fitted Burr type XII distribution with"], ... 371s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 371s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 371s ***** demo 371s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 371s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 371s ## samples from this truncated distribution and superimpose a histogram with 371s ## 100 bins scaled accordingly 371s 371s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 371s t = truncate (pd, 0.5, 2.5) 371s rand ("seed", 21); 371s data = random (t, 10000, 1); 371s plot (t) 371s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 371s hold on 371s hist (data, 100, 50) 371s hold off 371s ***** demo 371s ## Generate a data set of 100 random samples from a Burr type XII 371s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 371s ## XII distribution to this data and plot its CDF superimposed over an 371s ## empirical CDF of the data 371s 371s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 371s rand ("seed", 21); 371s data = random (pd, 100, 1); 371s pd = fitdist (data, "Burr") 371s plot (pd, "plottype", "cdf") 371s msg = strcat (["Fitted Burr type XII distribution with"], ... 371s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 371s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 371s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 371s ***** shared pd, t 371s pd = BurrDistribution; 371s t = truncate (pd, 2, 4); 371s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 371s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 371s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 371s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 371s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 371s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 371s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 371s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 371s ***** assert (iqr (pd), 2.6667, 1e-4); 371s ***** assert (iqr (t), 0.9524, 1e-4); 371s ***** assert (mean (pd), Inf); 371s ***** assert (mean (t), 2.8312, 1e-4); 371s ***** assert (median (pd), 1, 1e-4); 371s ***** assert (median (t), 2.75, 1e-4); 371s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 371s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 371s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 371s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 371s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 371s ***** assert (any (random (t, 1000, 1) < 2), false); 371s ***** assert (any (random (t, 1000, 1) > 4), false); 371s ***** assert (std (pd), Inf); 371s ***** assert (std (t), 0.5674, 1e-4); 371s ***** assert (var (pd), Inf); 371s ***** assert (var (t), 0.3220, 1e-4); 371s ***** error ... 371s BurrDistribution(0, 1, 1) 371s ***** error ... 371s BurrDistribution(-1, 1, 1) 371s ***** error ... 371s BurrDistribution(Inf, 1, 1) 371s ***** error ... 371s BurrDistribution(i, 1, 1) 371s ***** error ... 371s BurrDistribution("a", 1, 1) 371s ***** error ... 371s BurrDistribution([1, 2], 1, 1) 371s ***** error ... 371s BurrDistribution(NaN, 1, 1) 371s ***** error ... 371s BurrDistribution(1, 0, 1) 371s ***** error ... 371s BurrDistribution(1, -1, 1) 371s ***** error ... 371s BurrDistribution(1, Inf, 1) 371s ***** error ... 371s BurrDistribution(1, i, 1) 371s ***** error ... 371s BurrDistribution(1, "a", 1) 371s ***** error ... 371s BurrDistribution(1, [1, 2], 1) 371s ***** error ... 371s BurrDistribution(1, NaN, 1) 371s ***** error ... 371s BurrDistribution(1, 1, 0) 371s ***** error ... 371s BurrDistribution(1, 1, -1) 371s ***** error ... 371s BurrDistribution(1, 1, Inf) 371s ***** error ... 371s BurrDistribution(1, 1, i) 371s ***** error ... 371s BurrDistribution(1, 1, "a") 371s ***** error ... 371s BurrDistribution(1, 1, [1, 2]) 371s ***** error ... 371s BurrDistribution(1, 1, NaN) 371s ***** error ... 371s cdf (BurrDistribution, 2, "uper") 371s ***** error ... 371s cdf (BurrDistribution, 2, 3) 371s ***** shared x 371s rand ("seed", 4); 371s x = burrrnd (1, 1, 1, [1, 100]); 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha") 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", 0) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", 1) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", "") 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 371s "parameter", {"alpha", "c", "k", "param"}) 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "parameter", "param") 371s ***** error ... 371s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 372s ***** error ... 372s paramci (BurrDistribution.fit (x), "NAME", "value") 372s ***** error ... 372s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 372s ***** error ... 372s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 372s "NAME", "value") 372s ***** error ... 372s plot (BurrDistribution, "Parent") 372s ***** error ... 372s plot (BurrDistribution, "PlotType", 12) 372s ***** error ... 372s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 372s ***** error ... 372s plot (BurrDistribution, "PlotType", "pdfcdf") 372s ***** error ... 372s plot (BurrDistribution, "Discrete", "pdfcdf") 372s ***** error ... 372s plot (BurrDistribution, "Discrete", [1, 0]) 372s ***** error ... 372s plot (BurrDistribution, "Discrete", {true}) 372s ***** error ... 372s plot (BurrDistribution, "Parent", 12) 372s ***** error ... 372s plot (BurrDistribution, "Parent", "hax") 372s ***** error ... 372s plot (BurrDistribution, "invalidNAME", "pdf") 372s ***** error ... 372s plot (BurrDistribution, "PlotType", "probability") 372s ***** error ... 372s proflik (BurrDistribution, 2) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 4) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), [1, 2]) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), {1}) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, ones (2)) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display") 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display", 1) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 372s ***** error ... 372s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 373s ***** error ... 373s truncate (BurrDistribution) 373s ***** error ... 373s truncate (BurrDistribution, 2) 373s ***** error ... 373s truncate (BurrDistribution, 4, 2) 373s ***** shared pd 373s pd = BurrDistribution(1, 1, 1); 373s pd(2) = BurrDistribution(1, 3, 1); 373s ***** error cdf (pd, 1) 373s ***** error icdf (pd, 0.5) 373s ***** error iqr (pd) 373s ***** error mean (pd) 373s ***** error median (pd) 373s ***** error negloglik (pd) 373s ***** error paramci (pd) 373s ***** error pdf (pd, 1) 373s ***** error plot (pd) 373s ***** error proflik (pd, 2) 373s ***** error random (pd) 373s ***** error std (pd) 373s ***** error ... 373s truncate (pd, 2, 4) 373s ***** error var (pd) 373s 104 tests, 104 passed, 0 known failure, 0 skipped 373s [inst/dist_obj/RicianDistribution.m] 373s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/RicianDistribution.m 373s ***** shared pd, t 373s pd = RicianDistribution; 373s t = truncate (pd, 2, 4); 373s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 373s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 373s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 373s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 373s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 373s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 373s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 373s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 373s ***** assert (iqr (pd), 1.0890, 1e-4); 373s ***** assert (iqr (t), 0.5928, 1e-4); 373s ***** assert (mean (pd), 1.5486, 1e-4); 373s ***** assert (mean (t), 2.5380, 1e-4); 373s ***** assert (median (pd), 1.4755, 1e-4); 373s ***** assert (median (t), 2.4341, 1e-4); 373s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 373s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 373s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 373s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 373s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 373s ***** assert (any (random (t, 1000, 1) < 2), false); 373s ***** assert (any (random (t, 1000, 1) > 4), false); 373s ***** assert (std (pd), 0.7758, 1e-4); 373s ***** assert (std (t), 0.4294, 1e-4); 373s ***** assert (var (pd), 0.6019, 1e-4); 373s ***** assert (var (t), 0.1844, 1e-4); 373s ***** error ... 373s RicianDistribution(-eps, 1) 373s ***** error ... 373s RicianDistribution(-1, 1) 373s ***** error ... 373s RicianDistribution(Inf, 1) 373s ***** error ... 373s RicianDistribution(i, 1) 373s ***** error ... 373s RicianDistribution("a", 1) 373s ***** error ... 373s RicianDistribution([1, 2], 1) 373s ***** error ... 373s RicianDistribution(NaN, 1) 373s ***** error ... 373s RicianDistribution(1, 0) 373s ***** error ... 373s RicianDistribution(1, -1) 373s ***** error ... 373s RicianDistribution(1, Inf) 373s ***** error ... 373s RicianDistribution(1, i) 373s ***** error ... 373s RicianDistribution(1, "a") 373s ***** error ... 373s RicianDistribution(1, [1, 2]) 373s ***** error ... 373s RicianDistribution(1, NaN) 373s ***** error ... 373s cdf (RicianDistribution, 2, "uper") 373s ***** error ... 373s cdf (RicianDistribution, 2, 3) 373s ***** shared x 373s x = gevrnd (1, 1, 1, [1, 100]); 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha") 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", 0) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", 1) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", "") 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 373s "parameter", {"s", "sigma", "param"}) 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "parameter", "param") 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "NAME", "value") 373s ***** error ... 373s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 374s ***** error ... 374s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 374s "NAME", "value") 374s ***** error ... 374s plot (RicianDistribution, "Parent") 374s ***** error ... 374s plot (RicianDistribution, "PlotType", 12) 374s ***** error ... 374s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 374s ***** error ... 374s plot (RicianDistribution, "PlotType", "pdfcdf") 374s ***** error ... 374s plot (RicianDistribution, "Discrete", "pdfcdf") 374s ***** error ... 374s plot (RicianDistribution, "Discrete", [1, 0]) 374s ***** error ... 374s plot (RicianDistribution, "Discrete", {true}) 374s ***** error ... 374s plot (RicianDistribution, "Parent", 12) 374s ***** error ... 374s plot (RicianDistribution, "Parent", "hax") 374s ***** error ... 374s plot (RicianDistribution, "invalidNAME", "pdf") 374s ***** error ... 374s plot (RicianDistribution, "PlotType", "probability") 374s ***** error ... 374s proflik (RicianDistribution, 2) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 3) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), [1, 2]) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), {1}) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, ones (2)) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display") 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display", 1) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 374s ***** error ... 374s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 374s ***** error ... 374s truncate (RicianDistribution) 374s ***** error ... 374s truncate (RicianDistribution, 2) 374s ***** error ... 374s truncate (RicianDistribution, 4, 2) 374s ***** shared pd 374s pd = RicianDistribution(1, 1); 374s pd(2) = RicianDistribution(1, 3); 374s ***** error cdf (pd, 1) 374s ***** error icdf (pd, 0.5) 374s ***** error iqr (pd) 374s ***** error mean (pd) 374s ***** error median (pd) 374s ***** error negloglik (pd) 374s ***** error paramci (pd) 374s ***** error pdf (pd, 1) 374s ***** error plot (pd) 374s ***** error proflik (pd, 2) 374s ***** error random (pd) 374s ***** error std (pd) 374s ***** error ... 374s truncate (pd, 2, 4) 374s ***** error var (pd) 374s 97 tests, 97 passed, 0 known failure, 0 skipped 374s [inst/dist_obj/RayleighDistribution.m] 374s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/RayleighDistribution.m 374s ***** shared pd, t 374s pd = RayleighDistribution; 374s t = truncate (pd, 2, 4); 374s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 374s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 374s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 374s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 374s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 374s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 374s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 374s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 374s ***** assert (iqr (pd), 0.9066, 1e-4); 374s ***** assert (iqr (t), 0.4609, 1e-4); 374s ***** assert (mean (pd), 1.2533, 1e-4); 374s ***** assert (mean (t), 2.4169, 1e-4); 374s ***** assert (median (pd), 1.1774, 1e-4); 374s ***** assert (median (t), 2.3198, 1e-4); 374s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 374s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 374s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 374s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 374s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 374s ***** assert (any (random (t, 1000, 1) < 2), false); 374s ***** assert (any (random (t, 1000, 1) > 4), false); 374s ***** assert (std (pd), 0.6551, 1e-4); 374s ***** assert (std (t), 0.3591, 1e-4); 374s ***** assert (var (pd), 0.4292, 1e-4); 374s ***** assert (var (t), 0.1290, 1e-4); 374s ***** error ... 374s RayleighDistribution(0) 374s ***** error ... 374s RayleighDistribution(-1) 374s ***** error ... 374s RayleighDistribution(Inf) 374s ***** error ... 374s RayleighDistribution(i) 374s ***** error ... 374s RayleighDistribution("a") 374s ***** error ... 374s RayleighDistribution([1, 2]) 374s ***** error ... 374s RayleighDistribution(NaN) 374s ***** error ... 374s cdf (RayleighDistribution, 2, "uper") 374s ***** error ... 374s cdf (RayleighDistribution, 2, 3) 374s ***** shared x 374s x = raylrnd (1, [1, 100]); 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 0) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 1) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", "") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 374s "parameter", {"sigma", "param"}) 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "parameter", "param") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "NAME", "value") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 374s ***** error ... 374s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 374s "parameter", "sigma", "NAME", "value") 374s ***** error ... 374s plot (RayleighDistribution, "Parent") 374s ***** error ... 374s plot (RayleighDistribution, "PlotType", 12) 374s ***** error ... 374s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 374s ***** error ... 374s plot (RayleighDistribution, "PlotType", "pdfcdf") 374s ***** error ... 374s plot (RayleighDistribution, "Discrete", "pdfcdf") 374s ***** error ... 374s plot (RayleighDistribution, "Discrete", [1, 0]) 374s ***** error ... 374s plot (RayleighDistribution, "Discrete", {true}) 374s ***** error ... 374s plot (RayleighDistribution, "Parent", 12) 374s ***** error ... 374s plot (RayleighDistribution, "Parent", "hax") 374s ***** error ... 374s plot (RayleighDistribution, "invalidNAME", "pdf") 374s ***** error ... 374s plot (RayleighDistribution, "PlotType", "probability") 374s ***** error ... 374s proflik (RayleighDistribution, 2) 374s ***** error ... 374s proflik (RayleighDistribution.fit (x), 3) 374s ***** error ... 374s proflik (RayleighDistribution.fit (x), [1, 2]) 374s ***** error ... 374s proflik (RayleighDistribution.fit (x), {1}) 374s ***** error ... 374s proflik (RayleighDistribution.fit (x), 1, ones (2)) 374s ***** error ... 374s proflik (RayleighDistribution.fit (x), 1, "Display") 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 375s ***** error ... 375s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 375s ***** error ... 375s truncate (RayleighDistribution) 375s ***** error ... 375s truncate (RayleighDistribution, 2) 375s ***** error ... 375s truncate (RayleighDistribution, 4, 2) 375s ***** shared pd 375s pd = RayleighDistribution(1); 375s pd(2) = RayleighDistribution(3); 375s ***** error cdf (pd, 1) 375s ***** error icdf (pd, 0.5) 375s ***** error iqr (pd) 375s ***** error mean (pd) 375s ***** error median (pd) 375s ***** error negloglik (pd) 375s ***** error paramci (pd) 375s ***** error pdf (pd, 1) 375s ***** error plot (pd) 375s ***** error proflik (pd, 2) 375s ***** error random (pd) 375s ***** error std (pd) 375s ***** error ... 375s truncate (pd, 2, 4) 375s ***** error var (pd) 375s 90 tests, 90 passed, 0 known failure, 0 skipped 375s [inst/dist_obj/NegativeBinomialDistribution.m] 375s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/NegativeBinomialDistribution.m 375s ***** shared pd, t, t_inf 375s pd = NegativeBinomialDistribution (5, 0.5); 375s t = truncate (pd, 2, 4); 375s t_inf = truncate (pd, 2, Inf); 375s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 375s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 375s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 375s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 375s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 375s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 375s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 375s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 375s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 375s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 375s ***** assert (iqr (pd), 4); 375s ***** assert (iqr (t), 2); 375s ***** assert (mean (pd), 5); 375s ***** assert (mean (t), 3.0500, 1e-4); 375s ***** assert (mean (t_inf), 5.5263, 1e-4); 375s ***** assert (median (pd), 4); 375s ***** assert (median (t), 3); 375s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 375s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 375s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 375s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 375s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 375s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 375s ***** assert (any (random (t, 1000, 1) < 2), false); 375s ***** assert (any (random (t, 1000, 1) > 4), false); 375s ***** assert (std (pd), 3.1623, 1e-4); 375s ***** assert (std (t), 0.8047, 1e-4); 375s ***** assert (std (t_inf), 2.9445, 1e-4); 375s ***** assert (var (pd), 10); 375s ***** assert (var (t), 0.6475, 1e-4); 375s ***** assert (var (t_inf), 8.6704, 1e-4); 375s ***** error ... 375s NegativeBinomialDistribution(Inf, 1) 375s ***** error ... 375s NegativeBinomialDistribution(i, 1) 375s ***** error ... 375s NegativeBinomialDistribution("a", 1) 375s ***** error ... 375s NegativeBinomialDistribution([1, 2], 1) 375s ***** error ... 375s NegativeBinomialDistribution(NaN, 1) 375s ***** error ... 375s NegativeBinomialDistribution(1, 0) 375s ***** error ... 375s NegativeBinomialDistribution(1, -1) 375s ***** error ... 375s NegativeBinomialDistribution(1, Inf) 375s ***** error ... 375s NegativeBinomialDistribution(1, i) 375s ***** error ... 375s NegativeBinomialDistribution(1, "a") 375s ***** error ... 375s NegativeBinomialDistribution(1, [1, 2]) 375s ***** error ... 375s NegativeBinomialDistribution(1, NaN) 375s ***** error ... 375s NegativeBinomialDistribution(1, 1.2) 375s ***** error ... 375s cdf (NegativeBinomialDistribution, 2, "uper") 375s ***** error ... 375s cdf (NegativeBinomialDistribution, 2, 3) 375s ***** shared x 375s x = nbinrnd (1, 0.5, [1, 100]); 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 375s "alpha", {0.05}) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), ... 375s "parameter", {"R", "P", "param"}) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 375s "parameter", {"R", "P", "param"}) 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 375s "parameter", "param") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 375s "NAME", "value") 375s ***** error ... 375s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 375s "parameter", "R", "NAME", "value") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Parent") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "PlotType", 12) 375s ***** error ... 375s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 375s ***** error ... 375s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Discrete", {true}) 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Parent", 12) 375s ***** error ... 375s plot (NegativeBinomialDistribution, "Parent", "hax") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 375s ***** error ... 375s plot (NegativeBinomialDistribution, "PlotType", "probability") 375s ***** error ... 375s proflik (NegativeBinomialDistribution, 2) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 3) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), {1}) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 375s ***** error ... 375s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 375s ***** error ... 375s truncate (NegativeBinomialDistribution) 375s ***** error ... 375s truncate (NegativeBinomialDistribution, 2) 375s ***** error ... 375s truncate (NegativeBinomialDistribution, 4, 2) 375s ***** shared pd 375s pd = NegativeBinomialDistribution(1, 0.5); 375s pd(2) = NegativeBinomialDistribution(1, 0.6); 375s ***** error cdf (pd, 1) 375s ***** error icdf (pd, 0.5) 375s ***** error iqr (pd) 375s ***** error mean (pd) 375s ***** error median (pd) 375s ***** error negloglik (pd) 375s ***** error paramci (pd) 375s ***** error pdf (pd, 1) 375s ***** error plot (pd) 375s ***** error proflik (pd, 2) 375s ***** error random (pd) 375s ***** error std (pd) 375s ***** error ... 375s truncate (pd, 2, 4) 375s ***** error var (pd) 375s 102 tests, 102 passed, 0 known failure, 0 skipped 375s [inst/dist_obj/LogisticDistribution.m] 375s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/LogisticDistribution.m 375s ***** shared pd, t 375s pd = LogisticDistribution (0, 1); 375s t = truncate (pd, 2, 4); 375s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 375s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 375s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 375s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 375s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 375s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 375s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 375s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 375s ***** assert (iqr (pd), 2.1972, 1e-4); 375s ***** assert (iqr (t), 0.8286, 1e-4); 375s ***** assert (mean (pd), 0, 1e-4); 375s ***** assert (mean (t), 2.7193, 1e-4); 375s ***** assert (median (pd), 0); 375s ***** assert (median (t), 2.6085, 1e-4); 375s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 375s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 375s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 375s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 375s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 375s ***** assert (any (random (t, 1000, 1) < 2), false); 375s ***** assert (any (random (t, 1000, 1) > 4), false); 375s ***** assert (std (pd), 1.8138, 1e-4); 375s ***** assert (std (t), 0.5320, 1e-4); 375s ***** assert (var (pd), 3.2899, 1e-4); 375s ***** assert (var (t), 0.2830, 1e-4); 375s ***** error ... 375s LogisticDistribution(Inf, 1) 375s ***** error ... 375s LogisticDistribution(i, 1) 375s ***** error ... 375s LogisticDistribution("a", 1) 375s ***** error ... 375s LogisticDistribution([1, 2], 1) 375s ***** error ... 375s LogisticDistribution(NaN, 1) 375s ***** error ... 375s LogisticDistribution(1, 0) 375s ***** error ... 375s LogisticDistribution(1, -1) 375s ***** error ... 375s LogisticDistribution(1, Inf) 375s ***** error ... 375s LogisticDistribution(1, i) 375s ***** error ... 375s LogisticDistribution(1, "a") 375s ***** error ... 375s LogisticDistribution(1, [1, 2]) 375s ***** error ... 375s LogisticDistribution(1, NaN) 375s ***** error ... 375s cdf (LogisticDistribution, 2, "uper") 375s ***** error ... 375s cdf (LogisticDistribution, 2, 3) 375s ***** shared x 375s x = logirnd (1, 1, [1, 100]); 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha") 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", 0) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", 1) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", "") 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 375s "parameter", {"mu", "sigma", "param"}) 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "parameter", "param") 375s ***** error ... 375s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 376s ***** error ... 376s paramci (LogisticDistribution.fit (x), "NAME", "value") 376s ***** error ... 376s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 376s ***** error ... 376s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 376s "NAME", "value") 376s ***** error ... 376s plot (LogisticDistribution, "Parent") 376s ***** error ... 376s plot (LogisticDistribution, "PlotType", 12) 376s ***** error ... 376s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 376s ***** error ... 376s plot (LogisticDistribution, "PlotType", "pdfcdf") 376s ***** error ... 376s plot (LogisticDistribution, "Discrete", "pdfcdf") 376s ***** error ... 376s plot (LogisticDistribution, "Discrete", [1, 0]) 376s ***** error ... 376s plot (LogisticDistribution, "Discrete", {true}) 376s ***** error ... 376s plot (LogisticDistribution, "Parent", 12) 376s ***** error ... 376s plot (LogisticDistribution, "Parent", "hax") 376s ***** error ... 376s plot (LogisticDistribution, "invalidNAME", "pdf") 376s ***** error ... 376s plot (LogisticDistribution, "PlotType", "probability") 376s ***** error ... 376s proflik (LogisticDistribution, 2) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 3) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), [1, 2]) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), {1}) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, ones (2)) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display") 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 376s ***** error ... 376s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 376s ***** error ... 376s truncate (LogisticDistribution) 376s ***** error ... 376s truncate (LogisticDistribution, 2) 376s ***** error ... 376s truncate (LogisticDistribution, 4, 2) 376s ***** shared pd 376s pd = LogisticDistribution(1, 1); 376s pd(2) = LogisticDistribution(1, 3); 376s ***** error cdf (pd, 1) 376s ***** error icdf (pd, 0.5) 376s ***** error iqr (pd) 376s ***** error mean (pd) 376s ***** error median (pd) 376s ***** error negloglik (pd) 376s ***** error paramci (pd) 376s ***** error pdf (pd, 1) 376s ***** error plot (pd) 376s ***** error proflik (pd, 2) 376s ***** error random (pd) 376s ***** error std (pd) 376s ***** error ... 376s truncate (pd, 2, 4) 376s ***** error var (pd) 376s 95 tests, 95 passed, 0 known failure, 0 skipped 376s [inst/dist_obj/BinomialDistribution.m] 376s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/BinomialDistribution.m 376s ***** shared pd, t, t_inf 376s pd = BinomialDistribution (5, 0.5); 376s t = truncate (pd, 2, 4); 376s t_inf = truncate (pd, 2, Inf); 376s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 376s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 376s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 376s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 376s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 376s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 376s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 376s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 376s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 376s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 376s ***** assert (iqr (pd), 1); 376s ***** assert (iqr (t), 1); 376s ***** assert (mean (pd), 2.5, 1e-10); 376s ***** assert (mean (t), 2.8, 1e-10); 376s ***** assert (mean (t_inf), 2.8846, 1e-4); 376s ***** assert (median (pd), 2.5); 376s ***** assert (median (t), 3); 376s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 376s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 376s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 376s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 376s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 376s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 376s ***** assert (any (random (t, 1000, 1) < 2), false); 376s ***** assert (any (random (t, 1000, 1) > 4), false); 376s ***** assert (std (pd), 1.1180, 1e-4); 376s ***** assert (std (t), 0.7483, 1e-4); 376s ***** assert (std (t_inf), 0.8470, 1e-4); 376s ***** assert (var (pd), 1.2500, 1e-4); 376s ***** assert (var (t), 0.5600, 1e-4); 376s ***** assert (var (t_inf), 0.7175, 1e-4); 376s ***** error ... 376s BinomialDistribution(Inf, 0.5) 376s ***** error ... 376s BinomialDistribution(i, 0.5) 376s ***** error ... 376s BinomialDistribution("a", 0.5) 376s ***** error ... 376s BinomialDistribution([1, 2], 0.5) 376s ***** error ... 376s BinomialDistribution(NaN, 0.5) 376s ***** error ... 376s BinomialDistribution(1, 1.01) 376s ***** error ... 376s BinomialDistribution(1, -0.01) 376s ***** error ... 376s BinomialDistribution(1, Inf) 376s ***** error ... 376s BinomialDistribution(1, i) 376s ***** error ... 376s BinomialDistribution(1, "a") 376s ***** error ... 376s BinomialDistribution(1, [1, 2]) 376s ***** error ... 376s BinomialDistribution(1, NaN) 376s ***** error ... 376s cdf (BinomialDistribution, 2, "uper") 376s ***** error ... 376s cdf (BinomialDistribution, 2, 3) 376s ***** shared x 376s rand ("seed", 2); 376s x = binornd (5, 0.5, [1, 100]); 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 376s "alpha", {0.05}) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), ... 376s "parameter", {"N", "p", "param"}) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 376s "parameter", {"N", "p", "param"}) 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 376s "parameter", "param") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 376s "NAME", "value") 376s ***** error ... 376s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 376s "parameter", "p", "NAME", "value") 376s ***** error ... 376s plot (BinomialDistribution, "Parent") 376s ***** error ... 376s plot (BinomialDistribution, "PlotType", 12) 376s ***** error ... 376s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 376s ***** error ... 376s plot (BinomialDistribution, "PlotType", "pdfcdf") 376s ***** error ... 376s plot (BinomialDistribution, "Discrete", "pdfcdf") 376s ***** error ... 376s plot (BinomialDistribution, "Discrete", [1, 0]) 376s ***** error ... 376s plot (BinomialDistribution, "Discrete", {true}) 376s ***** error ... 376s plot (BinomialDistribution, "Parent", 12) 376s ***** error ... 376s plot (BinomialDistribution, "Parent", "hax") 376s ***** error ... 376s plot (BinomialDistribution, "invalidNAME", "pdf") 376s ***** error ... 376s plot (BinomialDistribution, "PlotType", "probability") 376s ***** error ... 376s proflik (BinomialDistribution, 2) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 3) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), {1}) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 376s ***** error ... 376s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 376s ***** error ... 376s truncate (BinomialDistribution) 376s ***** error ... 376s truncate (BinomialDistribution, 2) 376s ***** error ... 376s truncate (BinomialDistribution, 4, 2) 376s ***** shared pd 376s pd = BinomialDistribution(1, 0.5); 376s pd(2) = BinomialDistribution(1, 0.6); 376s ***** error cdf (pd, 1) 376s ***** error icdf (pd, 0.5) 376s ***** error iqr (pd) 376s ***** error mean (pd) 376s ***** error median (pd) 376s ***** error negloglik (pd) 376s ***** error paramci (pd) 376s ***** error pdf (pd, 1) 376s ***** error plot (pd) 376s ***** error proflik (pd, 2) 376s ***** error random (pd) 376s ***** error std (pd) 376s ***** error ... 376s truncate (pd, 2, 4) 376s ***** error var (pd) 376s 102 tests, 102 passed, 0 known failure, 0 skipped 376s [inst/dist_obj/InverseGaussianDistribution.m] 376s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/InverseGaussianDistribution.m 376s ***** shared pd, t 376s pd = InverseGaussianDistribution (1, 1); 376s t = truncate (pd, 2, 4); 376s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 376s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 376s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 376s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 376s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 376s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 376s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 376s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 376s ***** assert (iqr (pd), 0.8643, 1e-4); 376s ***** assert (iqr (t), 0.8222, 1e-4); 376s ***** assert (mean (pd), 1); 376s ***** assert (mean (t), 2.6953, 1e-4); 376s ***** assert (median (pd), 0.6758, 1e-4); 376s ***** assert (median (t), 2.5716, 1e-4); 376s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 376s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 376s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 376s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 376s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 376s ***** assert (any (random (t, 1000, 1) < 2), false); 376s ***** assert (any (random (t, 1000, 1) > 4), false); 376s ***** assert (std (pd), 1); 376s ***** assert (std (t), 0.5332, 1e-4); 377s ***** assert (var (pd), 1); 377s ***** assert (var (t), 0.2843, 1e-4); 377s ***** error ... 377s InverseGaussianDistribution(0, 1) 377s ***** error ... 377s InverseGaussianDistribution(Inf, 1) 377s ***** error ... 377s InverseGaussianDistribution(i, 1) 377s ***** error ... 377s InverseGaussianDistribution("a", 1) 377s ***** error ... 377s InverseGaussianDistribution([1, 2], 1) 377s ***** error ... 377s InverseGaussianDistribution(NaN, 1) 377s ***** error ... 377s InverseGaussianDistribution(1, 0) 377s ***** error ... 377s InverseGaussianDistribution(1, -1) 377s ***** error ... 377s InverseGaussianDistribution(1, Inf) 377s ***** error ... 377s InverseGaussianDistribution(1, i) 377s ***** error ... 377s InverseGaussianDistribution(1, "a") 377s ***** error ... 377s InverseGaussianDistribution(1, [1, 2]) 377s ***** error ... 377s InverseGaussianDistribution(1, NaN) 377s ***** error ... 377s cdf (InverseGaussianDistribution, 2, "uper") 377s ***** error ... 377s cdf (InverseGaussianDistribution, 2, 3) 377s ***** shared x 377s x = invgrnd (1, 1, [1, 100]); 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 377s "alpha", {0.05}) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), ... 377s "parameter", {"mu", "lambda", "param"}) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", {"mu", "lambda", "param"}) 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", "param") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 377s ***** error ... 377s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", "mu", "NAME", "value") 377s ***** error ... 377s plot (InverseGaussianDistribution, "Parent") 377s ***** error ... 377s plot (InverseGaussianDistribution, "PlotType", 12) 377s ***** error ... 377s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 377s ***** error ... 377s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 377s ***** error ... 377s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 377s ***** error ... 377s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 377s ***** error ... 377s plot (InverseGaussianDistribution, "Discrete", {true}) 377s ***** error ... 377s plot (InverseGaussianDistribution, "Parent", 12) 377s ***** error ... 377s plot (InverseGaussianDistribution, "Parent", "hax") 377s ***** error ... 377s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 377s ***** error ... 377s plot (InverseGaussianDistribution, "PlotType", "probability") 377s ***** error ... 377s proflik (InverseGaussianDistribution, 2) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 3) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), {1}) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 377s ***** error ... 377s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 377s ***** error ... 377s truncate (InverseGaussianDistribution) 377s ***** error ... 377s truncate (InverseGaussianDistribution, 2) 377s ***** error ... 377s truncate (InverseGaussianDistribution, 4, 2) 377s ***** shared pd 377s pd = InverseGaussianDistribution(1, 1); 377s pd(2) = InverseGaussianDistribution(1, 3); 377s ***** error cdf (pd, 1) 377s ***** error icdf (pd, 0.5) 377s ***** error iqr (pd) 377s ***** error mean (pd) 377s ***** error median (pd) 377s ***** error negloglik (pd) 377s ***** error paramci (pd) 377s ***** error pdf (pd, 1) 377s ***** error plot (pd) 377s ***** error proflik (pd, 2) 377s ***** error random (pd) 377s ***** error std (pd) 377s ***** error ... 377s truncate (pd, 2, 4) 377s ***** error var (pd) 377s 96 tests, 96 passed, 0 known failure, 0 skipped 377s [inst/dist_obj/GammaDistribution.m] 377s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/GammaDistribution.m 377s ***** shared pd, t 377s pd = GammaDistribution (1, 1); 377s t = truncate (pd, 2, 4); 377s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 377s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 377s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 377s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 377s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 377s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 377s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 377s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 377s ***** assert (iqr (pd), 1.0986, 1e-4); 377s ***** assert (iqr (t), 0.8020, 1e-4); 377s ***** assert (mean (pd), 1); 377s ***** assert (mean (t), 2.6870, 1e-4); 377s ***** assert (median (pd), 0.6931, 1e-4); 377s ***** assert (median (t), 2.5662, 1e-4); 377s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 377s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 377s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 377s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 377s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 377s ***** assert (any (random (t, 1000, 1) < 2), false); 377s ***** assert (any (random (t, 1000, 1) > 4), false); 377s ***** assert (std (pd), 1); 377s ***** assert (std (t), 0.5253, 1e-4); 377s ***** assert (var (pd), 1); 377s ***** assert (var (t), 0.2759, 1e-4); 377s ***** error ... 377s GammaDistribution(0, 1) 377s ***** error ... 377s GammaDistribution(Inf, 1) 377s ***** error ... 377s GammaDistribution(i, 1) 377s ***** error ... 377s GammaDistribution("a", 1) 377s ***** error ... 377s GammaDistribution([1, 2], 1) 377s ***** error ... 377s GammaDistribution(NaN, 1) 377s ***** error ... 377s GammaDistribution(1, 0) 377s ***** error ... 377s GammaDistribution(1, -1) 377s ***** error ... 377s GammaDistribution(1, Inf) 377s ***** error ... 377s GammaDistribution(1, i) 377s ***** error ... 377s GammaDistribution(1, "a") 377s ***** error ... 377s GammaDistribution(1, [1, 2]) 377s ***** error ... 377s GammaDistribution(1, NaN) 377s ***** error ... 377s cdf (GammaDistribution, 2, "uper") 377s ***** error ... 377s cdf (GammaDistribution, 2, 3) 377s ***** shared x 377s x = gamrnd (1, 1, [100, 1]); 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 0) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 1) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", "") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", {"a", "b", "param"}) 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "parameter", "param") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "NAME", "value") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 377s ***** error ... 377s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 377s "NAME", "value") 377s ***** error ... 377s plot (GammaDistribution, "Parent") 377s ***** error ... 377s plot (GammaDistribution, "PlotType", 12) 377s ***** error ... 377s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 377s ***** error ... 377s plot (GammaDistribution, "PlotType", "pdfcdf") 377s ***** error ... 377s plot (GammaDistribution, "Discrete", "pdfcdf") 377s ***** error ... 377s plot (GammaDistribution, "Discrete", [1, 0]) 377s ***** error ... 377s plot (GammaDistribution, "Discrete", {true}) 377s ***** error ... 377s plot (GammaDistribution, "Parent", 12) 377s ***** error ... 377s plot (GammaDistribution, "Parent", "hax") 377s ***** error ... 377s plot (GammaDistribution, "invalidNAME", "pdf") 377s ***** error ... 377s plot (GammaDistribution, "PlotType", "probability") 377s ***** error ... 377s proflik (GammaDistribution, 2) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 3) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), [1, 2]) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), {1}) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, ones (2)) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display") 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display", 1) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 377s ***** error ... 377s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 377s ***** error ... 377s truncate (GammaDistribution) 377s ***** error ... 377s truncate (GammaDistribution, 2) 377s ***** error ... 377s truncate (GammaDistribution, 4, 2) 377s ***** shared pd 377s pd = GammaDistribution(1, 1); 377s pd(2) = GammaDistribution(1, 3); 377s ***** error cdf (pd, 1) 377s ***** error icdf (pd, 0.5) 377s ***** error iqr (pd) 377s ***** error mean (pd) 377s ***** error median (pd) 377s ***** error negloglik (pd) 377s ***** error paramci (pd) 377s ***** error pdf (pd, 1) 377s ***** error plot (pd) 377s ***** error proflik (pd, 2) 377s ***** error random (pd) 377s ***** error std (pd) 377s ***** error ... 377s truncate (pd, 2, 4) 377s ***** error var (pd) 377s 96 tests, 96 passed, 0 known failure, 0 skipped 377s [inst/dist_obj/PoissonDistribution.m] 377s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/PoissonDistribution.m 377s ***** shared pd, t, t_inf 377s pd = PoissonDistribution; 377s t = truncate (pd, 2, 4); 377s t_inf = truncate (pd, 2, Inf); 377s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 377s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 377s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 377s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 377s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 377s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 377s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 377s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 377s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 377s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 377s ***** assert (iqr (pd), 2); 377s ***** assert (iqr (t), 1); 377s ***** assert (mean (pd), 1); 377s ***** assert (mean (t), 2.3529, 1e-4); 377s ***** assert (mean (t_inf), 2.3922, 1e-4); 377s ***** assert (median (pd), 1); 377s ***** assert (median (t), 2); 377s ***** assert (median (t_inf), 2); 377s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 377s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 377s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 377s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 377s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 377s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 377s ***** assert (any (random (t, 1000, 1) < 2), false); 377s ***** assert (any (random (t, 1000, 1) > 4), false); 377s ***** assert (std (pd), 1); 377s ***** assert (std (t), 0.5882, 1e-4); 377s ***** assert (std (t_inf), 0.6738, 1e-4); 377s ***** assert (var (pd), 1); 377s ***** assert (var (t), 0.3460, 1e-4); 377s ***** assert (var (t_inf), 0.4540, 1e-4); 377s ***** error ... 377s PoissonDistribution(0) 377s ***** error ... 377s PoissonDistribution(-1) 377s ***** error ... 377s PoissonDistribution(Inf) 377s ***** error ... 377s PoissonDistribution(i) 377s ***** error ... 377s PoissonDistribution("a") 377s ***** error ... 377s PoissonDistribution([1, 2]) 377s ***** error ... 377s PoissonDistribution(NaN) 377s ***** error ... 377s cdf (PoissonDistribution, 2, "uper") 377s ***** error ... 377s cdf (PoissonDistribution, 2, 3) 377s ***** shared x 377s x = poissrnd (1, [1, 100]); 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 0) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 1) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", "") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", {"lambda", "param"}) 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "parameter", "param") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "NAME", "value") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 377s ***** error ... 377s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 377s "parameter", "lambda", "NAME", "value") 377s ***** error ... 377s plot (PoissonDistribution, "Parent") 377s ***** error ... 377s plot (PoissonDistribution, "PlotType", 12) 377s ***** error ... 377s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 377s ***** error ... 377s plot (PoissonDistribution, "PlotType", "pdfcdf") 377s ***** error ... 377s plot (PoissonDistribution, "Discrete", "pdfcdf") 377s ***** error ... 377s plot (PoissonDistribution, "Discrete", [1, 0]) 377s ***** error ... 377s plot (PoissonDistribution, "Discrete", {true}) 377s ***** error ... 377s plot (PoissonDistribution, "Parent", 12) 377s ***** error ... 377s plot (PoissonDistribution, "Parent", "hax") 377s ***** error ... 377s plot (PoissonDistribution, "invalidNAME", "pdf") 377s ***** error ... 377s plot (PoissonDistribution, "PlotType", "probability") 377s ***** error ... 377s proflik (PoissonDistribution, 2) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 3) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), [1, 2]) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), {1}) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, ones (2)) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display") 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 377s ***** error ... 377s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 377s ***** error ... 377s truncate (PoissonDistribution) 377s ***** error ... 377s truncate (PoissonDistribution, 2) 377s ***** error ... 377s truncate (PoissonDistribution, 4, 2) 377s ***** shared pd 377s pd = PoissonDistribution(1); 377s pd(2) = PoissonDistribution(3); 377s ***** error cdf (pd, 1) 377s ***** error icdf (pd, 0.5) 377s ***** error iqr (pd) 377s ***** error mean (pd) 377s ***** error median (pd) 377s ***** error negloglik (pd) 377s ***** error paramci (pd) 377s ***** error pdf (pd, 1) 377s ***** error plot (pd) 377s ***** error proflik (pd, 2) 378s ***** error random (pd) 378s ***** error std (pd) 378s ***** error ... 378s truncate (pd, 2, 4) 378s ***** error var (pd) 378s 97 tests, 97 passed, 0 known failure, 0 skipped 378s [inst/dist_obj/HalfNormalDistribution.m] 378s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/HalfNormalDistribution.m 378s ***** shared pd, t 378s pd = HalfNormalDistribution (0, 1); 378s t = truncate (pd, 2, 4); 378s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 378s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 378s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 378s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 378s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 378s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 378s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 378s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 378s ***** assert (iqr (pd), 0.8317, 1e-4); 378s ***** assert (iqr (t), 0.4111, 1e-4); 378s ***** assert (mean (pd), 0.7979, 1e-4); 378s ***** assert (mean (t), 2.3706, 1e-4); 378s ***** assert (median (pd), 0.6745, 1e-4); 378s ***** assert (median (t), 2.2771, 1e-4); 378s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 378s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 378s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 378s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 378s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 378s ***** assert (any (random (t, 1000, 1) < 2), false); 378s ***** assert (any (random (t, 1000, 1) > 4), false); 378s ***** assert (std (pd), 0.6028, 1e-4); 378s ***** assert (std (t), 0.3310, 1e-4); 378s ***** assert (var (pd), 0.3634, 1e-4); 378s ***** assert (var (t), 0.1096, 1e-4); 378s ***** error ... 378s HalfNormalDistribution(Inf, 1) 378s ***** error ... 378s HalfNormalDistribution(i, 1) 378s ***** error ... 378s HalfNormalDistribution("a", 1) 378s ***** error ... 378s HalfNormalDistribution([1, 2], 1) 378s ***** error ... 378s HalfNormalDistribution(NaN, 1) 378s ***** error ... 378s HalfNormalDistribution(1, 0) 378s ***** error ... 378s HalfNormalDistribution(1, -1) 378s ***** error ... 378s HalfNormalDistribution(1, Inf) 378s ***** error ... 378s HalfNormalDistribution(1, i) 378s ***** error ... 378s HalfNormalDistribution(1, "a") 378s ***** error ... 378s HalfNormalDistribution(1, [1, 2]) 378s ***** error ... 378s HalfNormalDistribution(1, NaN) 378s ***** error ... 378s cdf (HalfNormalDistribution, 2, "uper") 378s ***** error ... 378s cdf (HalfNormalDistribution, 2, 3) 378s ***** shared x 378s x = hnrnd (1, 1, [1, 100]); 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 378s "alpha", {0.05}) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), ... 378s "parameter", {"mu", "sigma", "param"}) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 378s "parameter", {"mu", "sigma", "param"}) 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 378s "parameter", "param") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 378s "NAME", "value") 378s ***** error ... 378s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 378s "parameter", "sigma", "NAME", "value") 378s ***** error ... 378s plot (HalfNormalDistribution, "Parent") 378s ***** error ... 378s plot (HalfNormalDistribution, "PlotType", 12) 378s ***** error ... 378s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 378s ***** error ... 378s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 378s ***** error ... 378s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 378s ***** error ... 378s plot (HalfNormalDistribution, "Discrete", [1, 0]) 378s ***** error ... 378s plot (HalfNormalDistribution, "Discrete", {true}) 378s ***** error ... 378s plot (HalfNormalDistribution, "Parent", 12) 378s ***** error ... 378s plot (HalfNormalDistribution, "Parent", "hax") 378s ***** error ... 378s plot (HalfNormalDistribution, "invalidNAME", "pdf") 378s ***** error ... 378s plot (HalfNormalDistribution, "PlotType", "probability") 378s ***** error ... 378s proflik (HalfNormalDistribution, 2) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 3) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), {1}) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 1) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 378s ***** error ... 378s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 378s "Display", "on") 378s ***** error ... 378s truncate (HalfNormalDistribution) 378s ***** error ... 378s truncate (HalfNormalDistribution, 2) 378s ***** error ... 378s truncate (HalfNormalDistribution, 4, 2) 378s ***** shared pd 378s pd = HalfNormalDistribution(1, 1); 378s pd(2) = HalfNormalDistribution(1, 3); 378s ***** error cdf (pd, 1) 378s ***** error icdf (pd, 0.5) 378s ***** error iqr (pd) 378s ***** error mean (pd) 378s ***** error median (pd) 378s ***** error negloglik (pd) 378s ***** error paramci (pd) 378s ***** error pdf (pd, 1) 378s ***** error plot (pd) 378s ***** error proflik (pd, 2) 378s ***** error random (pd) 378s ***** error std (pd) 378s ***** error ... 378s truncate (pd, 2, 4) 378s ***** error var (pd) 378s 96 tests, 96 passed, 0 known failure, 0 skipped 378s [inst/dist_obj/GeneralizedParetoDistribution.m] 378s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/GeneralizedParetoDistribution.m 378s ***** shared pd, t 378s pd = GeneralizedParetoDistribution (1, 1, 1); 378s t = truncate (pd, 2, 4); 378s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 378s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 378s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 378s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 378s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 378s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 378s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 378s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 378s ***** assert (iqr (pd), 2.6667, 1e-4); 378s ***** assert (iqr (t), 0.9143, 1e-4); 378s ***** assert (mean (pd), Inf); 378s ***** assert (mean (t), 2.7726, 1e-4); 378s ***** assert (median (pd), 2); 378s ***** assert (median (t), 2.6667, 1e-4); 378s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 378s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 378s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 378s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 378s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 378s ***** assert (any (random (t, 1000, 1) < 2), false); 378s ***** assert (any (random (t, 1000, 1) > 4), false); 378s ***** assert (std (pd), Inf); 378s ***** assert (std (t), 0.5592, 1e-4); 378s ***** assert (var (pd), Inf); 378s ***** assert (var (t), 0.3128, 1e-4); 378s ***** error ... 378s GeneralizedParetoDistribution(Inf, 1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(i, 1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution("a", 1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution([1, 2], 1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(NaN, 1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, 0, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, -1, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, Inf, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, i, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, "a", 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, [1, 2], 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, NaN, 1) 378s ***** error ... 378s GeneralizedParetoDistribution(1, 1, Inf) 378s ***** error ... 378s GeneralizedParetoDistribution(1, 1, i) 378s ***** error ... 378s GeneralizedParetoDistribution(1, 1, "a") 378s ***** error ... 378s GeneralizedParetoDistribution(1, 1, [1, 2]) 378s ***** error ... 378s GeneralizedParetoDistribution(1, 1, NaN) 378s ***** error ... 378s cdf (GeneralizedParetoDistribution, 2, "uper") 378s ***** error ... 378s cdf (GeneralizedParetoDistribution, 2, 3) 378s ***** shared x 378s x = gprnd (1, 1, 1, [1, 100]); 378s ***** error ... 378s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 378s ***** error ... 378s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 379s "parameter", "sigma", "alpha", {0.05}) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 379s "parameter", {"k", "sigma", "param"}) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 379s "parameter", {"k", "sigma", "param"}) 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 379s "parameter", "param") 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 379s "NAME", "value") 379s ***** error ... 379s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 379s "parameter", "sigma", "NAME", "value") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Parent") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "PlotType", 12) 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Discrete", {true}) 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Parent", 12) 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "Parent", "hax") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 379s ***** error ... 379s plot (GeneralizedParetoDistribution, "PlotType", "probability") 379s ***** error ... 379s proflik (GeneralizedParetoDistribution, 2) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 379s "Display", ["on"; "on"]) 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 379s ***** error ... 379s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 379s "Display", "on") 379s ***** error ... 379s truncate (GeneralizedParetoDistribution) 379s ***** error ... 379s truncate (GeneralizedParetoDistribution, 2) 379s ***** error ... 379s truncate (GeneralizedParetoDistribution, 4, 2) 379s ***** shared pd 379s pd = GeneralizedParetoDistribution(1, 1, 1); 379s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 379s ***** error cdf (pd, 1) 379s ***** error icdf (pd, 0.5) 379s ***** error iqr (pd) 379s ***** error mean (pd) 379s ***** error median (pd) 379s ***** error negloglik (pd) 379s ***** error paramci (pd) 379s ***** error pdf (pd, 1) 379s ***** error plot (pd) 379s ***** error proflik (pd, 2) 379s ***** error random (pd) 379s ***** error std (pd) 379s ***** error ... 379s truncate (pd, 2, 4) 379s ***** error var (pd) 379s 100 tests, 100 passed, 0 known failure, 0 skipped 379s [inst/dist_obj/tLocationScaleDistribution.m] 379s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/tLocationScaleDistribution.m 379s ***** shared pd, t 379s pd = tLocationScaleDistribution; 379s t = truncate (pd, 2, 4); 379s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 379s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 379s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 379s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 379s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 379s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 379s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 379s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 379s ***** assert (iqr (pd), 1.4534, 1e-4); 379s ***** assert (iqr (t), 0.7139, 1e-4); 379s ***** assert (mean (pd), 0, eps); 379s ***** assert (mean (t), 2.6099, 1e-4); 379s ***** assert (median (pd), 0, eps); 379s ***** assert (median (t), 2.4758, 1e-4); 379s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 379s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 379s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 379s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 379s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 379s ***** assert (any (random (t, 1000, 1) < 2), false); 379s ***** assert (any (random (t, 1000, 1) > 4), false); 379s ***** assert (std (pd), 1.2910, 1e-4); 379s ***** assert (std (t), 0.4989, 1e-4); 379s ***** assert (var (pd), 1.6667, 1e-4); 379s ***** assert (var (t), 0.2489, 1e-4); 379s ***** error ... 379s tLocationScaleDistribution(i, 1, 1) 379s ***** error ... 379s tLocationScaleDistribution(Inf, 1, 1) 379s ***** error ... 379s tLocationScaleDistribution([1, 2], 1, 1) 379s ***** error ... 379s tLocationScaleDistribution("a", 1, 1) 379s ***** error ... 379s tLocationScaleDistribution(NaN, 1, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, 0, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, -1, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, Inf, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, i, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, "a", 1) 379s ***** error ... 379s tLocationScaleDistribution(0, [1, 2], 1) 379s ***** error ... 379s tLocationScaleDistribution(0, NaN, 1) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, 0) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, -1) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, Inf) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, i) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, "a") 379s ***** error ... 379s tLocationScaleDistribution(0, 1, [1, 2]) 379s ***** error ... 379s tLocationScaleDistribution(0, 1, NaN) 379s ***** error ... 379s cdf (tLocationScaleDistribution, 2, "uper") 379s ***** error ... 379s cdf (tLocationScaleDistribution, 2, 3) 379s ***** shared x 379s x = tlsrnd (0, 1, 1, [1, 100]); 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha") 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 379s ***** error ... 379s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 379s "alpha", {0.05}) 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), ... 380s "parameter", {"mu", "sigma", "nu", "param"}) 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 380s "parameter", {"mu", "sigma", "nu", "param"}) 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 380s "parameter", "param") 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 380s ***** error ... 380s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 380s "parameter", "mu", "NAME", "value") 380s ***** error ... 380s plot (tLocationScaleDistribution, "Parent") 380s ***** error ... 380s plot (tLocationScaleDistribution, "PlotType", 12) 380s ***** error ... 380s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 380s ***** error ... 380s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 380s ***** error ... 380s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 380s ***** error ... 380s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 380s ***** error ... 380s plot (tLocationScaleDistribution, "Discrete", {true}) 380s ***** error ... 380s plot (tLocationScaleDistribution, "Parent", 12) 380s ***** error ... 380s plot (tLocationScaleDistribution, "Parent", "hax") 380s ***** error ... 380s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 380s ***** error ... 380s plot (tLocationScaleDistribution, "PlotType", "probability") 380s ***** error ... 380s proflik (tLocationScaleDistribution, 2) 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), 4) 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), {1}) 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 380s ***** error ... 380s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 381s ***** error ... 381s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 381s ***** error ... 381s truncate (tLocationScaleDistribution) 381s ***** error ... 381s truncate (tLocationScaleDistribution, 2) 381s ***** error ... 381s truncate (tLocationScaleDistribution, 4, 2) 381s ***** shared pd 381s pd = tLocationScaleDistribution (0, 1, 1); 381s pd(2) = tLocationScaleDistribution (0, 1, 3); 381s ***** error cdf (pd, 1) 381s ***** error icdf (pd, 0.5) 381s ***** error iqr (pd) 381s ***** error mean (pd) 381s ***** error median (pd) 381s ***** error negloglik (pd) 381s ***** error paramci (pd) 381s ***** error pdf (pd, 1) 381s ***** error plot (pd) 381s ***** error proflik (pd, 2) 381s ***** error random (pd) 381s ***** error std (pd) 381s ***** error ... 381s truncate (pd, 2, 4) 381s ***** error var (pd) 381s 102 tests, 102 passed, 0 known failure, 0 skipped 381s [inst/dist_obj/ExponentialDistribution.m] 381s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/dist_obj/ExponentialDistribution.m 381s ***** shared pd, t 381s pd = ExponentialDistribution (1); 381s t = truncate (pd, 2, 4); 381s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 381s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 381s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 381s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 381s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 381s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 381s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 381s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 381s ***** assert (iqr (pd), 1.0986, 1e-4); 381s ***** assert (iqr (t), 0.8020, 1e-4); 381s ***** assert (mean (pd), 1); 381s ***** assert (mean (t), 2.6870, 1e-4); 381s ***** assert (median (pd), 0.6931, 1e-4); 381s ***** assert (median (t), 2.5662, 1e-4); 381s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 381s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 381s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 381s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 381s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 381s ***** assert (any (random (t, 1000, 1) < 2), false); 381s ***** assert (any (random (t, 1000, 1) > 4), false); 381s ***** assert (std (pd), 1); 381s ***** assert (std (t), 0.5253, 1e-4); 381s ***** assert (var (pd), 1); 381s ***** assert (var (t), 0.2759, 1e-4); 381s ***** error ... 381s ExponentialDistribution(0) 381s ***** error ... 381s ExponentialDistribution(-1) 381s ***** error ... 381s ExponentialDistribution(Inf) 381s ***** error ... 381s ExponentialDistribution(i) 381s ***** error ... 381s ExponentialDistribution("a") 381s ***** error ... 381s ExponentialDistribution([1, 2]) 381s ***** error ... 381s ExponentialDistribution(NaN) 381s ***** error ... 381s cdf (ExponentialDistribution, 2, "uper") 381s ***** error ... 381s cdf (ExponentialDistribution, 2, 3) 381s ***** shared x 381s x = exprnd (1, [100, 1]); 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 0) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 1) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", "") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 381s "alpha", {0.05}) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 381s "parameter", {"mu", "param"}) 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "parameter", "param") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "NAME", "value") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 381s ***** error ... 381s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 381s "parameter", "mu", "NAME", "value") 381s ***** error ... 381s plot (ExponentialDistribution, "Parent") 381s ***** error ... 381s plot (ExponentialDistribution, "PlotType", 12) 381s ***** error ... 381s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 381s ***** error ... 381s plot (ExponentialDistribution, "PlotType", "pdfcdf") 381s ***** error ... 381s plot (ExponentialDistribution, "Discrete", "pdfcdf") 381s ***** error ... 381s plot (ExponentialDistribution, "Discrete", [1, 0]) 381s ***** error ... 381s plot (ExponentialDistribution, "Discrete", {true}) 381s ***** error ... 381s plot (ExponentialDistribution, "Parent", 12) 381s ***** error ... 381s plot (ExponentialDistribution, "Parent", "hax") 381s ***** error ... 381s plot (ExponentialDistribution, "invalidNAME", "pdf") 381s ***** error ... 381s plot (ExponentialDistribution, "PlotType", "probability") 381s ***** error ... 381s proflik (ExponentialDistribution, 2) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 3) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), [1, 2]) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), {1}) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, "Display") 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 381s ***** error ... 381s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 382s ***** error ... 382s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 382s ***** error ... 382s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 382s ***** error ... 382s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 382s ***** error ... 382s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 382s ***** error ... 382s truncate (ExponentialDistribution) 382s ***** error ... 382s truncate (ExponentialDistribution, 2) 382s ***** error ... 382s truncate (ExponentialDistribution, 4, 2) 382s ***** shared pd 382s pd = ExponentialDistribution(1); 382s pd(2) = ExponentialDistribution(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 90 tests, 90 passed, 0 known failure, 0 skipped 382s [inst/dist_obj/BirnbaumSaundersDistribution.m] 382s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/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)) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 382s ***** error ... 382s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 382s ***** error ... 382s truncate (BirnbaumSaundersDistribution) 382s ***** error ... 382s truncate (BirnbaumSaundersDistribution, 2) 382s ***** error ... 382s truncate (BirnbaumSaundersDistribution, 4, 2) 382s ***** shared pd 382s pd = BirnbaumSaundersDistribution(1, 1); 382s pd(2) = BirnbaumSaundersDistribution(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 96 tests, 96 passed, 0 known failure, 0 skipped 382s [inst/clusterdata.m] 382s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/clusterdata.m 382s ***** demo 382s randn ("seed", 1) # for reproducibility 382s r1 = randn (10, 2) * 0.25 + 1; 382s randn ("seed", 5) # for reproducibility 382s r2 = randn (20, 2) * 0.5 - 1; 382s X = [r1; r2]; 382s 382s wnl = warning ("off", "Octave:linkage_savemem", "local"); 382s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 382s scatter (X(:,1), X(:,2), 36, T, "filled"); 382s ***** error ... 382s clusterdata () 382s ***** error ... 382s clusterdata (1) 382s ***** error clusterdata ([1 1], "Bogus", 1) 382s ***** error clusterdata ([1 1], "Depth", 1) 382s 4 tests, 4 passed, 0 known failure, 0 skipped 382s [inst/rmmissing.m] 382s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/rmmissing.m 382s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 382s ***** assert (rmmissing ('abcd f'), 'abcdf') 382s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 382s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 382s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 382s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 382s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 382s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 382s ***** test 382s x = [1:6]; 382s x([2,4]) = NaN; 382s [~, idx] = rmmissing (x); 382s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 382s assert (class(idx), 'logical'); 382s x = reshape (x, [2, 3]); 382s [~, idx] = rmmissing (x); 382s assert (idx, logical ([0; 1])); 382s assert (class(idx), 'logical'); 382s [~, idx] = rmmissing (x, 2); 382s assert (idx, logical ([1, 1, 0])); 382s assert (class(idx), 'logical'); 382s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 382s assert (idx, logical ([0; 1])); 382s assert (class(idx), 'logical'); 382s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 382s assert (idx, logical ([0, 0, 0])); 382s assert (class(idx), 'logical'); 382s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 382s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 383s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 383s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 383s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 383s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 383s ***** assert (rmmissing ([]), []) 383s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 383s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 383s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 383s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 383s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 383s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 383s ***** error rmmissing (ones (0,1,2)) 383s ***** error rmmissing () 383s ***** error rmmissing (ones(2,2,2)) 383s ***** error rmmissing ([1 2; 3 4], 5) 383s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 383s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 383s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 383s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 383s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 383s 31 tests, 31 passed, 0 known failure, 0 skipped 383s [inst/kstest.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/kstest.m 383s ***** demo 383s ## Use the stock return data set to test the null hypothesis that the data 383s ## come from a standard normal distribution against the alternative 383s ## hypothesis that the population CDF of the data is larger that the 383s ## standard normal CDF. 383s 383s load stockreturns; 383s x = stocks(:,2); 383s [h, p, k, c] = kstest (x, "Tail", "larger") 383s 383s ## Compute the empirical CDF and plot against the standard normal CDF 383s [f, x_values] = ecdf (x); 383s h1 = plot (x_values, f); 383s hold on; 383s h2 = plot (x_values, normcdf (x_values), 'r--'); 383s set (h1, "LineWidth", 2); 383s set (h2, "LineWidth", 2); 383s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 383s "Location", "southeast"); 383s title ("Empirical CDF of stock return data against standard normal CDF") 383s ***** error kstest () 383s ***** error kstest (ones (2, 4)) 383s ***** error kstest ([2, 3, 5, 3+3i]) 383s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "tail") 383s ***** error ... 383s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "tail", 0) 383s ***** error ... 383s kstest ([2,3,4,5,6], "tail", "whatever") 383s ***** error ... 383s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 383s ***** error ... 383s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 383s ***** error ... 383s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 383s ***** error ... 383s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 383s ***** test 383s load examgrades 383s [h, p] = kstest (grades(:,1)); 383s assert (h, true); 383s assert (p, 7.58603305206105e-107, 1e-14); 383s ***** test 383s load examgrades 383s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 383s assert (h, false); 383s assert (p, 0.5612, 1e-4); 383s ***** test 383s load examgrades 383s x = grades(:,1); 383s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 383s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 383s assert (h, true); 383s assert (p, 0.0021, 1e-4); 383s ***** test 383s load stockreturns 383s x = stocks(:,3); 383s [h,p,k,c] = kstest (x, "Tail", "larger"); 383s assert (h, true); 383s assert (p, 5.085438806199252e-05, 1e-14); 383s assert (k, 0.2197, 1e-4); 383s assert (c, 0.1207, 1e-4); 383s 21 tests, 21 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/set.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/set.m 383s ***** shared C 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s ***** test 383s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 383s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 383s ***** error set (C) 383s ***** error set (C, "NumObservations") 383s ***** error set (C, "some", 15) 383s ***** error set (C, 15, 15) 383s 5 tests, 5 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/training.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/training.m 383s ***** shared C 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 383s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 383s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 383s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 383s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 383s ***** test 383s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 383s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 383s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 383s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 383s 9 tests, 9 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/get.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/get.m 383s ***** shared C 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s ***** assert (get (C, "NumObservations"), 10); 383s ***** assert (get (C, "NumTestSets"), 5); 383s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 383s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 383s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 383s ***** assert (get (C, "Type"), "kfold"); 383s ***** error get (C, "some") 383s ***** error get (C, 25) 383s ***** error get (C, {25}) 383s 9 tests, 9 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/repartition.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/repartition.m 383s ***** test 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s Cnew = repartition (C); 383s assert (isa (Cnew, "cvpartition"), true); 383s ***** test 383s C = cvpartition (ones (100, 1), "HoldOut", 5); 383s Cnew = repartition (C); 383s indC = get (C, "inds"); 383s indCnew = get (Cnew, "inds"); 383s assert (isequal (indC, indCnew), false); 383s 2 tests, 2 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/cvpartition.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/cvpartition.m 383s ***** demo 383s ## Partition with Fisher iris dataset (n = 150) 383s ## Stratified by species 383s load fisheriris 383s y = species; 383s ## 10-fold cross-validation partition 383s c = cvpartition (species, 'KFold', 10) 383s ## leave-10-out partition 383s c1 = cvpartition (species, 'HoldOut', 10) 383s idx1 = test (c, 2); 383s idx2 = training (c, 2); 383s ## another leave-10-out partition 383s c2 = repartition (c1) 383s ***** test 383s C = cvpartition (ones (10, 1)); 383s assert (isa (C, "cvpartition"), true); 383s ***** test 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 5); 383s assert (get (C, "TrainSize"), ones(5,1) * 8); 383s assert (get (C, "TestSize"), ones (5,1) * 2); 383s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 383s assert (get (C, "Type"), "kfold"); 383s ***** test 383s C = cvpartition (ones (10, 1), "KFold", 2); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 2); 383s assert (get (C, "TrainSize"), [5; 5]); 383s assert (get (C, "TestSize"), [5; 5]); 383s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 383s assert (get (C, "Type"), "kfold"); 383s ***** test 383s C = cvpartition (ones (10, 1), "HoldOut", 5); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 1); 383s assert (get (C, "TrainSize"), 5); 383s assert (get (C, "TestSize"), 5); 383s assert (class (get (C, "inds")), "logical"); 383s assert (length (get (C, "inds")), 10); 383s assert (get (C, "Type"), "holdout"); 383s ***** test 383s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 10); 383s assert (get (C, "TrainSize"), ones (10, 1)); 383s assert (get (C, "TestSize"), ones (10, 1) * 9); 383s assert (get (C, "inds"), []); 383s assert (get (C, "Type"), "leaveout"); 383s ***** test 383s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 1); 383s assert (get (C, "TrainSize"), 10); 383s assert (get (C, "TestSize"), 10); 383s assert (get (C, "inds"), []); 383s assert (get (C, "Type"), "resubstitution"); 383s ***** test 383s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 383s assert (get (C, "NumObservations"), 10); 383s assert (get (C, "NumTestSets"), 10); 383s assert (get (C, "TrainSize"), ones (10, 1) * 9); 383s assert (get (C, "TestSize"), ones (10, 1)); 383s assert (get (C, "inds"), [1:10]'); 383s assert (get (C, "Type"), "given"); 383s ***** warning ... 383s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 383s 8 tests, 8 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/test.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/test.m 383s ***** shared C 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 383s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 383s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 383s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 383s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 383s ***** test 383s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 383s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 383s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 383s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 383s 9 tests, 9 passed, 0 known failure, 0 skipped 383s [inst/@cvpartition/display.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/@cvpartition/display.m 383s ***** test 383s C = cvpartition (ones (10, 1), "KFold", 5); 383s s = evalc ("display (C)"); 383s sout = "K-fold cross validation partition"; 383s assert (strcmpi (s(1:length (sout)), sout), true); 383s ***** test 383s C = cvpartition (ones (10, 1), "HoldOut", 5); 383s s = evalc ("display (C)"); 383s sout = "HoldOut cross validation partition"; 383s assert (strcmpi (s(1:length (sout)), sout), true); 383s ***** test 383s C = cvpartition (ones (10, 1), "LeaveOut", 5); 383s s = evalc ("display (C)"); 383s sout = "Leave-One-Out cross validation partition"; 383s assert (strcmpi (s(1:length (sout)), sout), true); 383s ***** test 383s C = cvpartition (ones (10, 1), "resubstitution", 5); 383s s = evalc ("display (C)"); 383s sout = "Resubstitution cross validation partition"; 383s assert (strcmpi (s(1:length (sout)), sout), true); 383s ***** test 383s C = cvpartition (ones (10, 1), "Given", 5); 383s s = evalc ("display (C)"); 383s sout = "Given cross validation partition"; 383s assert (strcmpi (s(1:length (sout)), sout), true); 383s ***** error display () 383s 6 tests, 6 passed, 0 known failure, 0 skipped 383s [inst/jackknife.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/jackknife.m 383s ***** demo 383s for k = 1:1000 383s rand ("seed", k); # for reproducibility 383s x = rand (10, 1); 383s s(k) = std (x); 383s jackstat = jackknife (@std, x); 383s j(k) = 10 * std (x) - 9 * mean (jackstat); 383s endfor 383s figure(); 383s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 383s ***** demo 383s for k = 1:1000 383s randn ("seed", k); # for reproducibility 383s x = randn (1, 50); 383s rand ("seed", k); # for reproducibility 383s y = rand (1, 50); 383s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 383s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 383s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 383s endfor 383s t = (j - sqrt (1 / 12)) ./ sqrt (v); 383s figure(); 383s plot (sort (tcdf (t, 49)), ... 383s "-;Almost linear mapping indicates good fit with t-distribution.;") 383s ***** test 383s ##Example from Quenouille, Table 1 383s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 383s jackstat = jackknife ( @(x) 1/mean(x), d ); 383s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 383s 1 test, 1 passed, 0 known failure, 0 skipped 383s [inst/Regression/RegressionGAM.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/Regression/RegressionGAM.m 383s ***** demo 383s ## Train a RegressionGAM Model for synthetic values 383s f1 = @(x) cos (3 * x); 383s f2 = @(x) x .^ 3; 383s x1 = 2 * rand (50, 1) - 1; 383s x2 = 2 * rand (50, 1) - 1; 383s y = f1(x1) + f2(x2); 383s y = y + y .* 0.2 .* rand (50,1); 383s X = [x1, x2]; 383s a = fitrgam (X, y, "tol", 1e-3) 383s ***** demo 383s ## Declare two different functions 383s f1 = @(x) cos (3 * x); 383s f2 = @(x) x .^ 3; 383s 383s ## Generate 80 samples for f1 and f2 383s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 383s X1 = f1 (x); 383s X2 = f2 (x); 383s 383s ## Create a synthetic response by adding noise 383s rand ("seed", 3); 383s Ytrue = X1 + X2; 383s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 383s 383s ## Assemble predictor data 383s X = [X1, X2]; 383s 383s ## Train the GAM and test on the same data 383s a = fitrgam (X, Y, "order", [5, 5]); 383s [ypred, ySDsd, yInt] = predict (a, X); 383s 383s ## Plot the results 383s figure 383s [sortedY, indY] = sort (Ytrue); 383s plot (sortedY, "r-"); 383s xlim ([0, 80]); 383s hold on 383s plot (ypred(indY), "g+") 383s plot (yInt(indY,1), "k:") 383s plot (yInt(indY,2), "k:") 383s xlabel ("Predictor samples"); 383s ylabel ("Response"); 383s title ("actual vs predicted values for function f1(x) = cos (3x) "); 383s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 383s 383s ## Use 30% Holdout partitioning for training and testing data 383s C = cvpartition (80, "HoldOut", 0.3); 383s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 383s 383s ## Plot the results 383s figure 383s [sortedY, indY] = sort (Ytrue(test(C))); 383s plot (sortedY, 'r-'); 383s xlim ([0, sum(test(C))]); 383s hold on 383s plot (ypred(indY), "g+") 383s plot (yInt(indY,1),'k:') 383s plot (yInt(indY,2),'k:') 383s xlabel ("Predictor samples"); 383s ylabel ("Response"); 383s title ("actual vs predicted values for function f1(x) = cos (3x) "); 383s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 383s ***** test 383s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 383s y = [1; 2; 3; 4]; 383s a = RegressionGAM (x, y); 383s assert ({a.X, a.Y}, {x, y}) 383s assert ({a.BaseModel.Intercept}, {2.5000}) 383s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 383s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 383s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 383s assert ({a.Formula}, {[]}) 383s ***** test 383s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 383s y = [1; 2; 3; 4]; 383s pnames = {"A", "B", "C", "D"}; 383s formula = "Y ~ A + B + C + D + A:C"; 383s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 383s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 383s assert ({a.IntMatrix}, {intMat}) 383s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 383s assert ({a.Formula}, {formula}) 383s ***** error RegressionGAM () 383s ***** error RegressionGAM (ones(10,2)) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (5,1)) 383s ***** error ... 383s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 383s ***** error 383s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 383s ***** error 383s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 383s ***** error ... 383s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 383s ***** error ... 383s predict (RegressionGAM (ones(10,1), ones(10,1))) 383s ***** error ... 383s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 383s ***** error ... 383s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 383s 39 tests, 39 passed, 0 known failure, 0 skipped 383s [inst/fillmissing.m] 383s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fillmissing.m 383s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 383s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 383s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 383s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 383s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 383s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 383s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 383s ***** test 383s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 383s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 383s assert (fillmissing (x, "constant", 99), y); 383s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 383s assert (fillmissing (x, "constant", [94:99]), y); 383s assert (fillmissing (x, "constant", [94:99]'), y); 383s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 383s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 383s assert (fillmissing (x, "constant", [94:99], 1), y); 383s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 383s assert (fillmissing (x, "constant", [96:99], 2), y); 383s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 383s assert (fillmissing (x, "constant", [94:99], 3), y); 383s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 383s assert (fillmissing (x, "constant", [88:99], 99), y); 383s ***** test 383s x = reshape ([1:24], 4, 3, 2); 383s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 383s y = x; 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 383s assert (fillmissing (x, "constant", [94:99], 1), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 383s assert (fillmissing (x, "constant", [92:99], 2), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 383s assert (fillmissing (x, "constant", [88:99], 3), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 383s assert (fillmissing (x, "constant", [76:99], 99), y); 383s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 383s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 383s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 383s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 383s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 383s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 383s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 383s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 383s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 383s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 383s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 383s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 383s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 383s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 383s ***** test 383s x = reshape ([1:24], 3, 4, 2); 383s y = x; 383s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 383s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 383s y([8]) = 99; 383s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 383s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 383s y = x; 383s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 383s y([6, 18, 20, 21]) = 99; 383s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 383s y(y == 99) = 88; 383s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 383s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 383s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 383s y([8]) = 94; 383s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 383s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 383s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 383s y = x; 383s y(isnan (y)) = 88; 383s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 383s y = x; 383s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 383s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 383s y = x; 383s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 383s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 383s y = x; 383s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 383s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 383s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 383s ***** test 383s x = reshape ([1:24],4,3,2); 383s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 383s y = x; 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 383s assert (fillmissing (x, "constant", [94:99], 1), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 383s assert (fillmissing (x, "constant", [92:99], 2), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 383s assert (fillmissing (x, "constant", [88:99], 3), y); 383s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 383s assert (fillmissing (x, "constant", [76:99], 99), y); 383s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 383s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 383s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 383s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 383s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 383s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 383s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 383s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 383s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 383s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 383s ***** test 383s x = reshape ([1:24], 4, 3, 2); 383s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 383s y = x; 383s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 383s assert (fillmissing (x, "next", 1), y); 383s y = x; 383s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 383s assert (fillmissing (x, "next", 2), y); 383s y = x; 383s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 383s assert (fillmissing (x, "next", 3), y); 383s assert (fillmissing (x, "next", 99), x); 383s y = x; 383s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 383s assert (fillmissing (x, "previous", 1), y); 383s y = x; 383s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 383s assert (fillmissing (x, "previous", 2), y); 383s y = x; 383s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 383s assert (fillmissing (x, "previous", 3), y); 383s assert (fillmissing (x, "previous", 99), x); 383s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 383s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 383s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 383s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 383s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 383s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 383s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 383s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 383s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 383s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 383s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 383s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 383s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 383s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 383s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 384s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 384s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 384s y = x; 384s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 384s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 384s y = x; 384s y([16, 19, 21]) = [4, 7, 9]; 384s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 384s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 384s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 384s y = x; 384s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 384s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 384s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 384s y = x; 384s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 384s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 384s y = x; 384s y([2, 5]) = [14, 17]; 384s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 384s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 384s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 384s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 384s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 384s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 384s ***** test 384s x = reshape ([1:24], 4, 3, 2); 384s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 384s y = x; 384s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 384s assert (fillmissing (x, "nearest", 1), y); 384s y = x; 384s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 384s assert (fillmissing (x, "nearest", 2), y); 384s y = x; 384s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 384s assert (fillmissing (x, "nearest", 3), y); 384s assert (fillmissing (x, "nearest", 99), x); 384s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 384s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 384s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 384s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 384s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 384s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 384s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 384s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 384s y = x; 384s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 384s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 384s y = x; 384s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 384s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 384s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 384s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 384s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 384s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 384s ***** test 384s x = reshape ([1:24], 4, 3, 2); 384s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 384s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 384s y = reshape ([1:24], 4, 3, 2); 384s y([1, 9, 14, 19, 22, 23]) = NaN; 384s assert (fillmissing (x, "linear", 2), y); 384s y = reshape ([1:24], 4, 3, 2); 384s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 384s assert (fillmissing (x, "linear", 3), y); 384s assert (fillmissing (x, "linear", 99), x); 384s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 384s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 384s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 384s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 384s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 384s y(8) = 8; 384s assert (fillmissing (x, "linear", "endvalues", 0), y); 384s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 384s y = x; 384s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 384s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 384s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 384s y = x; 384s y(isnan(y)) = 0; 384s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 384s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 384s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 384s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 384s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 384s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 384s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 384s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 384s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 384s ***** test <60965> 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 384s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 384s !!!!! known bug: https://octave.org/testfailure/?60965 384s interp1: invalid METHOD 'makima' 384s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 384s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 384s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 384s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 384s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 384s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 384s ***** 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]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 384s assert (fillmissing (x, "movmean", 3), y); 384s assert (fillmissing (x, "movmean", [1, 1]), y); 384s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 384s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 384s y = x; 384s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 384s assert (fillmissing (x, "movmean", 3, 2), y); 384s assert (fillmissing (x, "movmean", [1, 1], 2), y); 384s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 384s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 384s y([1, 18]) = NaN; 384s y(6) = 9; 384s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 384s y = x; 384s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 384s y(8) = 8; 384s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 384s y = x; 384s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 384s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 384s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 384s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 384s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 384s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 384s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 384s ***** 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]) 384s ***** test 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 384s assert (fillmissing (x, "movmedian", 3), y); 384s assert (fillmissing (x, "movmedian", [1, 1]), y); 384s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 384s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 384s y = x; 384s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 384s assert (fillmissing (x, "movmedian", 3, 2), y); 384s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 384s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 384s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 384s y([1,18]) = NaN; 384s y(6) = 9; 384s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 384s y = x; 384s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 384s y(8) = 8; 384s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 384s y = x; 384s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 384s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 384s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 384s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 384s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 384s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 384s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 384s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 384s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 384s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 384s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 384s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 384s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 384s ***** function A = testfcn (x, y, z) 384s if (isempty (y)) 384s A = z; 384s elseif (numel (y) == 1) 384s A = repelem (x(1), numel(z)); 384s else 384s A = interp1 (y, x, z, "linear", "extrap"); 384s endif 384s ***** endfunction 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 384s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 384s ***** 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] 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 384s ***** 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]' 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 384s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 384s ***** 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) 384s ***** 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] 384s ***** test 384s ***** function A = testfcn (x, y, z) 384s if (isempty (y)) 384s A = z; 384s elseif (numel (y) == 1) 384s A = repelem (x(1), numel(z)); 384s else 384s A = interp1 (y, x, z, "linear", "extrap"); 384s endif 384s ***** endfunction 384s x = reshape ([1:24], 3, 4, 2); 384s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 384s y = x; 384s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 384s assert (fillmissing (x, @testfcn, 3), y); 384s assert (fillmissing (x, @testfcn, [1, 1]), y); 384s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 384s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 384s y= x; 384s y(isnan (x)) = 99; 384s y(8) = 8; 384s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 384s y = x; 384s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 384s assert (fillmissing (x, @testfcn, 3, 2), y); 384s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 384s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 384s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 384s y(1) = NaN; 384s y([6, 18, 21]) = [9, 24, 24]; 384s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 384s y = x; 384s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 384s y(8) = 8; 384s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 384s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 384s y(8) = 99; 384s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 384s y([6, 18, 20, 21]) = 99; 384s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 384s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 384s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 384s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 384s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 384s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 384s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 384s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 384s ***** 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]) 384s ***** test 384s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 384s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 384s y = x; 384s y([4, 7, 12]) = 0; 384s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 384s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 384s y = x; 384s y([5, 7, 12]) = 0; 384s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 384s y = x; 384s y([4, 5, 7]) = 0; 384s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 384s ***** test 384s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 384s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 384s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 384s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 384s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 384s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 384s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 384s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 384s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 384s ***** test 384s x = [NaN, 2, 3]; 384s [~, idx] = fillmissing (x, "previous"); 384s assert (idx, logical ([0, 0, 0])); 384s [~, idx] = fillmissing (x, "movmean", 1); 384s assert (idx, logical ([0, 0, 0])); 384s x = [1:3; 4:6; 7:9]; 384s x([2, 4, 7, 9]) = NaN; 384s [~, idx] = fillmissing (x, "linear"); 384s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 384s [~, idx] = fillmissing (x, "movmean", 2); 384s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 384s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 384s assert (A, [1, 2, 3, 3, NaN]); 384s assert (idx, logical ([0, 0, 0, 1, 0])); 384s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 384s assert (A, [1, 2, 3, 3, NaN]); 384s assert (idx, logical ([0, 0, 0, 1, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 384s assert (A, [1, 2, 3, 3, NaN]); 384s assert (idx, logical ([0, 0, 0, 1, 0])); 384s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 384s assert (A, [1, 2, 1, 4, 1]); 384s assert (idx, logical ([0, 1, 0, 1, 0])); 384s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 384s assert (A, [1, NaN, 1, NaN, 1]); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 384s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 384s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 384s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 384s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 384s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 384s ***** test 384s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 384s assert (idx, logical ([0, 1, 1, 1, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 384s assert (A, [1, 2, 2, NaN, NaN]); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 384s assert (A, [1, 1, 1, 1, 1]); 384s assert (idx, logical ([0, 1, 0, 1, 1])); 384s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 384s assert (A, [1, NaN, 1, NaN, NaN]); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s ***** test 384s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 384s assert (A, [1, 3, 5]); 384s assert (idx, logical ([0, 1, 0])); 384s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 384s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 384s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 384s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 384s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 384s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 384s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 384s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 384s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 384s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 384s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 384s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 384s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 384s ***** test 384s [A, idx] = fillmissing (" a b c", "constant", " "); 384s assert (A, " a b c"); 384s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 384s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 384s assert (A, {"foo", "", "bar", ""}); 384s assert (idx, logical ([0, 0, 0, 0])); 384s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 384s assert (A, {"foo", "", "bar", ""}); 384s assert (idx, logical ([0, 0, 0, 0])); 384s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 384s assert (A, "afaoaoa"); 384s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 384s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 384s assert (A, " f o o "); 384s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 384s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 384s assert (A, {"a", "foo", "a"}); 384s assert (idx, logical ([1, 0, 1])); 384s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 384s assert (A, {"", "foo", ""}); 384s assert (idx, logical ([0, 0, 0])); 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 384s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 384s ***** 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])) 384s ***** 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])) 384s ***** test 384s x = logical ([1, 0, 1, 0, 1]); 384s [~, idx] = fillmissing (x, "constant", true); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([0, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 0])); 384s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 384s assert (idx, logical ([0, 0, 0, 0, 0])) 384s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])) 384s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([0, 0, 1, 0, 1])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 384s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 384s ***** 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])) 384s ***** 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])) 384s ***** test 384s x = int32 ([1, 2, 3, 4, 5]); 384s [~, idx] = fillmissing (x, "constant", 0); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 384s assert (idx, logical ([0, 0, 1, 0, 0])); 384s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([0, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 0])); 384s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 384s assert (idx, logical ([0, 0, 0, 0, 0])); 384s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([1, 0, 1, 0, 1])); 384s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 384s assert (idx, logical ([0, 0, 1, 0, 1])); 384s ***** test 384s [A, idx] = fillmissing ([struct, struct], "constant", 1); 384s assert (A, [struct, struct]) 384s assert (idx, [false, false]) 384s ***** error fillmissing () 384s ***** error fillmissing (1) 385s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 385s ***** error fillmissing (1, 2) 385s ***** error fillmissing (1, "foo") 385s ***** error fillmissing (1, @(x) x, 1) 385s ***** error fillmissing (1, @(x,y) x+y, 1) 385s ***** error fillmissing ("a b c", "linear") 385s ***** error fillmissing ({"a", "b"}, "linear") 385s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 385s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 385s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 385s ***** error fillmissing (1, "constant", []) 385s ***** error fillmissing (1, "constant", "a") 385s ***** error fillmissing ("a", "constant", 1) 385s ***** error fillmissing ("a", "constant", {"foo"}) 385s ***** error fillmissing ({"foo"}, "constant", 1) 385s ***** error fillmissing (1, "movmean") 385s ***** error fillmissing (1, "movmedian") 385s ***** error fillmissing (1, "constant", 1, 0) 385s ***** error fillmissing (1, "constant", 1, -1) 385s ***** error fillmissing (1, "constant", 1, [1, 2]) 385s ***** error fillmissing (1, "constant", 1, "samplepoints") 385s ***** error fillmissing (1, "constant", 1, "foo") 385s ***** error fillmissing (1, "constant", 1, 1, "foo") 385s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 385s ***** error fillmissing ("foo", "next", "endvalues", 1) 385s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 385s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 385s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 385s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 385s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 385s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 385s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 385s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 385s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 385s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 385s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 385s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 385s ***** error fillmissing (true, "linear", "missinglocations", true) 385s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 385s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 385s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 385s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 385s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 385s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 385s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 385s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 385s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 385s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 385s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 385s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 385s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 385s ***** error fillmissing (1, @(x,y,z) x+y+z) 385s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 385s 380 tests, 379 passed, 0 known failure, 1 skipped 385s [inst/boxplot.m] 385s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/boxplot.m 385s ***** demo 385s axis ([0, 3]); 385s randn ("seed", 1); # for reproducibility 385s girls = randn (10, 1) * 5 + 140; 385s randn ("seed", 2); # for reproducibility 385s boys = randn (13, 1) * 8 + 135; 385s boxplot ({girls, boys}); 385s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 385s title ("Grade 3 heights"); 385s ***** demo 385s randn ("seed", 7); # for reproducibility 385s A = randn (10, 1) * 5 + 140; 385s randn ("seed", 8); # for reproducibility 385s B = randn (25, 1) * 8 + 135; 385s randn ("seed", 9); # for reproducibility 385s C = randn (20, 1) * 6 + 165; 385s data = [A; B; C]; 385s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 385s labels = {"Team A", "Team B", "Team C"}; 385s pos = [2, 1, 3]; 385s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 385s "OutlierTags", "on", "BoxStyle", "filled"); 385s title ("Example of Group splitting with paired vectors"); 385s ***** demo 385s randn ("seed", 1); # for reproducibility 385s data = randn (100, 9); 385s boxplot (data, "notch", "on", "boxstyle", "filled", ... 385s "colors", "ygcwkmb", "whisker", 1.2); 385s title ("Example of different colors specified with characters"); 385s ***** demo 385s randn ("seed", 5); # for reproducibility 385s data = randn (100, 13); 385s colors = [0.7 0.7 0.7; ... 385s 0.0 0.4 0.9; ... 385s 0.7 0.4 0.3; ... 385s 0.7 0.1 0.7; ... 385s 0.8 0.7 0.4; ... 385s 0.1 0.8 0.5; ... 385s 0.9 0.9 0.2]; 385s boxplot (data, "notch", "on", "boxstyle", "filled", ... 385s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 385s title ("Example of different colors specified as RGB values"); 385s ***** error boxplot ("a") 385s ***** error boxplot ({[1 2 3], "a"}) 385s ***** error boxplot ([1 2 3], 1, {2, 3}) 385s ***** error boxplot ([1 2 3], {"a", "b"}) 385s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 385s ***** error boxplot ([1:10], "notch", i) 385s ***** error boxplot ([1:10], "notch", {}) 385s ***** error boxplot (1, "symbol", 1) 385s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 385s ***** error boxplot (1, "orientation", {}) 385s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 385s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 385s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 385s ***** error boxplot (3, "OutlierTags", {}) 385s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 385s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 385s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 385s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 385s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 385s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 385s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 385s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 385s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 385s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 385s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 385s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 385s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 385s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 385s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 385s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 385s ***** error boxplot (rand (3, 3), [1 2]) 385s ***** test 385s hf = figure ("visible", "off"); 385s unwind_protect 385s [a, b] = boxplot (rand (10, 3)); 385s assert (size (a), [7, 3]); 385s assert (numel (b.box), 3); 385s assert (numel (b.whisker), 12); 385s assert (numel (b.median), 3); 385s unwind_protect_cleanup 385s close (hf); 385s end_unwind_protect 385s ***** test 385s hf = figure ("visible", "off"); 385s unwind_protect 385s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 385s assert (numel (b.box_fill), 3); 385s unwind_protect_cleanup 385s close (hf); 385s end_unwind_protect 385s ***** test 385s hf = figure ("visible", "off"); 385s unwind_protect 385s hold on 385s [a, b] = boxplot (rand (10, 3)); 385s assert (ishold, true); 385s unwind_protect_cleanup 385s close (hf); 385s end_unwind_protect 385s 34 tests, 34 passed, 0 known failure, 0 skipped 385s [inst/randsample.m] 385s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/randsample.m 385s ***** test 385s n = 20; 385s k = 5; 385s x = randsample(n, k); 385s assert (size(x), [1 k]); 385s x = randsample(n, k, true); 385s assert (size(x), [1 k]); 385s x = randsample(n, k, false); 385s assert (size(x), [1 k]); 385s x = randsample(n, k, true, ones(n, 1)); 385s assert (size(x), [1 k]); 385s x = randsample(1:n, k); 385s assert (size(x), [1 k]); 385s x = randsample(1:n, k, true); 385s assert (size(x), [1 k]); 385s x = randsample(1:n, k, false); 385s assert (size(x), [1 k]); 385s x = randsample(1:n, k, true, ones(n, 1)); 385s assert (size(x), [1 k]); 385s x = randsample((1:n)', k); 385s assert (size(x), [k 1]); 385s x = randsample((1:n)', k, true); 385s assert (size(x), [k 1]); 385s x = randsample((1:n)', k, false); 385s assert (size(x), [k 1]); 385s x = randsample((1:n)', k, true, ones(n, 1)); 385s assert (size(x), [k 1]); 385s n = 10; 385s k = 100; 385s x = randsample(n, k, true, 1:n); 385s assert (size(x), [1 k]); 385s x = randsample((1:n)', k, true); 385s assert (size(x), [k 1]); 385s x = randsample(k, k, false, 1:k); 385s assert (size(x), [1 k]); 385s 1 test, 1 passed, 0 known failure, 0 skipped 385s [inst/signtest.m] 385s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/signtest.m 385s ***** test 385s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 385s assert (pval, 1.091701889420221e-218, 1e-14); 385s assert (h, 1); 385s assert (stats.zval, -31.5437631079266, 1e-14); 385s ***** test 385s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 385s assert (pval, 0.6875000000000006, 1e-14); 385s assert (h, 0); 385s assert (stats.zval, NaN); 385s assert (stats.sign, 4); 385s ***** test 385s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 385s assert (pval, 0.6830913983096086, 1e-14); 385s assert (h, 0); 385s assert (stats.zval, 0.4082482904638631, 1e-14); 385s assert (stats.sign, 4); 385s ***** error signtest (ones (2)) 385s ***** error ... 385s signtest ([1, 2, 3, 4], ones (2)) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [1, 2, 3]) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'tail') 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'alpha', 0) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'alpha', "a") 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'tail', "some") 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'method', 0.01) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'method', "some") 385s ***** error ... 385s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 385s 20 tests, 20 passed, 0 known failure, 0 skipped 385s [inst/fitcnet.m] 385s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/fitcnet.m 385s ***** demo 385s ## Train a Neural Network on the Fisher's Iris data set and display 385s ## a confusion chart with the classification results. 385s 385s load fisheriris 385s Mdl = fitcnet (meas, species); 385s pred_species = resubPredict (Mdl); 385s confusionchart (species, pred_species); 385s ***** error fitcnet () 385s ***** error fitcnet (ones (4,1)) 385s ***** error 385s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 385s ***** error 385s fitcnet (ones (4,2), ones (3, 1)) 385s ***** error 385s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 385s 5 tests, 5 passed, 0 known failure, 0 skipped 385s [inst/isoutlier.m] 385s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/isoutlier.m 385s ***** demo 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s TF = isoutlier (A, "mean") 385s ***** demo 385s ## Use a moving detection method to detect local outliers in a sine wave 385s 385s x = -2*pi:0.1:2*pi; 385s A = sin(x); 385s A(47) = 0; 385s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 385s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 385s plot (time, A) 385s hold on 385s plot (time(TF), A(TF), "x") 385s datetick ('x', 20, 'keepticks') 385s legend ("Original Data", "Outlier Data") 385s ***** demo 385s ## Locate an outlier in a vector of data and visualize the outlier 385s 385s x = 1:10; 385s A = [60 59 49 49 58 100 61 57 48 58]; 385s [TF, L, U, C] = isoutlier (A); 385s plot (x, A); 385s hold on 385s plot (x(TF), A(TF), "x"); 385s xlim ([1,10]); 385s line ([1,10], [L, L], "Linestyle", ":"); 385s text (1.1, L-2, "Lower Threshold"); 385s line ([1,10], [U, U], "Linestyle", ":"); 385s text (1.1, U-2, "Upper Threshold"); 385s line ([1,10], [C, C], "Linestyle", ":"); 385s text (1.1, C-3, "Center Value"); 385s legend ("Original Data", "Outlier Data"); 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 385s assert (isoutlier (A, "median"), ... 385s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "mean"); 385s assert (L, -109.2459044922864, 1e-12) 385s assert (U, 264.9792378256198, 1e-12) 385s assert (C, 77.8666666666666, 1e-12) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "median"); 385s assert (L, 50.104386688966386, 1e-12) 385s assert (U, 67.895613311033610, 1e-12) 385s assert (C, 59) 385s ***** test 385s A = magic(5) + diag(200*ones(1,5)); 385s T = logical (eye (5)); 385s assert (isoutlier (A, 2), T) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 385s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 385s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 385s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 385s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 385s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 385s assert (L, l, 1e-4) 385s assert (U, u, 1e-4) 385s assert (C, c) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 385s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 385s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 385s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 385s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 385s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 385s assert (L, l, 1e-4) 385s assert (U, u, 1e-4) 385s assert (C, c) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "movmean", 5); 385s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 385s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 385s 52.5979, 51.0627]; 385s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 385s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 385s 66.9373]; 385s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 385s 60.6, 59.8, 59.25, 59]; 385s assert (L, l, 1e-4) 385s assert (U, u, 1e-4) 385s assert (C, c, 1e-4) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 385s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 385s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 385s 52.5979, 51.0627]; 385s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 385s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 385s 66.9373]; 385s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 385s 60.6, 59.8, 59.25, 59]; 385s assert (L, l, 1e-4) 385s assert (U, u, 1e-4) 385s assert (C, c, 1e-4) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "gesd"); 385s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 34.235977035439944, 1e-12) 385s assert (U, 89.764022964560060, 1e-12) 385s assert (C, 62) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 385s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 31.489256770616173, 1e-12) 385s assert (U, 92.510743229383820, 1e-12) 385s assert (C, 62) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 385s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 23.976664158788935, 1e-12) 385s assert (U, 100.02333584121110, 1e-12) 385s assert (C, 62) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "grubbs"); 385s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 54.642809574646606, 1e-12) 385s assert (U, 63.511036579199555, 1e-12) 385s assert (C, 59.076923076923080, 1e-12) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 385s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 54.216083184201850, 1e-12) 385s assert (U, 63.937762969644310, 1e-12) 385s assert (C, 59.076923076923080, 1e-12) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 385s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 385s assert (L, 57) 385s assert (U, 100) 385s assert (C, 78.5) 385s ***** test 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 385s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 385s assert (L, 57.5) 385s assert (U, 62) 385s assert (C, 59.75) 385s ***** shared A 385s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 385s ***** error ... 385s isoutlier (A, "movmedian", 0); 386s ***** error ... 386s isoutlier (A, "movmedian", []); 386s ***** error ... 386s isoutlier (A, "movmedian", [2 3 4]); 386s ***** error ... 386s isoutlier (A, "movmedian", 1.4); 386s ***** error ... 386s isoutlier (A, "movmedian", [0 1]); 386s ***** error ... 386s isoutlier (A, "movmedian", [2 -1]); 386s ***** error ... 386s isoutlier (A, "movmedian", {2 3}); 386s ***** error ... 386s isoutlier (A, "movmedian", "char"); 386s 386s ***** error ... 386s isoutlier (A, "movmean", 0); 386s ***** error ... 386s isoutlier (A, "movmean", []); 386s ***** error ... 386s isoutlier (A, "movmean", [2 3 4]); 386s ***** error ... 386s isoutlier (A, "movmean", 1.4); 386s ***** error ... 386s isoutlier (A, "movmean", [0 1]); 386s ***** error ... 386s isoutlier (A, "movmean", [2 -1]); 386s ***** error ... 386s isoutlier (A, "movmean", {2 3}); 386s ***** error ... 386s isoutlier (A, "movmean", "char"); 386s 386s ***** error ... 386s isoutlier (A, "percentiles", [-1 90]); 386s ***** error ... 386s isoutlier (A, "percentiles", [10 -90]); 386s ***** error ... 386s isoutlier (A, "percentiles", [90]); 386s ***** error ... 386s isoutlier (A, "percentiles", [90 20]); 386s ***** error ... 386s isoutlier (A, "percentiles", [90 20]); 386s ***** error ... 386s isoutlier (A, "percentiles", [10 20 90]); 386s ***** error ... 386s isoutlier (A, "percentiles", {10 90}); 386s ***** error ... 386s isoutlier (A, "percentiles", "char"); 386s 386s ***** error ... 386s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "SamplePoints", 15); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 386s 386s ***** error ... 386s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 386s ***** error ... 386s isoutlier (A, "gesd", "ThresholdFactor", 3); 386s ***** error ... 386s isoutlier (A, "grubbs", "ThresholdFactor", 3); 386s 386s ***** error ... 386s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 386s ***** error ... 386s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 386s 386s ***** error ... 386s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 386s ***** error isoutlier (A, {1}); 386s ***** error isoutlier (A, true); 386s ***** error isoutlier (A, false); 386s ***** error isoutlier (A, 0); 386s ***** error isoutlier (A, [1 2]); 386s ***** error isoutlier (A, -2); 386s 59 tests, 59 passed, 0 known failure, 0 skipped 386s [inst/cdfplot.m] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/cdfplot.m 386s ***** demo 386s x = randn(100,1); 386s cdfplot (x); 386s ***** test 386s hf = figure ("visible", "off"); 386s unwind_protect 386s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 386s [hCDF, stats] = cdfplot (x); 386s assert (stats.min, 2); 386s assert (stats.max, 6); 386s assert (stats.median, 3.5); 386s assert (stats.std, 1.35400640077266, 1e-14); 386s unwind_protect_cleanup 386s close (hf); 386s end_unwind_protect 386s ***** test 386s hf = figure ("visible", "off"); 386s unwind_protect 386s x = randn(100,1); 386s cdfplot (x); 386s unwind_protect_cleanup 386s close (hf); 386s end_unwind_protect 386s ***** error cdfplot (); 386s ***** error cdfplot ([x',x']); 386s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 386s 5 tests, 5 passed, 0 known failure, 0 skipped 386s [inst/harmmean.m] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/harmmean.m 386s ***** test 386s x = [0:10]; 386s y = [x;x+5;x+10]; 386s assert (harmmean (x), 0); 386s m = [0 8.907635160795225 14.30854471766802]; 386s assert (harmmean (y, 2), m', 4e-14); 386s assert (harmmean (y, "all"), 0); 386s y(2,4) = NaN; 386s m(2) = 9.009855936313949; 386s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 386s assert (harmmean (y', "omitnan"), m, 4e-14); 386s z = y + 20; 386s assert (harmmean (z, "all"), NaN); 386s assert (harmmean (z, "all", "includenan"), NaN); 386s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 386s m = [24.59488458841874 NaN 34.71244385944397]; 386s assert (harmmean (z'), m, 4e-14); 386s assert (harmmean (z', "includenan"), m, 4e-14); 386s m(2) = 29.84104075528277; 386s assert (harmmean (z', "omitnan"), m, 4e-14); 386s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 386s ***** test 386s x = repmat ([1:20;6:25], [5 2 6 3]); 386s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 386s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 386s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 386s assert (size (harmmean (x, [1 4 3])), [1 40]); 386s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 386s ***** test 386s x = repmat ([1:20;6:25], [5 2 6 3]); 386s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 386s assert (harmmean (x, [3 2]), m, 4e-14); 386s x(2,5,6,3) = NaN; 386s m(2,3) = NaN; 386s assert (harmmean (x, [3 2]), m, 4e-14); 386s m(2,3) = 13.06617961315406; 386s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 386s ***** error harmmean ("char") 386s ***** error harmmean ([1 -1 3]) 386s ***** error ... 386s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 386s ***** error ... 386s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 386s ***** error ... 386s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 386s 8 tests, 8 passed, 0 known failure, 0 skipped 386s [inst/monotone_smooth.m] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/monotone_smooth.m 386s ***** error ... 386s monotone_smooth (1) 386s ***** error ... 386s monotone_smooth ("char", 1) 386s ***** error ... 386s monotone_smooth ({1,2,3}, 1) 386s ***** error ... 386s monotone_smooth (ones(20,3), 1) 386s ***** error ... 386s monotone_smooth (1, "char") 386s ***** error ... 386s monotone_smooth (1, {1,2,3}) 386s ***** error ... 386s monotone_smooth (1, ones(20,3)) 386s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 386s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 386s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 386s 10 tests, 10 passed, 0 known failure, 0 skipped 386s [inst/ff2n.m] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/ff2n.m 386s ***** error ff2n (); 386s ***** error ff2n (2, 5); 386s ***** error ff2n (2.5); 386s ***** error ff2n (0); 386s ***** error ff2n (-3); 386s ***** error ff2n (3+2i); 386s ***** error ff2n (Inf); 386s ***** error ff2n (NaN); 386s ***** test 386s A = ff2n (3); 386s assert (A, fullfact (3)); 386s ***** test 386s A = ff2n (8); 386s assert (A, fullfact (8)); 386s 10 tests, 10 passed, 0 known failure, 0 skipped 386s [inst/grpstats.m] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/inst/grpstats.m 386s ***** demo 386s load carsmall; 386s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 386s n = length(m); 386s errorbar((1:n)',m,p(:,2)-m); 386s set (gca, "xtick", 1:n, "xticklabel", g); 386s title ("95% prediction intervals for mean weight by year"); 386s ***** demo 386s load carsmall; 386s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 386s {"mean", "meanci", "gname"}, 0.05) 386s [c,r] = size (m); 386s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 386s set (gca, "xtick", 1:c, "xticklabel", g); 386s title ("95% prediction intervals for mean weight by year"); 386s ***** test 386s load carsmall 386s means = grpstats (Acceleration, Origin); 386s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 386s ***** test 386s load carsmall 386s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 386s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 386s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 386s ***** test 386s load carsmall 386s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 386s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 386s ***** test 386s load carsmall 386s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 386s {"mean", "meanci", "gname"}, 0.05); 386s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 386s [1e-14, 2e-14, 1e-14]'); 386s 4 tests, 4 passed, 0 known failure, 0 skipped 386s Checking C++ files ... 386s [src/fcnntrain.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/fcnntrain.cc 386s ***** shared X, Y, MODEL 386s load fisheriris 386s X = meas; 386s Y = grp2idx (species); 386s ***** error ... 386s model = fcnntrain (X, Y); 386s ***** error ... 386s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 386s ***** error ... 386s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 386s 33 tests, 33 passed, 0 known failure, 0 skipped 386s [src/svmpredict.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/svmpredict.cc 386s ***** test 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s model = svmtrain (L, D, '-c 1 -g 0.07'); 386s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 386s assert (size (predict_label), size (dec_values)); 386s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 386s assert (dec_values(1), 1.225836001973273, 1e-14); 386s assert (dec_values(2), -0.3212992933043805, 1e-14); 386s assert (predict_label(1), 1); 386s ***** shared L, D, model 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s model = svmtrain (L, D, '-c 1 -g 0.07'); 386s ***** error ... 386s [p, a] = svmpredict (L, D, model); 386s ***** error p = svmpredict (L, D); 386s ***** error ... 386s p = svmpredict (single (L), D, model); 386s ***** error p = svmpredict (L, D, 123); 386s 5 tests, 5 passed, 0 known failure, 0 skipped 386s [src/editDistance.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/editDistance.cc 386s ***** error d = editDistance (1, 2, 3, 4); 386s ***** error ... 386s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 386s ***** error ... 386s [C, IA] = editDistance ({"AS","SD","AD"}); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, [1, 2]); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, -2); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, 1.25); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 386s ***** error ... 386s d = editDistance ("string1", "string2", [1, 2]); 386s ***** error ... 386s d = editDistance ("string1", "string2", -2); 386s ***** error ... 386s d = editDistance ("string1", "string2", 1.25); 386s ***** error ... 386s d = editDistance ({{"string1", "string2"}, 2}); 386s ***** error ... 386s d = editDistance ({{"string1", "string2"}, 2}, 2); 386s ***** error ... 386s d = editDistance ([1, 2, 3]); 386s ***** error ... 386s d = editDistance (["AS","SD","AD","AS"]); 386s ***** error ... 386s d = editDistance (["AS","SD","AD"], 2); 386s ***** error ... 386s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 386s ***** error ... 386s d = editDistance ([1,2,3], {"AS","AS","AD"}); 386s ***** error ... 386s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 386s ***** error ... 386s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 386s ***** test 386s d = editDistance ({"AS","SD","AD"}); 386s assert (d, [2; 1; 1]); 386s assert (class (d), "double"); 386s ***** test 386s C = editDistance ({"AS","SD","AD"}, 1); 386s assert (iscellstr (C), true); 386s assert (C, {"AS";"SD"}); 386s ***** test 386s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 386s assert (class (IA), "double"); 386s assert (IA, [1;2]); 386s ***** test 386s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 386s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 386s assert (class (IA), "double"); 386s assert (A(IA), C); 386s ***** test 386s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 386s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 386s assert (class (IA), "cell"); 386s assert (C, {"ASS"; "FDE"; "OPA"}); 386s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 386s assert (A(IA{2}), {"FDE"; "EDS"}); 386s assert (A(IA{3}), {"OPA"}); 386s ***** test 386s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 386s [C, IA, IC] = editDistance (A, 2); 386s assert (class (IA), "double"); 386s assert (A(IA), C); 386s assert (IC, [1; 1; 3; 1; 5]); 386s ***** test 386s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 386s assert (d, [0; 1; 2]); 386s assert (class (d), "double"); 386s ***** test 386s d = editDistance ({"AS","SD","AD"}, {"AS"}); 386s assert (d, [0; 2; 1]); 386s assert (class (d), "double"); 386s ***** test 386s d = editDistance ({"AS"}, {"AS","SD","AD"}); 386s assert (d, [0; 2; 1]); 386s assert (class (d), "double"); 386s ***** test 386s b = editDistance ("Octave", "octave"); 386s assert (b, 1); 386s assert (class (b), "double"); 386s 33 tests, 33 passed, 0 known failure, 0 skipped 386s [src/fcnnpredict.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/fcnnpredict.cc 386s ***** shared X, Y, MODEL 386s load fisheriris 386s X = meas; 386s Y = grp2idx (species); 386s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 386s ***** test 386s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 386s assert (numel (Y_pred), numel (Y)); 386s assert (isequal (size (Y_pred), size (Y)), true); 386s assert (columns (Y_scores), numel (unique (Y))); 386s assert (rows (Y_scores), numel (Y)); 386s ***** error ... 386s fcnnpredict (MODEL); 386s ***** error ... 386s [Q, W, E] = fcnnpredict (MODEL, X); 386s ***** error ... 386s fcnnpredict (1, X); 386s ***** error ... 386s fcnnpredict (struct ("L", {1, 2, 3}), X); 386s ***** error ... 386s fcnnpredict (struct ("L", 1), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", 1), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {1}), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 386s "Activations", [2]), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 386s "Activations", [2; 2]), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 386s "Activations", {{2, 2}}), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 386s "Activations", {{"sigmoid", "softmax"}}), X); 386s ***** error ... 386s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 386s "Activations", "sigmoid"), X); 386s ***** error ... 386s fcnnpredict (MODEL, complex (X)); 386s ***** error ... 386s fcnnpredict (MODEL, {1, 2, 3, 4}); 386s ***** error ... 386s fcnnpredict (MODEL, "asd"); 386s ***** error ... 386s fcnnpredict (MODEL, []); 386s ***** error ... 386s fcnnpredict (MODEL, X(:,[1:3])); 386s 20 tests, 20 passed, 0 known failure, 0 skipped 386s [src/libsvmread.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/libsvmread.cc 386s ***** error [L, D] = libsvmread (24); 386s ***** error ... 386s D = libsvmread ("filename"); 386s ***** test 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s assert (size (L), [270, 1]); 386s assert (size (D), [270, 13]); 386s ***** test 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s assert (issparse (L), false); 386s assert (issparse (D), true); 386s 4 tests, 4 passed, 0 known failure, 0 skipped 386s [src/svmtrain.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/svmtrain.cc 386s ***** test 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s model = svmtrain(L, D, '-c 1 -g 0.07'); 386s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 386s assert (isstruct (model), true); 386s assert (isfield (model, "Parameters"), true); 386s assert (model.totalSV, 130); 386s assert (model.nr_class, 2); 386s assert (size (model.Label), [2, 1]); 386s ***** shared L, D 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s ***** error [L, D] = svmtrain (L, D); 386s ***** error ... 386s model = svmtrain (single (L), D); 386s ***** error ... 386s model = svmtrain (L, D, "", ""); 386s 4 tests, 4 passed, 0 known failure, 0 skipped 386s [src/libsvmwrite.cc] 386s >>>>> /tmp/autopkgtest.BeTbtp/build.20D/src/src/libsvmwrite.cc 386s ***** shared L, D 386s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 386s ***** error libsvmwrite ("", L, D); 386s ***** error ... 386s libsvmwrite (tempname (), [L;L], D); 386s ***** error ... 386s OUT = libsvmwrite (tempname (), L, D); 386s ***** error ... 386s libsvmwrite (tempname (), single (L), D); 386s ***** error libsvmwrite (13412, L, D); 386s ***** error ... 386s libsvmwrite (tempname (), L, full (D)); 386s ***** error ... 386s libsvmwrite (tempname (), L, D, D); 386s 7 tests, 7 passed, 0 known failure, 0 skipped 386s Done running the unit tests. 386s Summary: 11028 tests, 11025 passed, 1 known failures, 2 skipped 387s autopkgtest [01:24:28]: test command1: -----------------------] 387s command1 PASS 387s autopkgtest [01:24:28]: test command1: - - - - - - - - - - results - - - - - - - - - - 388s autopkgtest [01:24:29]: @@@@@@@@@@@@@@@@@@@@ summary 388s command1 PASS 393s nova [W] Using flock in prodstack6-s390x 393s Creating nova instance adt-plucky-s390x-octave-statistics-20250216-011801-juju-7f2275-prod-proposed-migration-environment-2-942dc211-f3d3-4dfb-97ea-492d61bd2d63 from image adt/ubuntu-plucky-s390x-server-20250215.img (UUID 099dc609-2061-4009-a65b-d554466baca0)... 393s nova [W] Timed out waiting for 28e8f3f7-18b1-4f47-a941-bdc109f5631c to get deleted.