0s autopkgtest [10:35:27]: starting date and time: 2025-03-15 10:35:27+0000 0s autopkgtest [10:35:27]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [10:35:27]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.5w8_2ddf/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-16.secgroup --name adt-plucky-amd64-octave-statistics-20250315-103527-juju-7f2275-prod-proposed-migration-environment-20-90633440-8d87-4427-a6b8-514d5af20acd --image adt/ubuntu-plucky-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-amd64 -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/ 50s autopkgtest [10:36:17]: testbed dpkg architecture: amd64 50s autopkgtest [10:36:17]: testbed apt version: 2.9.31ubuntu1 51s autopkgtest [10:36:18]: @@@@@@@@@@@@@@@@@@@@ test bed setup 51s autopkgtest [10:36:18]: testbed release detected to be: None 51s autopkgtest [10:36:18]: updating testbed package index (apt update) 52s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 52s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 52s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 52s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 52s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 52s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [410 kB] 53s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [46.2 kB] 53s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [90.3 kB] 53s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [64.9 kB] 53s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 c-n-f Metadata [1916 B] 53s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 c-n-f Metadata [116 B] 53s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [181 kB] 53s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [364 kB] 53s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 c-n-f Metadata [17.0 kB] 53s Get:15 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [17.0 kB] 53s Get:16 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [8452 B] 53s Get:17 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 c-n-f Metadata [912 B] 53s Fetched 1345 kB in 1s (1345 kB/s) 54s Reading package lists... 54s Reading package lists... 55s Building dependency tree... 55s Reading state information... 55s Calculating upgrade... 55s Calculating upgrade... 55s The following package was automatically installed and is no longer required: 55s libnl-genl-3-200 55s Use 'sudo apt autoremove' to remove it. 55s The following NEW packages will be installed: 55s bpftool libdebuginfod-common libdebuginfod1t64 linux-headers-6.14.0-10 55s linux-headers-6.14.0-10-generic linux-image-6.14.0-10-generic 55s linux-modules-6.14.0-10-generic linux-modules-extra-6.14.0-10-generic 55s linux-perf linux-tools-6.14.0-10 linux-tools-6.14.0-10-generic pnp.ids 55s The following packages will be upgraded: 55s apparmor apt apt-utils binutils binutils-common binutils-x86-64-linux-gnu 55s cloud-init cloud-init-base curl dosfstools exfatprogs fwupd gcc-15-base 55s gir1.2-girepository-2.0 gir1.2-glib-2.0 htop hwdata initramfs-tools 55s initramfs-tools-bin initramfs-tools-core libapparmor1 libapt-pkg7.0 55s libassuan9 libatomic1 libaudit-common libaudit1 libbinutils libbrotli1 55s libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libctf-nobfd0 libctf0 55s libcurl3t64-gnutls libcurl4t64 libestr0 libftdi1-2 libfwupd3 libgcc-s1 55s libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-data libgpgme11t64 55s libgprofng0 libjemalloc2 liblz4-1 liblzma5 libmm-glib0 libncurses6 55s libncursesw6 libnewt0.52 libnl-3-200 libnl-genl-3-200 libnl-route-3-200 55s libnss-systemd libpam-systemd libparted2t64 libpci3 libpython3-stdlib 55s libpython3.13 libpython3.13-minimal libpython3.13-stdlib libseccomp2 55s libselinux1 libsemanage-common libsemanage2 libsframe1 libsqlite3-0 55s libstdc++6 libsystemd-shared libsystemd0 libtinfo6 libudev1 libxml2 55s linux-firmware linux-generic linux-headers-generic linux-headers-virtual 55s linux-image-generic linux-image-virtual linux-libc-dev linux-tools-common 55s linux-virtual locales media-types ncurses-base ncurses-bin ncurses-term 55s parted pci.ids pciutils python-apt-common python3 python3-apt python3-bcrypt 55s python3-cffi-backend python3-dbus python3-gi python3-jinja2 python3-lazr.uri 55s python3-markupsafe python3-minimal python3-newt python3-rpds-py 55s python3-systemd python3-yaml python3.13 python3.13-gdbm python3.13-minimal 55s rsync rsyslog strace systemd systemd-cryptsetup systemd-resolved 55s systemd-sysv systemd-timesyncd ubuntu-kernel-accessories ubuntu-minimal 55s ubuntu-standard udev whiptail xz-utils 55s 125 upgraded, 12 newly installed, 0 to remove and 0 not upgraded. 55s Need to get 829 MB of archives. 55s After this operation, 325 MB of additional disk space will be used. 55s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-bin amd64 6.5+20250216-2 [194 kB] 56s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libc-dev-bin amd64 2.41-1ubuntu1 [24.7 kB] 56s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 libc6-dev amd64 2.41-1ubuntu1 [2182 kB] 56s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 locales all 2.41-1ubuntu1 [4246 kB] 57s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 libc6 amd64 2.41-1ubuntu1 [3327 kB] 58s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 libc-bin amd64 2.41-1ubuntu1 [701 kB] 58s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-libc-dev amd64 6.14.0-10.10 [1723 kB] 58s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 libatomic1 amd64 15-20250222-0ubuntu1 [10.4 kB] 58s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-15-base amd64 15-20250222-0ubuntu1 [53.4 kB] 58s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libgcc-s1 amd64 15-20250222-0ubuntu1 [77.8 kB] 58s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libstdc++6 amd64 15-20250222-0ubuntu1 [798 kB] 58s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-base all 6.5+20250216-2 [25.9 kB] 58s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-term all 6.5+20250216-2 [276 kB] 58s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 liblz4-1 amd64 1.10.0-4 [66.4 kB] 58s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 liblzma5 amd64 5.6.4-1 [157 kB] 58s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libsystemd0 amd64 257.3-1ubuntu3 [595 kB] 58s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libnss-systemd amd64 257.3-1ubuntu3 [199 kB] 58s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 systemd-sysv amd64 257.3-1ubuntu3 [11.9 kB] 58s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 systemd-resolved amd64 257.3-1ubuntu3 [345 kB] 58s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-systemd amd64 257.3-1ubuntu3 [302 kB] 58s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libsystemd-shared amd64 257.3-1ubuntu3 [2371 kB] 59s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 systemd amd64 257.3-1ubuntu3 [3052 kB] 59s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 systemd-timesyncd amd64 257.3-1ubuntu3 [42.1 kB] 59s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 systemd-cryptsetup amd64 257.3-1ubuntu3 [124 kB] 59s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 udev amd64 257.3-1ubuntu3 [1404 kB] 59s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libudev1 amd64 257.3-1ubuntu3 [215 kB] 59s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit-common all 1:4.0.2-2ubuntu2 [6628 B] 59s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 libcap-ng0 amd64 0.8.5-4build1 [15.6 kB] 59s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit1 amd64 1:4.0.2-2ubuntu2 [54.0 kB] 59s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 libseccomp2 amd64 2.5.5-1ubuntu6 [53.5 kB] 59s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 libselinux1 amd64 3.7-3ubuntu3 [87.3 kB] 59s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 libapparmor1 amd64 4.1.0~beta5-0ubuntu8 [55.0 kB] 59s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libapt-pkg7.0 amd64 2.9.33 [1138 kB] 59s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 apt amd64 2.9.33 [1439 kB] 59s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 apt-utils amd64 2.9.33 [222 kB] 59s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-minimal amd64 3.13.2-2 [27.7 kB] 59s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 python3 amd64 3.13.2-2 [24.0 kB] 59s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13 amd64 3.13.2-2 [2341 kB] 60s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 media-types all 13.0.0 [29.9 kB] 60s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 libncurses6 amd64 6.5+20250216-2 [126 kB] 60s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 libncursesw6 amd64 6.5+20250216-2 [165 kB] 60s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 libtinfo6 amd64 6.5+20250216-2 [119 kB] 60s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libsqlite3-0 amd64 3.46.1-2 [715 kB] 60s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13 amd64 3.13.2-2 [735 kB] 60s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-minimal amd64 3.13.2-2 [2365 kB] 60s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-minimal amd64 3.13.2-2 [883 kB] 60s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-stdlib amd64 3.13.2-2 [2066 kB] 60s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3-stdlib amd64 3.13.2-2 [10.4 kB] 60s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 rsync amd64 3.4.1+ds1-3 [482 kB] 60s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebuginfod-common all 0.192-4 [15.4 kB] 60s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage-common all 3.7-2.1build1 [7268 B] 60s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage2 amd64 3.7-2.1build1 [106 kB] 60s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 libassuan9 amd64 3.0.2-2 [43.1 kB] 60s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-girepository-2.0 amd64 1.83.4-1 [25.3 kB] 60s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-glib-2.0 amd64 2.84.0-1 [184 kB] 60s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-0t64 amd64 2.84.0-1 [1669 kB] 61s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 libgirepository-1.0-1 amd64 1.83.4-1 [89.5 kB] 61s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 libestr0 amd64 0.1.11-2 [8340 B] 61s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-data all 2.84.0-1 [53.0 kB] 61s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-newt amd64 0.52.24-4ubuntu2 [21.1 kB] 61s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 libnewt0.52 amd64 0.52.24-4ubuntu2 [55.7 kB] 61s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml2 amd64 2.12.7+dfsg+really2.9.14-0.2ubuntu5 [772 kB] 61s Get:63 http://ftpmaster.internal/ubuntu plucky/main amd64 python-apt-common all 2.9.9build1 [21.3 kB] 61s Get:64 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-apt amd64 2.9.9build1 [172 kB] 61s Get:65 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-cffi-backend amd64 1.17.1-2build2 [96.6 kB] 61s Get:66 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dbus amd64 1.3.2-5build5 [102 kB] 61s Get:67 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gi amd64 3.50.0-4build1 [252 kB] 61s Get:68 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-yaml amd64 6.0.2-1build2 [144 kB] 61s Get:69 http://ftpmaster.internal/ubuntu plucky/main amd64 rsyslog amd64 8.2412.0-2ubuntu2 [555 kB] 61s Get:70 http://ftpmaster.internal/ubuntu plucky/main amd64 whiptail amd64 0.52.24-4ubuntu2 [19.1 kB] 61s Get:71 http://ftpmaster.internal/ubuntu plucky/main amd64 ubuntu-minimal amd64 1.549 [11.5 kB] 61s Get:72 http://ftpmaster.internal/ubuntu plucky/main amd64 apparmor amd64 4.1.0~beta5-0ubuntu8 [701 kB] 61s Get:73 http://ftpmaster.internal/ubuntu plucky/main amd64 dosfstools amd64 4.2-1.2 [95.0 kB] 61s Get:74 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-genl-3-200 amd64 3.7.0-1 [12.2 kB] 61s Get:75 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-route-3-200 amd64 3.7.0-1 [191 kB] 61s Get:76 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-3-200 amd64 3.7.0-1 [64.9 kB] 61s Get:77 http://ftpmaster.internal/ubuntu plucky/main amd64 parted amd64 3.6-5 [53.9 kB] 61s Get:78 http://ftpmaster.internal/ubuntu plucky/main amd64 libparted2t64 amd64 3.6-5 [158 kB] 61s Get:79 http://ftpmaster.internal/ubuntu plucky/main amd64 pci.ids all 0.0~2025.03.09-1 [285 kB] 61s Get:80 http://ftpmaster.internal/ubuntu plucky/main amd64 pciutils amd64 1:3.13.0-2 [110 kB] 61s Get:81 http://ftpmaster.internal/ubuntu plucky/main amd64 libpci3 amd64 1:3.13.0-2 [39.8 kB] 61s Get:82 http://ftpmaster.internal/ubuntu plucky/main amd64 strace amd64 6.13+ds-1ubuntu1 [622 kB] 61s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 xz-utils amd64 5.6.4-1 [278 kB] 61s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 ubuntu-standard amd64 1.549 [11.5 kB] 61s Get:85 http://ftpmaster.internal/ubuntu plucky/main amd64 libgprofng0 amd64 2.44-3ubuntu1 [886 kB] 61s Get:86 http://ftpmaster.internal/ubuntu plucky/main amd64 libctf0 amd64 2.44-3ubuntu1 [96.5 kB] 61s Get:87 http://ftpmaster.internal/ubuntu plucky/main amd64 libctf-nobfd0 amd64 2.44-3ubuntu1 [98.9 kB] 61s Get:88 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils-x86-64-linux-gnu amd64 2.44-3ubuntu1 [1108 kB] 61s Get:89 http://ftpmaster.internal/ubuntu plucky/main amd64 libbinutils amd64 2.44-3ubuntu1 [585 kB] 61s Get:90 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils amd64 2.44-3ubuntu1 [208 kB] 61s Get:91 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils-common amd64 2.44-3ubuntu1 [215 kB] 61s Get:92 http://ftpmaster.internal/ubuntu plucky/main amd64 libsframe1 amd64 2.44-3ubuntu1 [14.8 kB] 61s Get:93 http://ftpmaster.internal/ubuntu plucky/main amd64 hwdata all 0.393-3 [1562 B] 61s Get:94 http://ftpmaster.internal/ubuntu plucky/main amd64 pnp.ids all 0.393-3 [29.5 kB] 61s Get:95 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-common all 6.14.0-10.10 [295 kB] 61s Get:96 http://ftpmaster.internal/ubuntu plucky/main amd64 bpftool amd64 7.6.0+6.14.0-10.10 [1147 kB] 62s Get:97 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-markupsafe amd64 2.1.5-1build4 [13.4 kB] 62s Get:98 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 62s Get:99 http://ftpmaster.internal/ubuntu plucky/main amd64 cloud-init-base all 25.1-0ubuntu3 [616 kB] 62s Get:100 http://ftpmaster.internal/ubuntu plucky/main amd64 libbrotli1 amd64 1.1.0-2build4 [365 kB] 62s Get:101 http://ftpmaster.internal/ubuntu plucky/main amd64 curl amd64 8.12.1-3ubuntu1 [258 kB] 62s Get:102 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4t64 amd64 8.12.1-3ubuntu1 [437 kB] 62s Get:103 http://ftpmaster.internal/ubuntu plucky/main amd64 exfatprogs amd64 1.2.8-1 [76.3 kB] 62s Get:104 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl3t64-gnutls amd64 8.12.1-3ubuntu1 [432 kB] 63s Get:105 http://ftpmaster.internal/ubuntu plucky/main amd64 fwupd amd64 2.0.6-4 [5408 kB] 64s Get:106 http://ftpmaster.internal/ubuntu plucky/main amd64 libfwupd3 amd64 2.0.6-4 [136 kB] 64s Get:107 http://ftpmaster.internal/ubuntu plucky/main amd64 libmm-glib0 amd64 1.23.4-0ubuntu3 [251 kB] 64s Get:108 http://ftpmaster.internal/ubuntu plucky/main amd64 htop amd64 3.4.0-2 [195 kB] 64s Get:109 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-firmware amd64 20250310.git9e1370d3-0ubuntu1 [571 MB] 158s Get:110 http://ftpmaster.internal/ubuntu plucky/main amd64 initramfs-tools all 0.146ubuntu1 [7920 B] 158s Get:111 http://ftpmaster.internal/ubuntu plucky/main amd64 initramfs-tools-core all 0.146ubuntu1 [51.9 kB] 158s Get:112 http://ftpmaster.internal/ubuntu plucky/main amd64 initramfs-tools-bin amd64 0.146ubuntu1 [26.2 kB] 158s Get:113 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebuginfod1t64 amd64 0.192-4 [21.0 kB] 158s Get:114 http://ftpmaster.internal/ubuntu plucky/main amd64 libftdi1-2 amd64 1.5-8build1 [30.2 kB] 158s Get:115 http://ftpmaster.internal/ubuntu plucky/main amd64 libgpgme11t64 amd64 1.24.2-1ubuntu2 [155 kB] 158s Get:116 http://ftpmaster.internal/ubuntu plucky/main amd64 libjemalloc2 amd64 5.3.0-3 [277 kB] 158s Get:117 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-modules-6.14.0-10-generic amd64 6.14.0-10.10 [41.2 MB] 164s Get:118 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-6.14.0-10-generic amd64 6.14.0-10.10 [15.3 MB] 166s Get:119 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-modules-extra-6.14.0-10-generic amd64 6.14.0-10.10 [120 MB] 185s Get:120 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-generic amd64 6.14.0-10.10 [1730 B] 185s Get:121 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-generic amd64 6.14.0-10.10 [11.1 kB] 185s Get:122 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-virtual amd64 6.14.0-10.10 [1722 B] 185s Get:123 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-virtual amd64 6.14.0-10.10 [11.1 kB] 185s Get:124 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-virtual amd64 6.14.0-10.10 [1642 B] 185s Get:125 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-6.14.0-10 all 6.14.0-10.10 [14.2 MB] 187s Get:126 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-6.14.0-10-generic amd64 6.14.0-10.10 [3915 kB] 187s Get:127 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-generic amd64 6.14.0-10.10 [11.0 kB] 187s Get:128 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-perf amd64 6.14.0-10.10 [4122 kB] 188s Get:129 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-6.14.0-10 amd64 6.14.0-10.10 [1394 kB] 188s Get:130 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-6.14.0-10-generic amd64 6.14.0-10.10 [830 B] 188s Get:131 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-lazr.uri all 1.0.6-6 [13.7 kB] 188s Get:132 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-rpds-py amd64 0.21.0-2ubuntu2 [278 kB] 188s Get:133 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-systemd amd64 235-1build6 [43.9 kB] 188s Get:134 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-gdbm amd64 3.13.2-2 [31.9 kB] 188s Get:135 http://ftpmaster.internal/ubuntu plucky/main amd64 ubuntu-kernel-accessories amd64 1.549 [11.2 kB] 188s Get:136 http://ftpmaster.internal/ubuntu plucky/main amd64 cloud-init all 25.1-0ubuntu3 [2100 B] 188s Get:137 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-bcrypt amd64 4.2.0-2.1build1 [221 kB] 189s Preconfiguring packages ... 189s Fetched 829 MB in 2min 13s (6223 kB/s) 189s (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 ... 109140 files and directories currently installed.) 189s Preparing to unpack .../ncurses-bin_6.5+20250216-2_amd64.deb ... 189s Unpacking ncurses-bin (6.5+20250216-2) over (6.5+20250216-1) ... 189s Setting up ncurses-bin (6.5+20250216-2) ... 189s (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 ... 109140 files and directories currently installed.) 189s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu1_amd64.deb ... 189s Unpacking libc-dev-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 189s Preparing to unpack .../libc6-dev_2.41-1ubuntu1_amd64.deb ... 189s Unpacking libc6-dev:amd64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 189s Preparing to unpack .../locales_2.41-1ubuntu1_all.deb ... 189s Unpacking locales (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 190s Preparing to unpack .../libc6_2.41-1ubuntu1_amd64.deb ... 190s Checking for services that may need to be restarted... 190s Checking init scripts... 190s Checking for services that may need to be restarted... 190s Checking init scripts... 190s Stopping some services possibly affected by the upgrade (will be restarted later): 190s cron: stopping...done. 190s 190s Unpacking libc6:amd64 (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 190s Setting up libc6:amd64 (2.41-1ubuntu1) ... 190s Checking for services that may need to be restarted... 190s Checking init scripts... 190s Restarting services possibly affected by the upgrade: 190s cron: restarting...done. 190s 190s Services restarted successfully. 190s (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 ... 109141 files and directories currently installed.) 190s Preparing to unpack .../libc-bin_2.41-1ubuntu1_amd64.deb ... 190s Unpacking libc-bin (2.41-1ubuntu1) over (2.40-4ubuntu1) ... 190s Setting up libc-bin (2.41-1ubuntu1) ... 191s (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 ... 109141 files and directories currently installed.) 191s Preparing to unpack .../linux-libc-dev_6.14.0-10.10_amd64.deb ... 191s Unpacking linux-libc-dev:amd64 (6.14.0-10.10) over (6.12.0-16.16) ... 191s Preparing to unpack .../libatomic1_15-20250222-0ubuntu1_amd64.deb ... 191s Unpacking libatomic1:amd64 (15-20250222-0ubuntu1) over (15-20250213-1ubuntu1) ... 191s Preparing to unpack .../gcc-15-base_15-20250222-0ubuntu1_amd64.deb ... 191s Unpacking gcc-15-base:amd64 (15-20250222-0ubuntu1) over (15-20250213-1ubuntu1) ... 191s Setting up gcc-15-base:amd64 (15-20250222-0ubuntu1) ... 191s (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 ... 109146 files and directories currently installed.) 191s Preparing to unpack .../libgcc-s1_15-20250222-0ubuntu1_amd64.deb ... 191s Unpacking libgcc-s1:amd64 (15-20250222-0ubuntu1) over (15-20250213-1ubuntu1) ... 191s Setting up libgcc-s1:amd64 (15-20250222-0ubuntu1) ... 191s (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 ... 109146 files and directories currently installed.) 191s Preparing to unpack .../libstdc++6_15-20250222-0ubuntu1_amd64.deb ... 191s Unpacking libstdc++6:amd64 (15-20250222-0ubuntu1) over (15-20250213-1ubuntu1) ... 191s Setting up libstdc++6:amd64 (15-20250222-0ubuntu1) ... 191s (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 ... 109146 files and directories currently installed.) 191s Preparing to unpack .../ncurses-base_6.5+20250216-2_all.deb ... 191s Unpacking ncurses-base (6.5+20250216-2) over (6.5+20250216-1) ... 191s Setting up ncurses-base (6.5+20250216-2) ... 191s (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 ... 109146 files and directories currently installed.) 191s Preparing to unpack .../ncurses-term_6.5+20250216-2_all.deb ... 191s Unpacking ncurses-term (6.5+20250216-2) over (6.5+20250216-1) ... 192s Preparing to unpack .../liblz4-1_1.10.0-4_amd64.deb ... 192s Unpacking liblz4-1:amd64 (1.10.0-4) over (1.10.0-3) ... 192s Setting up liblz4-1:amd64 (1.10.0-4) ... 192s (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 ... 109146 files and directories currently installed.) 192s Preparing to unpack .../liblzma5_5.6.4-1_amd64.deb ... 192s Unpacking liblzma5:amd64 (5.6.4-1) over (5.6.3-1) ... 192s Setting up liblzma5:amd64 (5.6.4-1) ... 192s (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 ... 109146 files and directories currently installed.) 192s Preparing to unpack .../libsystemd0_257.3-1ubuntu3_amd64.deb ... 192s Unpacking libsystemd0:amd64 (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Setting up libsystemd0:amd64 (257.3-1ubuntu3) ... 192s (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 ... 109146 files and directories currently installed.) 192s Preparing to unpack .../libnss-systemd_257.3-1ubuntu3_amd64.deb ... 192s Unpacking libnss-systemd:amd64 (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Preparing to unpack .../systemd-sysv_257.3-1ubuntu3_amd64.deb ... 192s Unpacking systemd-sysv (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Preparing to unpack .../systemd-resolved_257.3-1ubuntu3_amd64.deb ... 192s Unpacking systemd-resolved (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Preparing to unpack .../libpam-systemd_257.3-1ubuntu3_amd64.deb ... 192s Unpacking libpam-systemd:amd64 (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Preparing to unpack .../libsystemd-shared_257.3-1ubuntu3_amd64.deb ... 192s Unpacking libsystemd-shared:amd64 (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 192s Setting up libsystemd-shared:amd64 (257.3-1ubuntu3) ... 192s (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 ... 109146 files and directories currently installed.) 192s Preparing to unpack .../systemd_257.3-1ubuntu3_amd64.deb ... 192s Unpacking systemd (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 193s Preparing to unpack .../systemd-timesyncd_257.3-1ubuntu3_amd64.deb ... 193s Unpacking systemd-timesyncd (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 193s Preparing to unpack .../systemd-cryptsetup_257.3-1ubuntu3_amd64.deb ... 193s Unpacking systemd-cryptsetup (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 193s Preparing to unpack .../udev_257.3-1ubuntu3_amd64.deb ... 193s Unpacking udev (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 193s Preparing to unpack .../libudev1_257.3-1ubuntu3_amd64.deb ... 193s Unpacking libudev1:amd64 (257.3-1ubuntu3) over (257.2-3ubuntu1) ... 193s Setting up libudev1:amd64 (257.3-1ubuntu3) ... 193s (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 ... 109146 files and directories currently installed.) 193s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu2_all.deb ... 193s Unpacking libaudit-common (1:4.0.2-2ubuntu2) over (1:4.0.2-2ubuntu1) ... 193s Setting up libaudit-common (1:4.0.2-2ubuntu2) ... 193s (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 ... 109146 files and directories currently installed.) 193s Preparing to unpack .../libcap-ng0_0.8.5-4build1_amd64.deb ... 193s Unpacking libcap-ng0:amd64 (0.8.5-4build1) over (0.8.5-4) ... 193s Setting up libcap-ng0:amd64 (0.8.5-4build1) ... 193s (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 ... 109146 files and directories currently installed.) 193s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu2_amd64.deb ... 193s Unpacking libaudit1:amd64 (1:4.0.2-2ubuntu2) over (1:4.0.2-2ubuntu1) ... 193s Setting up libaudit1:amd64 (1:4.0.2-2ubuntu2) ... 193s (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 ... 109146 files and directories currently installed.) 193s Preparing to unpack .../libseccomp2_2.5.5-1ubuntu6_amd64.deb ... 193s Unpacking libseccomp2:amd64 (2.5.5-1ubuntu6) over (2.5.5-1ubuntu5) ... 193s Setting up libseccomp2:amd64 (2.5.5-1ubuntu6) ... 193s (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 ... 109146 files and directories currently installed.) 193s Preparing to unpack .../libselinux1_3.7-3ubuntu3_amd64.deb ... 193s Unpacking libselinux1:amd64 (3.7-3ubuntu3) over (3.7-3ubuntu2) ... 193s Setting up libselinux1:amd64 (3.7-3ubuntu3) ... 194s (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 ... 109146 files and directories currently installed.) 194s Preparing to unpack .../libapparmor1_4.1.0~beta5-0ubuntu8_amd64.deb ... 194s Unpacking libapparmor1:amd64 (4.1.0~beta5-0ubuntu8) over (4.1.0~beta5-0ubuntu5) ... 194s Preparing to unpack .../libapt-pkg7.0_2.9.33_amd64.deb ... 194s Unpacking libapt-pkg7.0:amd64 (2.9.33) over (2.9.31ubuntu1) ... 194s Setting up libapt-pkg7.0:amd64 (2.9.33) ... 194s (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 ... 109146 files and directories currently installed.) 194s Preparing to unpack .../archives/apt_2.9.33_amd64.deb ... 194s Unpacking apt (2.9.33) over (2.9.31ubuntu1) ... 194s Setting up apt (2.9.33) ... 194s (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 ... 109146 files and directories currently installed.) 194s Preparing to unpack .../apt-utils_2.9.33_amd64.deb ... 194s Unpacking apt-utils (2.9.33) over (2.9.31ubuntu1) ... 194s Preparing to unpack .../python3-minimal_3.13.2-2_amd64.deb ... 194s Unpacking python3-minimal (3.13.2-2) over (3.13.2-1) ... 195s Setting up python3-minimal (3.13.2-2) ... 195s (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 ... 109146 files and directories currently installed.) 195s Preparing to unpack .../0-python3_3.13.2-2_amd64.deb ... 195s Unpacking python3 (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../1-libpython3.13_3.13.2-2_amd64.deb ... 195s Unpacking libpython3.13:amd64 (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../2-media-types_13.0.0_all.deb ... 195s Unpacking media-types (13.0.0) over (12.0.0) ... 195s Preparing to unpack .../3-libncurses6_6.5+20250216-2_amd64.deb ... 195s Unpacking libncurses6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 195s Preparing to unpack .../4-libncursesw6_6.5+20250216-2_amd64.deb ... 195s Unpacking libncursesw6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 195s Preparing to unpack .../5-libtinfo6_6.5+20250216-2_amd64.deb ... 195s Unpacking libtinfo6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 195s Setting up libtinfo6:amd64 (6.5+20250216-2) ... 195s (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 ... 109146 files and directories currently installed.) 195s Preparing to unpack .../0-libsqlite3-0_3.46.1-2_amd64.deb ... 195s Unpacking libsqlite3-0:amd64 (3.46.1-2) over (3.46.1-1) ... 195s Preparing to unpack .../1-python3.13_3.13.2-2_amd64.deb ... 195s Unpacking python3.13 (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../2-python3.13-minimal_3.13.2-2_amd64.deb ... 195s Unpacking python3.13-minimal (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../3-libpython3.13-minimal_3.13.2-2_amd64.deb ... 195s Unpacking libpython3.13-minimal:amd64 (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../4-libpython3.13-stdlib_3.13.2-2_amd64.deb ... 195s Unpacking libpython3.13-stdlib:amd64 (3.13.2-2) over (3.13.2-1) ... 195s Preparing to unpack .../5-libpython3-stdlib_3.13.2-2_amd64.deb ... 195s Unpacking libpython3-stdlib:amd64 (3.13.2-2) over (3.13.2-1) ... 196s Preparing to unpack .../6-rsync_3.4.1+ds1-3_amd64.deb ... 196s Unpacking rsync (3.4.1+ds1-3) over (3.4.1-0syncable1) ... 196s Selecting previously unselected package libdebuginfod-common. 196s Preparing to unpack .../7-libdebuginfod-common_0.192-4_all.deb ... 196s Unpacking libdebuginfod-common (0.192-4) ... 196s Preparing to unpack .../8-libsemanage-common_3.7-2.1build1_all.deb ... 196s Unpacking libsemanage-common (3.7-2.1build1) over (3.7-2.1) ... 196s Setting up libsemanage-common (3.7-2.1build1) ... 196s (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 ... 109155 files and directories currently installed.) 196s Preparing to unpack .../libsemanage2_3.7-2.1build1_amd64.deb ... 196s Unpacking libsemanage2:amd64 (3.7-2.1build1) over (3.7-2.1) ... 196s Setting up libsemanage2:amd64 (3.7-2.1build1) ... 196s (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 ... 109155 files and directories currently installed.) 196s Preparing to unpack .../libassuan9_3.0.2-2_amd64.deb ... 196s Unpacking libassuan9:amd64 (3.0.2-2) over (3.0.1-2) ... 196s Setting up libassuan9:amd64 (3.0.2-2) ... 196s (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 ... 109155 files and directories currently installed.) 196s Preparing to unpack .../00-gir1.2-girepository-2.0_1.83.4-1_amd64.deb ... 196s Unpacking gir1.2-girepository-2.0:amd64 (1.83.4-1) over (1.82.0-4) ... 196s Preparing to unpack .../01-gir1.2-glib-2.0_2.84.0-1_amd64.deb ... 196s Unpacking gir1.2-glib-2.0:amd64 (2.84.0-1) over (2.83.5-1) ... 196s Preparing to unpack .../02-libglib2.0-0t64_2.84.0-1_amd64.deb ... 196s Unpacking libglib2.0-0t64:amd64 (2.84.0-1) over (2.83.5-1) ... 196s Preparing to unpack .../03-libgirepository-1.0-1_1.83.4-1_amd64.deb ... 196s Unpacking libgirepository-1.0-1:amd64 (1.83.4-1) over (1.82.0-4) ... 196s Preparing to unpack .../04-libestr0_0.1.11-2_amd64.deb ... 196s Unpacking libestr0:amd64 (0.1.11-2) over (0.1.11-1build1) ... 196s Preparing to unpack .../05-libglib2.0-data_2.84.0-1_all.deb ... 196s Unpacking libglib2.0-data (2.84.0-1) over (2.83.5-1) ... 196s Preparing to unpack .../06-python3-newt_0.52.24-4ubuntu2_amd64.deb ... 196s Unpacking python3-newt:amd64 (0.52.24-4ubuntu2) over (0.52.24-4ubuntu1) ... 196s Preparing to unpack .../07-libnewt0.52_0.52.24-4ubuntu2_amd64.deb ... 196s Unpacking libnewt0.52:amd64 (0.52.24-4ubuntu2) over (0.52.24-4ubuntu1) ... 196s Preparing to unpack .../08-libxml2_2.12.7+dfsg+really2.9.14-0.2ubuntu5_amd64.deb ... 196s Unpacking libxml2:amd64 (2.12.7+dfsg+really2.9.14-0.2ubuntu5) over (2.12.7+dfsg+really2.9.14-0.2ubuntu4) ... 197s Preparing to unpack .../09-python-apt-common_2.9.9build1_all.deb ... 197s Unpacking python-apt-common (2.9.9build1) over (2.9.9) ... 197s Preparing to unpack .../10-python3-apt_2.9.9build1_amd64.deb ... 197s Unpacking python3-apt (2.9.9build1) over (2.9.9) ... 197s Preparing to unpack .../11-python3-cffi-backend_1.17.1-2build2_amd64.deb ... 197s Unpacking python3-cffi-backend:amd64 (1.17.1-2build2) over (1.17.1-2build1) ... 197s Preparing to unpack .../12-python3-dbus_1.3.2-5build5_amd64.deb ... 197s Unpacking python3-dbus (1.3.2-5build5) over (1.3.2-5build4) ... 197s Preparing to unpack .../13-python3-gi_3.50.0-4build1_amd64.deb ... 197s Unpacking python3-gi (3.50.0-4build1) over (3.50.0-4) ... 197s Preparing to unpack .../14-python3-yaml_6.0.2-1build2_amd64.deb ... 197s Unpacking python3-yaml (6.0.2-1build2) over (6.0.2-1build1) ... 197s Preparing to unpack .../15-rsyslog_8.2412.0-2ubuntu2_amd64.deb ... 197s Unpacking rsyslog (8.2412.0-2ubuntu2) over (8.2412.0-2ubuntu1) ... 197s Preparing to unpack .../16-whiptail_0.52.24-4ubuntu2_amd64.deb ... 197s Unpacking whiptail (0.52.24-4ubuntu2) over (0.52.24-4ubuntu1) ... 197s Preparing to unpack .../17-ubuntu-minimal_1.549_amd64.deb ... 197s Unpacking ubuntu-minimal (1.549) over (1.548) ... 197s Preparing to unpack .../18-apparmor_4.1.0~beta5-0ubuntu8_amd64.deb ... 198s Unpacking apparmor (4.1.0~beta5-0ubuntu8) over (4.1.0~beta5-0ubuntu5) ... 198s Preparing to unpack .../19-dosfstools_4.2-1.2_amd64.deb ... 198s Unpacking dosfstools (4.2-1.2) over (4.2-1.1build1) ... 198s Preparing to unpack .../20-libnl-genl-3-200_3.7.0-1_amd64.deb ... 198s Unpacking libnl-genl-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 198s Preparing to unpack .../21-libnl-route-3-200_3.7.0-1_amd64.deb ... 198s Unpacking libnl-route-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 198s Preparing to unpack .../22-libnl-3-200_3.7.0-1_amd64.deb ... 198s Unpacking libnl-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 198s Preparing to unpack .../23-parted_3.6-5_amd64.deb ... 198s Unpacking parted (3.6-5) over (3.6-4build1) ... 198s Preparing to unpack .../24-libparted2t64_3.6-5_amd64.deb ... 198s Adding 'diversion of /lib/x86_64-linux-gnu/libparted.so.2 to /lib/x86_64-linux-gnu/libparted.so.2.usr-is-merged by libparted2t64' 198s Adding 'diversion of /lib/x86_64-linux-gnu/libparted.so.2.0.5 to /lib/x86_64-linux-gnu/libparted.so.2.0.5.usr-is-merged by libparted2t64' 198s Unpacking libparted2t64:amd64 (3.6-5) over (3.6-4build1) ... 198s Preparing to unpack .../25-pci.ids_0.0~2025.03.09-1_all.deb ... 198s Unpacking pci.ids (0.0~2025.03.09-1) over (0.0~2025.02.12-1) ... 198s Preparing to unpack .../26-pciutils_1%3a3.13.0-2_amd64.deb ... 198s Unpacking pciutils (1:3.13.0-2) over (1:3.13.0-1) ... 198s Preparing to unpack .../27-libpci3_1%3a3.13.0-2_amd64.deb ... 198s Unpacking libpci3:amd64 (1:3.13.0-2) over (1:3.13.0-1) ... 198s Preparing to unpack .../28-strace_6.13+ds-1ubuntu1_amd64.deb ... 198s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 198s Preparing to unpack .../29-xz-utils_5.6.4-1_amd64.deb ... 198s Unpacking xz-utils (5.6.4-1) over (5.6.3-1) ... 198s Preparing to unpack .../30-ubuntu-standard_1.549_amd64.deb ... 198s Unpacking ubuntu-standard (1.549) over (1.548) ... 198s Preparing to unpack .../31-libgprofng0_2.44-3ubuntu1_amd64.deb ... 198s Unpacking libgprofng0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../32-libctf0_2.44-3ubuntu1_amd64.deb ... 199s Unpacking libctf0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../33-libctf-nobfd0_2.44-3ubuntu1_amd64.deb ... 199s Unpacking libctf-nobfd0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../34-binutils-x86-64-linux-gnu_2.44-3ubuntu1_amd64.deb ... 199s Unpacking binutils-x86-64-linux-gnu (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../35-libbinutils_2.44-3ubuntu1_amd64.deb ... 199s Unpacking libbinutils:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../36-binutils_2.44-3ubuntu1_amd64.deb ... 199s Unpacking binutils (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../37-binutils-common_2.44-3ubuntu1_amd64.deb ... 199s Unpacking binutils-common:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../38-libsframe1_2.44-3ubuntu1_amd64.deb ... 199s Unpacking libsframe1:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 199s Preparing to unpack .../39-hwdata_0.393-3_all.deb ... 199s Unpacking hwdata (0.393-3) over (0.392-1) ... 199s Selecting previously unselected package pnp.ids. 199s Preparing to unpack .../40-pnp.ids_0.393-3_all.deb ... 199s Unpacking pnp.ids (0.393-3) ... 199s Preparing to unpack .../41-linux-tools-common_6.14.0-10.10_all.deb ... 199s Unpacking linux-tools-common (6.14.0-10.10) over (6.12.0-16.16) ... 199s Selecting previously unselected package bpftool. 199s Preparing to unpack .../42-bpftool_7.6.0+6.14.0-10.10_amd64.deb ... 199s Unpacking bpftool (7.6.0+6.14.0-10.10) ... 199s Preparing to unpack .../43-python3-markupsafe_2.1.5-1build4_amd64.deb ... 199s Unpacking python3-markupsafe (2.1.5-1build4) over (2.1.5-1build3) ... 199s Preparing to unpack .../44-python3-jinja2_3.1.5-2ubuntu1_all.deb ... 199s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 199s Preparing to unpack .../45-cloud-init-base_25.1-0ubuntu3_all.deb ... 199s Unpacking cloud-init-base (25.1-0ubuntu3) over (25.1-0ubuntu2) ... 200s Preparing to unpack .../46-libbrotli1_1.1.0-2build4_amd64.deb ... 200s Unpacking libbrotli1:amd64 (1.1.0-2build4) over (1.1.0-2build3) ... 200s Preparing to unpack .../47-curl_8.12.1-3ubuntu1_amd64.deb ... 200s Unpacking curl (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 200s Preparing to unpack .../48-libcurl4t64_8.12.1-3ubuntu1_amd64.deb ... 200s Unpacking libcurl4t64:amd64 (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 200s Preparing to unpack .../49-exfatprogs_1.2.8-1_amd64.deb ... 200s Unpacking exfatprogs (1.2.8-1) over (1.2.7-3) ... 200s Preparing to unpack .../50-libcurl3t64-gnutls_8.12.1-3ubuntu1_amd64.deb ... 200s Unpacking libcurl3t64-gnutls:amd64 (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 200s Preparing to unpack .../51-fwupd_2.0.6-4_amd64.deb ... 200s Unpacking fwupd (2.0.6-4) over (2.0.6-3) ... 200s Preparing to unpack .../52-libfwupd3_2.0.6-4_amd64.deb ... 200s Unpacking libfwupd3:amd64 (2.0.6-4) over (2.0.6-3) ... 200s Preparing to unpack .../53-libmm-glib0_1.23.4-0ubuntu3_amd64.deb ... 200s Unpacking libmm-glib0:amd64 (1.23.4-0ubuntu3) over (1.23.4-0ubuntu2) ... 200s Preparing to unpack .../54-htop_3.4.0-2_amd64.deb ... 200s Unpacking htop (3.4.0-2) over (3.3.0-5) ... 200s Preparing to unpack .../55-linux-firmware_20250310.git9e1370d3-0ubuntu1_amd64.deb ... 200s Unpacking linux-firmware (20250310.git9e1370d3-0ubuntu1) over (20250204.git0fd450ee-0ubuntu1) ... 203s Preparing to unpack .../56-initramfs-tools_0.146ubuntu1_all.deb ... 203s Unpacking initramfs-tools (0.146ubuntu1) over (0.145ubuntu3) ... 203s Preparing to unpack .../57-initramfs-tools-core_0.146ubuntu1_all.deb ... 203s Unpacking initramfs-tools-core (0.146ubuntu1) over (0.145ubuntu3) ... 203s Preparing to unpack .../58-initramfs-tools-bin_0.146ubuntu1_amd64.deb ... 203s Unpacking initramfs-tools-bin (0.146ubuntu1) over (0.145ubuntu3) ... 203s Selecting previously unselected package libdebuginfod1t64:amd64. 203s Preparing to unpack .../59-libdebuginfod1t64_0.192-4_amd64.deb ... 203s Unpacking libdebuginfod1t64:amd64 (0.192-4) ... 203s Preparing to unpack .../60-libftdi1-2_1.5-8build1_amd64.deb ... 203s Unpacking libftdi1-2:amd64 (1.5-8build1) over (1.5-8) ... 203s Preparing to unpack .../61-libgpgme11t64_1.24.2-1ubuntu2_amd64.deb ... 203s Unpacking libgpgme11t64:amd64 (1.24.2-1ubuntu2) over (1.24.2-1ubuntu1) ... 203s Preparing to unpack .../62-libjemalloc2_5.3.0-3_amd64.deb ... 203s Unpacking libjemalloc2:amd64 (5.3.0-3) over (5.3.0-2build1) ... 203s Selecting previously unselected package linux-modules-6.14.0-10-generic. 203s Preparing to unpack .../63-linux-modules-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 203s Unpacking linux-modules-6.14.0-10-generic (6.14.0-10.10) ... 204s Selecting previously unselected package linux-image-6.14.0-10-generic. 204s Preparing to unpack .../64-linux-image-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 204s Unpacking linux-image-6.14.0-10-generic (6.14.0-10.10) ... 204s Selecting previously unselected package linux-modules-extra-6.14.0-10-generic. 204s Preparing to unpack .../65-linux-modules-extra-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 204s Unpacking linux-modules-extra-6.14.0-10-generic (6.14.0-10.10) ... 205s Preparing to unpack .../66-linux-generic_6.14.0-10.10_amd64.deb ... 205s Unpacking linux-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 205s Preparing to unpack .../67-linux-image-generic_6.14.0-10.10_amd64.deb ... 205s Unpacking linux-image-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 205s Preparing to unpack .../68-linux-virtual_6.14.0-10.10_amd64.deb ... 205s Unpacking linux-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 205s Preparing to unpack .../69-linux-image-virtual_6.14.0-10.10_amd64.deb ... 205s Unpacking linux-image-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 205s Preparing to unpack .../70-linux-headers-virtual_6.14.0-10.10_amd64.deb ... 205s Unpacking linux-headers-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 205s Selecting previously unselected package linux-headers-6.14.0-10. 205s Preparing to unpack .../71-linux-headers-6.14.0-10_6.14.0-10.10_all.deb ... 205s Unpacking linux-headers-6.14.0-10 (6.14.0-10.10) ... 207s Selecting previously unselected package linux-headers-6.14.0-10-generic. 207s Preparing to unpack .../72-linux-headers-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 207s Unpacking linux-headers-6.14.0-10-generic (6.14.0-10.10) ... 208s Preparing to unpack .../73-linux-headers-generic_6.14.0-10.10_amd64.deb ... 208s Unpacking linux-headers-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 208s Selecting previously unselected package linux-perf. 208s Preparing to unpack .../74-linux-perf_6.14.0-10.10_amd64.deb ... 208s Unpacking linux-perf (6.14.0-10.10) ... 209s Selecting previously unselected package linux-tools-6.14.0-10. 209s Preparing to unpack .../75-linux-tools-6.14.0-10_6.14.0-10.10_amd64.deb ... 209s Unpacking linux-tools-6.14.0-10 (6.14.0-10.10) ... 209s Selecting previously unselected package linux-tools-6.14.0-10-generic. 209s Preparing to unpack .../76-linux-tools-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 209s Unpacking linux-tools-6.14.0-10-generic (6.14.0-10.10) ... 209s Preparing to unpack .../77-python3-lazr.uri_1.0.6-6_all.deb ... 209s Unpacking python3-lazr.uri (1.0.6-6) over (1.0.6-5) ... 209s Preparing to unpack .../78-python3-rpds-py_0.21.0-2ubuntu2_amd64.deb ... 209s Unpacking python3-rpds-py (0.21.0-2ubuntu2) over (0.21.0-2ubuntu1) ... 209s Preparing to unpack .../79-python3-systemd_235-1build6_amd64.deb ... 209s Unpacking python3-systemd (235-1build6) over (235-1build5) ... 209s Preparing to unpack .../80-python3.13-gdbm_3.13.2-2_amd64.deb ... 209s Unpacking python3.13-gdbm (3.13.2-2) over (3.13.2-1) ... 209s Preparing to unpack .../81-ubuntu-kernel-accessories_1.549_amd64.deb ... 209s Unpacking ubuntu-kernel-accessories (1.549) over (1.548) ... 209s Preparing to unpack .../82-cloud-init_25.1-0ubuntu3_all.deb ... 209s Unpacking cloud-init (25.1-0ubuntu3) over (25.1-0ubuntu2) ... 209s Preparing to unpack .../83-python3-bcrypt_4.2.0-2.1build1_amd64.deb ... 209s Unpacking python3-bcrypt (4.2.0-2.1build1) over (4.2.0-2.1) ... 209s Setting up linux-headers-6.14.0-10 (6.14.0-10.10) ... 209s Setting up media-types (13.0.0) ... 209s Installing new version of config file /etc/mime.types ... 209s Setting up linux-headers-6.14.0-10-generic (6.14.0-10.10) ... 209s Setting up ubuntu-kernel-accessories (1.549) ... 209s Setting up libapparmor1:amd64 (4.1.0~beta5-0ubuntu8) ... 209s Setting up pci.ids (0.0~2025.03.09-1) ... 209s Setting up libnewt0.52:amd64 (0.52.24-4ubuntu2) ... 209s Setting up apt-utils (2.9.33) ... 209s Setting up libdebuginfod-common (0.192-4) ... 209s Setting up exfatprogs (1.2.8-1) ... 209s Setting up linux-firmware (20250310.git9e1370d3-0ubuntu1) ... 209s Setting up bpftool (7.6.0+6.14.0-10.10) ... 209s Setting up libestr0:amd64 (0.1.11-2) ... 209s Setting up libbrotli1:amd64 (1.1.0-2build4) ... 209s Setting up libsqlite3-0:amd64 (3.46.1-2) ... 209s Setting up dosfstools (4.2-1.2) ... 209s Setting up rsyslog (8.2412.0-2ubuntu2) ... 209s info: The user `syslog' is already a member of `adm'. 210s Setting up binutils-common:amd64 (2.44-3ubuntu1) ... 210s Setting up libcurl3t64-gnutls:amd64 (8.12.1-3ubuntu1) ... 210s Setting up linux-libc-dev:amd64 (6.14.0-10.10) ... 210s Setting up libctf-nobfd0:amd64 (2.44-3ubuntu1) ... 210s Setting up systemd (257.3-1ubuntu3) ... 210s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 210s Created symlink '/run/systemd/system/tmp.mount' → '/dev/null'. 211s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 211s Setting up libparted2t64:amd64 (3.6-5) ... 211s Removing 'diversion of /lib/x86_64-linux-gnu/libparted.so.2 to /lib/x86_64-linux-gnu/libparted.so.2.usr-is-merged by libparted2t64' 211s Removing 'diversion of /lib/x86_64-linux-gnu/libparted.so.2.0.5 to /lib/x86_64-linux-gnu/libparted.so.2.0.5.usr-is-merged by libparted2t64' 211s Setting up linux-headers-generic (6.14.0-10.10) ... 211s Setting up libjemalloc2:amd64 (5.3.0-3) ... 211s Setting up locales (2.41-1ubuntu1) ... 211s Installing new version of config file /etc/locale.alias ... 212s Generating locales (this might take a while)... 213s en_US.UTF-8... done 213s Generation complete. 213s Setting up libsframe1:amd64 (2.44-3ubuntu1) ... 213s Setting up libpython3.13-minimal:amd64 (3.13.2-2) ... 213s Setting up apparmor (4.1.0~beta5-0ubuntu8) ... 213s Installing new version of config file /etc/apparmor.d/fusermount3 ... 213s Installing new version of config file /etc/apparmor.d/lsusb ... 213s Installing new version of config file /etc/apparmor.d/openvpn ... 214s Reloading AppArmor profiles 215s Setting up libftdi1-2:amd64 (1.5-8build1) ... 215s Setting up libglib2.0-data (2.84.0-1) ... 215s Setting up systemd-cryptsetup (257.3-1ubuntu3) ... 215s Setting up libncurses6:amd64 (6.5+20250216-2) ... 215s Setting up strace (6.13+ds-1ubuntu1) ... 215s Setting up xz-utils (5.6.4-1) ... 216s Setting up systemd-timesyncd (257.3-1ubuntu3) ... 216s systemd-time-wait-sync.service is a disabled or a static unit not running, not starting it. 216s Setting up libatomic1:amd64 (15-20250222-0ubuntu1) ... 216s Setting up udev (257.3-1ubuntu3) ... 217s Setting up linux-modules-6.14.0-10-generic (6.14.0-10.10) ... 218s Setting up libncursesw6:amd64 (6.5+20250216-2) ... 218s Setting up libpci3:amd64 (1:3.13.0-2) ... 218s Setting up whiptail (0.52.24-4ubuntu2) ... 218s Setting up python-apt-common (2.9.9build1) ... 218s Setting up pnp.ids (0.393-3) ... 218s Setting up libnl-3-200:amd64 (3.7.0-1) ... 219s Setting up python3.13-minimal (3.13.2-2) ... 219s Setting up libgpgme11t64:amd64 (1.24.2-1ubuntu2) ... 219s Setting up libbinutils:amd64 (2.44-3ubuntu1) ... 219s Setting up libc-dev-bin (2.41-1ubuntu1) ... 219s Setting up libpython3.13-stdlib:amd64 (3.13.2-2) ... 219s Setting up libxml2:amd64 (2.12.7+dfsg+really2.9.14-0.2ubuntu5) ... 219s Setting up rsync (3.4.1+ds1-3) ... 220s rsync.service is a disabled or a static unit not running, not starting it. 220s Setting up python3.13-gdbm (3.13.2-2) ... 220s Setting up libpython3-stdlib:amd64 (3.13.2-2) ... 220s Setting up systemd-resolved (257.3-1ubuntu3) ... 220s Setting up initramfs-tools-bin (0.146ubuntu1) ... 220s Setting up ncurses-term (6.5+20250216-2) ... 220s Setting up libctf0:amd64 (2.44-3ubuntu1) ... 220s Setting up libpython3.13:amd64 (3.13.2-2) ... 220s Setting up libdebuginfod1t64:amd64 (0.192-4) ... 220s Setting up systemd-sysv (257.3-1ubuntu3) ... 220s Setting up linux-headers-virtual (6.14.0-10.10) ... 220s Setting up libcurl4t64:amd64 (8.12.1-3ubuntu1) ... 220s Setting up python3.13 (3.13.2-2) ... 221s Setting up htop (3.4.0-2) ... 221s Setting up linux-image-6.14.0-10-generic (6.14.0-10.10) ... 223s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.12.0-16-generic 223s I: /boot/initrd.img.old is now a symlink to initrd.img-6.12.0-16-generic 223s I: /boot/vmlinuz is now a symlink to vmlinuz-6.14.0-10-generic 223s I: /boot/initrd.img is now a symlink to initrd.img-6.14.0-10-generic 223s Setting up parted (3.6-5) ... 223s Setting up libnss-systemd:amd64 (257.3-1ubuntu3) ... 223s Setting up python3 (3.13.2-2) ... 223s Setting up python3-newt:amd64 (0.52.24-4ubuntu2) ... 223s Setting up python3-markupsafe (2.1.5-1build4) ... 224s Setting up linux-modules-extra-6.14.0-10-generic (6.14.0-10.10) ... 225s Setting up libnl-route-3-200:amd64 (3.7.0-1) ... 225s Setting up hwdata (0.393-3) ... 225s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 226s Setting up libglib2.0-0t64:amd64 (2.84.0-1) ... 226s No schema files found: doing nothing. 226s Setting up libgprofng0:amd64 (2.44-3ubuntu1) ... 226s Setting up linux-perf (6.14.0-10.10) ... 226s Setting up gir1.2-glib-2.0:amd64 (2.84.0-1) ... 226s Setting up pciutils (1:3.13.0-2) ... 226s Setting up python3-rpds-py (0.21.0-2ubuntu2) ... 226s Setting up libmm-glib0:amd64 (1.23.4-0ubuntu3) ... 226s Setting up libnl-genl-3-200:amd64 (3.7.0-1) ... 226s Setting up libpam-systemd:amd64 (257.3-1ubuntu3) ... 226s Setting up libc6-dev:amd64 (2.41-1ubuntu1) ... 226s Setting up libgirepository-1.0-1:amd64 (1.83.4-1) ... 226s Setting up curl (8.12.1-3ubuntu1) ... 226s Setting up linux-image-virtual (6.14.0-10.10) ... 226s Setting up initramfs-tools-core (0.146ubuntu1) ... 226s Setting up linux-tools-common (6.14.0-10.10) ... 226s Setting up python3-systemd (235-1build6) ... 226s Setting up python3-cffi-backend:amd64 (1.17.1-2build2) ... 226s Setting up binutils-x86-64-linux-gnu (2.44-3ubuntu1) ... 226s Setting up linux-image-generic (6.14.0-10.10) ... 226s Setting up python3-dbus (1.3.2-5build5) ... 226s Setting up linux-tools-6.14.0-10 (6.14.0-10.10) ... 226s Setting up initramfs-tools (0.146ubuntu1) ... 226s Installing new version of config file /etc/kernel/postinst.d/initramfs-tools ... 226s Installing new version of config file /etc/kernel/postrm.d/initramfs-tools ... 226s update-initramfs: deferring update (trigger activated) 226s Setting up linux-generic (6.14.0-10.10) ... 226s Setting up ubuntu-minimal (1.549) ... 226s Setting up python3-apt (2.9.9build1) ... 226s Setting up python3-bcrypt (4.2.0-2.1build1) ... 226s Setting up python3-yaml (6.0.2-1build2) ... 226s Setting up libfwupd3:amd64 (2.0.6-4) ... 226s Setting up python3-lazr.uri (1.0.6-6) ... 226s Setting up binutils (2.44-3ubuntu1) ... 226s Setting up ubuntu-standard (1.549) ... 226s Setting up cloud-init-base (25.1-0ubuntu3) ... 228s Setting up linux-virtual (6.14.0-10.10) ... 228s Setting up gir1.2-girepository-2.0:amd64 (1.83.4-1) ... 228s Setting up python3-gi (3.50.0-4build1) ... 228s Setting up linux-tools-6.14.0-10-generic (6.14.0-10.10) ... 228s Setting up fwupd (2.0.6-4) ... 228s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 228s fwupd.service is a disabled or a static unit not running, not starting it. 228s Setting up cloud-init (25.1-0ubuntu3) ... 228s Processing triggers for man-db (2.13.0-1) ... 230s Processing triggers for dbus (1.16.2-1ubuntu1) ... 230s Processing triggers for shared-mime-info (2.4-5) ... 230s Warning: program compiled against libxml 212 using older 209 230s Processing triggers for libc-bin (2.41-1ubuntu1) ... 230s Processing triggers for linux-image-6.14.0-10-generic (6.14.0-10.10) ... 230s /etc/kernel/postinst.d/initramfs-tools: 230s update-initramfs: Generating /boot/initrd.img-6.14.0-10-generic 230s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 240s /etc/kernel/postinst.d/zz-update-grub: 240s Sourcing file `/etc/default/grub' 240s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 240s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 240s Generating grub configuration file ... 240s Found linux image: /boot/vmlinuz-6.14.0-10-generic 240s Found initrd image: /boot/initrd.img-6.14.0-10-generic 240s Found linux image: /boot/vmlinuz-6.12.0-16-generic 240s Found initrd image: /boot/initrd.img-6.12.0-16-generic 240s Found linux image: /boot/vmlinuz-6.11.0-8-generic 240s Found initrd image: /boot/initrd.img-6.11.0-8-generic 240s Warning: os-prober will not be executed to detect other bootable partitions. 240s Systems on them will not be added to the GRUB boot configuration. 240s Check GRUB_DISABLE_OS_PROBER documentation entry. 240s Adding boot menu entry for UEFI Firmware Settings ... 240s done 240s Processing triggers for initramfs-tools (0.146ubuntu1) ... 240s update-initramfs: Generating /boot/initrd.img-6.14.0-10-generic 240s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 250s Reading package lists... 250s Building dependency tree... 250s Reading state information... 250s Solving dependencies... 250s The following packages will be REMOVED: 250s libnl-genl-3-200* libnsl2* libpython3.12-minimal* libpython3.12-stdlib* 250s libpython3.12t64* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 250s linux-headers-6.12.0-16* linux-headers-6.12.0-16-generic* 250s linux-image-6.11.0-8-generic* linux-image-6.12.0-16-generic* 250s linux-modules-6.11.0-8-generic* linux-modules-6.12.0-16-generic* 250s linux-modules-extra-6.12.0-16-generic* linux-tools-6.11.0-8* 250s linux-tools-6.11.0-8-generic* linux-tools-6.12.0-16* 250s linux-tools-6.12.0-16-generic* 250s 0 upgraded, 0 newly installed, 18 to remove and 5 not upgraded. 250s After this operation, 545 MB disk space will be freed. 250s (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 ... 148643 files and directories currently installed.) 250s Removing libnl-genl-3-200:amd64 (3.7.0-1) ... 250s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 250s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 250s Removing libpython3.12t64:amd64 (3.12.9-1) ... 250s Removing libpython3.12-stdlib:amd64 (3.12.9-1) ... 251s Removing libnsl2:amd64 (1.3.0-3build3) ... 251s Removing libpython3.12-minimal:amd64 (3.12.9-1) ... 251s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 251s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 253s Removing linux-headers-6.12.0-16-generic (6.12.0-16.16) ... 253s Removing linux-headers-6.12.0-16 (6.12.0-16.16) ... 255s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 255s /etc/kernel/postrm.d/initramfs-tools: 255s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 256s /etc/kernel/postrm.d/zz-update-grub: 256s Sourcing file `/etc/default/grub' 256s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 256s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 256s Generating grub configuration file ... 256s Found linux image: /boot/vmlinuz-6.14.0-10-generic 256s Found initrd image: /boot/initrd.img-6.14.0-10-generic 256s Found linux image: /boot/vmlinuz-6.12.0-16-generic 256s Found initrd image: /boot/initrd.img-6.12.0-16-generic 256s Warning: os-prober will not be executed to detect other bootable partitions. 256s Systems on them will not be added to the GRUB boot configuration. 256s Check GRUB_DISABLE_OS_PROBER documentation entry. 256s Adding boot menu entry for UEFI Firmware Settings ... 256s done 256s Removing linux-image-6.12.0-16-generic (6.12.0-16.16) ... 256s W: Removing the running kernel 256s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 256s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 256s /etc/kernel/postrm.d/initramfs-tools: 256s update-initramfs: Deleting /boot/initrd.img-6.12.0-16-generic 256s /etc/kernel/postrm.d/zz-update-grub: 256s Sourcing file `/etc/default/grub' 256s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 256s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 256s Generating grub configuration file ... 256s Found linux image: /boot/vmlinuz-6.14.0-10-generic 256s Found initrd image: /boot/initrd.img-6.14.0-10-generic 257s Warning: os-prober will not be executed to detect other bootable partitions. 257s Systems on them will not be added to the GRUB boot configuration. 257s Check GRUB_DISABLE_OS_PROBER documentation entry. 257s Adding boot menu entry for UEFI Firmware Settings ... 257s done 257s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 257s Removing linux-modules-extra-6.12.0-16-generic (6.12.0-16.16) ... 258s Removing linux-modules-6.12.0-16-generic (6.12.0-16.16) ... 258s Removing linux-tools-6.12.0-16-generic (6.12.0-16.16) ... 258s Removing linux-tools-6.12.0-16 (6.12.0-16.16) ... 258s Processing triggers for libc-bin (2.41-1ubuntu1) ... 258s (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 ... 76972 files and directories currently installed.) 258s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 258s Purging configuration files for libpython3.12-minimal:amd64 (3.12.9-1) ... 258s Purging configuration files for linux-modules-extra-6.12.0-16-generic (6.12.0-16.16) ... 259s Purging configuration files for linux-modules-6.12.0-16-generic (6.12.0-16.16) ... 259s dpkg: warning: while removing linux-modules-6.12.0-16-generic, directory '/lib/modules/6.12.0-16-generic' not empty so not removed 259s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 259s Purging configuration files for linux-image-6.12.0-16-generic (6.12.0-16.16) ... 259s rmdir: failed to remove '/lib/modules/6.12.0-16-generic': Directory not empty 259s autopkgtest [10:39:46]: upgrading testbed (apt dist-upgrade and autopurge) 259s Reading package lists... 259s Building dependency tree... 259s Reading state information... 260s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 260s Starting 2 pkgProblemResolver with broken count: 0 260s Done 260s Entering ResolveByKeep 260s 260s Calculating upgrade... 260s The following packages will be upgraded: 260s libc-bin libc-dev-bin libc6 libc6-dev locales 261s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 261s Need to get 10.5 MB of archives. 261s After this operation, 1024 B of additional disk space will be used. 261s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6-dev amd64 2.41-1ubuntu2 [2183 kB] 261s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-dev-bin amd64 2.41-1ubuntu2 [24.7 kB] 261s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6 amd64 2.41-1ubuntu2 [3327 kB] 262s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-bin amd64 2.41-1ubuntu2 [700 kB] 262s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 locales all 2.41-1ubuntu2 [4246 kB] 263s Preconfiguring packages ... 263s Fetched 10.5 MB in 2s (4212 kB/s) 263s (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 ... 76968 files and directories currently installed.) 263s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_amd64.deb ... 263s Unpacking libc6-dev:amd64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 263s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_amd64.deb ... 263s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 263s Preparing to unpack .../libc6_2.41-1ubuntu2_amd64.deb ... 264s Unpacking libc6:amd64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 264s Setting up libc6:amd64 (2.41-1ubuntu2) ... 264s (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 ... 76968 files and directories currently installed.) 264s Preparing to unpack .../libc-bin_2.41-1ubuntu2_amd64.deb ... 264s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 264s Setting up libc-bin (2.41-1ubuntu2) ... 264s (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 ... 76968 files and directories currently installed.) 264s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 264s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 264s Setting up locales (2.41-1ubuntu2) ... 265s Generating locales (this might take a while)... 266s en_US.UTF-8... done 266s Generation complete. 266s Setting up libc-dev-bin (2.41-1ubuntu2) ... 266s Setting up libc6-dev:amd64 (2.41-1ubuntu2) ... 266s Processing triggers for man-db (2.13.0-1) ... 267s Processing triggers for systemd (257.3-1ubuntu3) ... 267s Reading package lists... 268s Building dependency tree... 268s Reading state information... 268s Starting pkgProblemResolver with broken count: 0 268s Starting 2 pkgProblemResolver with broken count: 0 268s Done 268s Solving dependencies... 268s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 268s autopkgtest [10:39:55]: rebooting testbed after setup commands that affected boot 292s autopkgtest [10:40:19]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 12 16:07:00 UTC 2025 295s autopkgtest [10:40:22]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 298s Get:1 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (dsc) [2285 B] 298s Get:2 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (tar) [1302 kB] 298s Get:3 http://ftpmaster.internal/ubuntu plucky/universe octave-statistics 1.7.3-2 (diff) [9744 B] 298s gpgv: Signature made Thu Feb 20 15:34:23 2025 UTC 298s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 298s gpgv: Can't check signature: No public key 298s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.3-2.dsc: no acceptable signature found 298s autopkgtest [10:40:25]: testing package octave-statistics version 1.7.3-2 299s autopkgtest [10:40:26]: build not needed 300s autopkgtest [10:40:27]: test command1: preparing testbed 300s Reading package lists... 300s Building dependency tree... 300s Reading state information... 300s Starting pkgProblemResolver with broken count: 0 300s Starting 2 pkgProblemResolver with broken count: 0 300s Done 301s The following NEW packages will be installed: 301s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 301s cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu debhelper debugedit 301s dh-autoreconf dh-octave dh-octave-autopkgtest dh-strip-nondeterminism 301s diffstat dwz fontconfig fontconfig-config fonts-dejavu-core 301s fonts-dejavu-mono fonts-freefont-otf g++ g++-14 g++-14-x86-64-linux-gnu 301s g++-x86-64-linux-gnu gcc gcc-14 gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu 301s gettext gfortran gfortran-14 gfortran-14-x86-64-linux-gnu 301s gfortran-x86-64-linux-gnu gnuplot-data gnuplot-nox hdf5-helpers 301s intltool-debian krb5-multidev libaec-dev libaec0 libalgorithm-c3-perl 301s libaliased-perl libamd3 libaom3 libapp-cmd-perl libappstream5 301s libapt-pkg-perl libarchive-zip-perl libarpack2t64 libarray-intspan-perl 301s libasan8 libasound2-data libasound2t64 libavahi-client3 libavahi-common-data 301s libavahi-common3 libb-hooks-endofscope-perl libb-hooks-op-check-perl libb2-1 301s libberkeleydb-perl libblas-dev libblas3 libboolean-perl libbrotli-dev 301s libcairo2 libcamd3 libcapture-tiny-perl libcarp-assert-more-perl libcc1-0 301s libccolamd3 libcgi-pm-perl libcholmod5 libclass-c3-perl 301s libclass-data-inheritable-perl libclass-inspector-perl libclass-load-perl 301s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-choose-perl 301s libclone-perl libcolamd3 libconfig-model-backend-yaml-perl 301s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 301s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl libcups2t64 301s libcurl4-openssl-dev libcxsparse4 libdata-dpath-perl 301s libdata-messagepack-perl libdata-optlist-perl libdata-section-perl 301s libdata-validate-domain-perl libdata-validate-ip-perl 301s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 301s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 301s libdevel-stacktrace-perl libdouble-conversion3 libdrm-intel1 libduktape207 301s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 301s libencode-locale-perl liberror-perl libevent-2.1-7t64 301s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 301s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-quad3 301s libfftw3-single3 libfile-basedir-perl libfile-find-rule-perl 301s libfile-homedir-perl libfile-listing-perl libfile-sharedir-perl 301s libfile-stripnondeterminism-perl libfile-which-perl libflac12t64 301s libfltk-gl1.3t64 libfltk1.3t64 libfont-ttf-perl libfontconfig1 libfontenc1 301s libgbm1 libgcc-14-dev libgd3 libgetopt-long-descriptive-perl 301s libgfortran-14-dev libgfortran5 libgl-dev libgl1 libgl1-mesa-dri libgl2ps1.4 301s libglpk40 libglu1-mesa libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev 301s libgmpxx4ldbl libgnutls-dane0t64 libgnutls-openssl27t64 libgnutls28-dev 301s libgomp1 libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 301s libgraphite2-3 libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 301s libhdf5-cpp-310 libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 301s libhdf5-hl-cpp-310 libhdf5-hl-fortran-310 libheif-plugin-aomdec 301s libheif-plugin-libde265 libheif1 libhtml-form-perl 301s libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl 301s libhtml-tokeparser-simple-perl libhtml-tree-perl libhttp-cookies-perl 301s libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhwasan0 301s libhwy1t64 libice6 libidn2-dev libimagequant0 libimport-into-perl 301s libindirect-perl libinput-bin libinput10 libio-html-perl 301s libio-interactive-perl libio-socket-ssl-perl libio-string-perl 301s libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 301s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 301s libitm1 libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 301s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl 301s libjxl0.11 libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev 301s liblapack-dev liblapack3 liblcms2-2 libldap-dev liblerc4 301s liblist-compare-perl liblist-moreutils-perl liblist-moreutils-xs-perl 301s liblist-someutils-perl liblist-utilsby-perl liblog-any-adapter-screen-perl 301s liblog-any-perl liblog-log4perl-perl liblsan0 libltdl7 liblua5.4-0 301s liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl 301s libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 301s libmodule-implementation-perl libmodule-pluggable-perl 301s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 301s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 301s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 301s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 301s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 301s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 301s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 301s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 301s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 301s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 301s libpath-iterator-rule-perl libpath-tiny-perl libpciaccess0 libpcre2-16-0 301s libperlio-gzip-perl libperlio-utf8-strict-perl libpixman-1-0 libpkgconf3 301s libpod-constants-perl libpod-parser-perl libpod-pom-perl libportaudio2 301s libproc-processtable-perl libproxy1v5 libpsl-dev libqhull-r8.0 libqrupdate1 301s libqscintilla2-qt6-15 libqscintilla2-qt6-l10n libqt6core5compat6 301s libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 libqt6network6 301s libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 libqt6sql6 301s libqt6widgets6 libqt6xml6 libquadmath0 libraqm0 libreadline-dev 301s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 301s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsamplerate0 301s libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl 301s libsharpyuv0 libsm6 libsndfile1 libsoftware-copyright-perl 301s libsoftware-license-perl libsoftware-licensemoreutils-perl 301s libsort-versions-perl libspqr4 libssh2-1-dev libssl-dev libstdc++-14-dev 301s libstemmer0d libstrictures-perl libstring-copyright-perl 301s libstring-escape-perl libstring-license-perl libstring-rewriteprefix-perl 301s libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl 301s libsub-install-perl libsub-name-perl libsub-quote-perl libsub-uplevel-perl 301s libsuitesparseconfig7 libsyntax-keyword-try-perl libsz2 libtasn1-6-dev 301s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 301s libtext-glob-perl libtext-levenshtein-damerau-perl 301s libtext-levenshteinxs-perl libtext-markdown-discount-perl 301s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 301s libtext-xslate-perl libthai-data libthai0 libtiff6 libtime-duration-perl 301s libtime-moment-perl libtimedate-perl libtoml-tiny-perl libtool 301s libtry-tiny-perl libts0t64 libtsan2 libubsan1 libumfpack6 libunbound8 301s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 301s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 301s libwayland-server0 libwebp7 libwebpmux3 libwmflite-0.2-7 301s libwww-mechanize-perl libwww-perl libwww-robotrules-perl libx11-dev 301s libx11-xcb1 libxau-dev libxaw7 libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 301s libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 301s libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 301s libxcb-util1 libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev 301s libxcursor1 libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 301s libxkbcommon-x11-0 libxkbfile1 libxml-libxml-perl 301s libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxmu6 301s libxpm4 libxrandr2 libxrender1 libxs-parse-keyword-perl 301s libxs-parse-sublike-perl libxshmfence1 libxt6t64 libxxf86vm1 301s libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl libzstd-dev 301s licensecheck lintian lzip lzop m4 mesa-libgallium nettle-dev octave 301s octave-common octave-dev octave-io octave-statistics 301s octave-statistics-common patchutils perl-openssl-defaults pkgconf 301s pkgconf-bin po-debconf t1utils tex-common texinfo texinfo-lib unzip 301s x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools xserver-common 301s xtrans-dev xvfb zlib1g-dev 301s 0 upgraded, 477 newly installed, 0 to remove and 0 not upgraded. 301s Need to get 207 MB of archives. 301s After this operation, 731 MB of additional disk space will be used. 301s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 libstemmer0d amd64 2.2.0-4build1 [161 kB] 302s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libappstream5 amd64 1.0.4-1 [247 kB] 302s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 appstream amd64 1.0.4-1 [74.8 kB] 302s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 m4 amd64 1.4.19-7 [263 kB] 302s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 autoconf all 2.72-3ubuntu1 [383 kB] 302s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 autotools-dev all 20220109.1 [44.9 kB] 302s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 automake all 1:1.17-3ubuntu1 [572 kB] 302s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 autopoint all 0.23.1-1 [619 kB] 303s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libcapture-tiny-perl all 0.50-1 [20.7 kB] 303s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-util-perl amd64 1.102-3build1 [21.4 kB] 303s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-install-perl all 0.929-1 [9764 B] 303s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-optlist-perl all 0.114-1 [9708 B] 303s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-op-check-perl amd64 0.22-3build2 [9624 B] 303s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 303s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-callchecker-perl amd64 0.009-1build1 [14.2 kB] 303s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-classify-perl amd64 0.015-2build6 [20.1 kB] 303s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 303s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 libtry-tiny-perl all 0.32-1 [21.2 kB] 303s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-implementation-perl all 0.09-2 [12.0 kB] 303s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libpackage-stash-perl all 0.40-1 [19.5 kB] 303s Get:21 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclass-load-perl all 0.25-2 [12.7 kB] 303s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-stringy-perl all 2.113-2 [45.3 kB] 303s Get:23 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparams-validate-perl amd64 1.31-2build4 [53.7 kB] 303s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-exporter-perl all 0.990-1 [49.0 kB] 303s Get:25 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 303s Get:26 http://ftpmaster.internal/ubuntu plucky/universe amd64 libio-tiecombine-perl all 1.005-3 [9464 B] 303s Get:27 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmodule-pluggable-perl all 5.2-5 [19.5 kB] 303s Get:28 http://ftpmaster.internal/ubuntu plucky/universe amd64 libstring-rewriteprefix-perl all 0.009-1 [6310 B] 303s Get:29 http://ftpmaster.internal/ubuntu plucky/universe amd64 libapp-cmd-perl all 0.337-2 [58.3 kB] 303s Get:30 http://ftpmaster.internal/ubuntu plucky/universe amd64 libboolean-perl all 0.46-3 [8430 B] 303s Get:31 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsub-uplevel-perl all 0.2800-3 [11.6 kB] 303s Get:32 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtest-exception-perl all 0.43-3 [13.4 kB] 303s Get:33 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcarp-assert-more-perl all 2.8.0-1 [19.2 kB] 303s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-which-perl all 1.27-2 [12.5 kB] 303s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-homedir-perl all 1.006-2 [37.0 kB] 303s Get:36 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclone-choose-perl all 0.010-2 [7738 B] 303s Get:37 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhash-merge-perl all 0.302-1 [13.0 kB] 303s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libjson-perl all 4.10000-1 [81.9 kB] 303s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libexporter-tiny-perl all 1.006002-1 [36.8 kB] 303s Get:40 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblist-moreutils-xs-perl amd64 0.430-4build1 [42.9 kB] 303s Get:41 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblist-moreutils-perl all 0.430-2 [38.2 kB] 303s Get:42 http://ftpmaster.internal/ubuntu plucky/universe amd64 liblog-log4perl-perl all 1.57-1 [345 kB] 303s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libmouse-perl amd64 2.5.11-1build1 [134 kB] 304s Get:44 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 304s Get:45 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmousex-strictconstructor-perl all 0.02-3 [4582 B] 304s Get:46 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 304s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libpath-tiny-perl all 0.146-1 [47.5 kB] 304s Get:48 http://ftpmaster.internal/ubuntu plucky/universe amd64 libpod-pom-perl all 2.01-4 [61.3 kB] 304s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-common-perl all 2024080801-1 [162 kB] 304s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libyaml-tiny-perl all 1.76-1 [24.2 kB] 304s Get:51 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-perl all 2.155-1 [356 kB] 304s Get:52 http://ftpmaster.internal/ubuntu plucky/universe amd64 libyaml-pp-perl all 0.39.0-1 [107 kB] 304s Get:53 http://ftpmaster.internal/ubuntu plucky/universe amd64 cme all 1.041-1 [65.4 kB] 304s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 libisl23 amd64 0.27-1 [685 kB] 304s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpc3 amd64 1.3.1-1build2 [55.3 kB] 304s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [11.9 MB] 310s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14 amd64 14.2.0-17ubuntu3 [1030 B] 310s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [5586 B] 310s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp amd64 4:14.2.0-1ubuntu1 [22.4 kB] 310s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 310s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 libcc1-0 amd64 15-20250222-0ubuntu1 [47.0 kB] 310s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 libgomp1 amd64 15-20250222-0ubuntu1 [148 kB] 311s Get:63 http://ftpmaster.internal/ubuntu plucky/main amd64 libitm1 amd64 15-20250222-0ubuntu1 [28.6 kB] 311s Get:64 http://ftpmaster.internal/ubuntu plucky/main amd64 libasan8 amd64 15-20250222-0ubuntu1 [3055 kB] 312s Get:65 http://ftpmaster.internal/ubuntu plucky/main amd64 liblsan0 amd64 15-20250222-0ubuntu1 [1355 kB] 313s Get:66 http://ftpmaster.internal/ubuntu plucky/main amd64 libtsan2 amd64 15-20250222-0ubuntu1 [2756 kB] 314s Get:67 http://ftpmaster.internal/ubuntu plucky/main amd64 libubsan1 amd64 15-20250222-0ubuntu1 [1205 kB] 315s Get:68 http://ftpmaster.internal/ubuntu plucky/main amd64 libhwasan0 amd64 15-20250222-0ubuntu1 [1677 kB] 315s Get:69 http://ftpmaster.internal/ubuntu plucky/main amd64 libquadmath0 amd64 15-20250222-0ubuntu1 [152 kB] 316s Get:70 http://ftpmaster.internal/ubuntu plucky/main amd64 libgcc-14-dev amd64 14.2.0-17ubuntu3 [2816 kB] 317s Get:71 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [23.3 MB] 327s Get:72 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14 amd64 14.2.0-17ubuntu3 [536 kB] 328s Get:73 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1208 B] 328s Get:74 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc amd64 4:14.2.0-1ubuntu1 [5004 B] 328s Get:75 http://ftpmaster.internal/ubuntu plucky/main amd64 libtool all 2.5.4-4 [168 kB] 328s Get:76 http://ftpmaster.internal/ubuntu plucky/main amd64 dh-autoreconf all 20 [16.1 kB] 328s Get:77 http://ftpmaster.internal/ubuntu plucky/main amd64 libarchive-zip-perl all 1.68-1 [90.2 kB] 328s Get:78 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 328s Get:79 http://ftpmaster.internal/ubuntu plucky/main amd64 dh-strip-nondeterminism all 1.14.1-2 [5064 B] 328s Get:80 http://ftpmaster.internal/ubuntu plucky/main amd64 debugedit amd64 1:5.1-2 [47.0 kB] 328s Get:81 http://ftpmaster.internal/ubuntu plucky/main amd64 dwz amd64 0.15-1build6 [115 kB] 328s Get:82 http://ftpmaster.internal/ubuntu plucky/main amd64 gettext amd64 0.23.1-1 [1086 kB] 328s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 intltool-debian all 0.35.0+20060710.6 [23.2 kB] 328s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 po-debconf all 1.0.21+nmu1 [233 kB] 329s Get:85 http://ftpmaster.internal/ubuntu plucky/main amd64 debhelper all 13.24.1ubuntu2 [895 kB] 329s Get:86 http://ftpmaster.internal/ubuntu plucky/universe amd64 aglfn all 1.7+git20191031.4036a9c-2 [30.6 kB] 329s Get:87 http://ftpmaster.internal/ubuntu plucky/universe amd64 gnuplot-data all 6.0.2+dfsg1-1 [75.4 kB] 329s Get:88 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 329s Get:89 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 330s Get:90 http://ftpmaster.internal/ubuntu plucky/universe amd64 fonts-freefont-otf all 20211204+svn4273-2 [4596 kB] 332s Get:91 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig-config amd64 2.15.0-2ubuntu1 [37.4 kB] 332s Get:92 http://ftpmaster.internal/ubuntu plucky/main amd64 libfontconfig1 amd64 2.15.0-2ubuntu1 [164 kB] 332s Get:93 http://ftpmaster.internal/ubuntu plucky/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 332s Get:94 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-render0 amd64 1.17.0-2 [16.2 kB] 332s Get:95 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-shm0 amd64 1.17.0-2 [5758 B] 332s Get:96 http://ftpmaster.internal/ubuntu plucky/main amd64 libxrender1 amd64 1:0.9.10-1.1build1 [19.0 kB] 332s Get:97 http://ftpmaster.internal/ubuntu plucky/main amd64 libcairo2 amd64 1.18.2-2 [569 kB] 332s Get:98 http://ftpmaster.internal/ubuntu plucky/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 332s Get:99 http://ftpmaster.internal/ubuntu plucky/main amd64 libaom3 amd64 3.12.0-1 [2742 kB] 333s Get:100 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif-plugin-aomdec amd64 1.19.7-1 [11.6 kB] 333s Get:101 http://ftpmaster.internal/ubuntu plucky/main amd64 libde265-0 amd64 1.0.15-1build5 [285 kB] 334s Get:102 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif-plugin-libde265 amd64 1.19.7-1 [9060 B] 334s Get:103 http://ftpmaster.internal/ubuntu plucky/main amd64 libheif1 amd64 1.19.7-1 [428 kB] 336s Get:104 http://ftpmaster.internal/ubuntu plucky/main amd64 libimagequant0 amd64 2.18.0-1build1 [36.3 kB] 336s Get:105 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 336s Get:106 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 336s Get:107 http://ftpmaster.internal/ubuntu plucky/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 336s Get:108 http://ftpmaster.internal/ubuntu plucky/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 337s Get:109 http://ftpmaster.internal/ubuntu plucky/main amd64 libraqm0 amd64 0.10.2-1 [17.2 kB] 337s Get:110 http://ftpmaster.internal/ubuntu plucky/main amd64 libdeflate0 amd64 1.23-1 [64.1 kB] 337s Get:111 http://ftpmaster.internal/ubuntu plucky/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 337s Get:112 http://ftpmaster.internal/ubuntu plucky/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 337s Get:113 http://ftpmaster.internal/ubuntu plucky/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 337s Get:114 http://ftpmaster.internal/ubuntu plucky/main amd64 libtiff6 amd64 4.5.1+git230720-4ubuntu4 [200 kB] 338s Get:115 http://ftpmaster.internal/ubuntu plucky/main amd64 libxpm4 amd64 1:3.5.17-1build2 [36.5 kB] 338s Get:116 http://ftpmaster.internal/ubuntu plucky/main amd64 libgd3 amd64 2.3.3-12ubuntu3 [127 kB] 338s Get:117 http://ftpmaster.internal/ubuntu plucky/main amd64 liblua5.4-0 amd64 5.4.7-1 [196 kB] 338s Get:118 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig amd64 2.15.0-2ubuntu1 [180 kB] 338s Get:119 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai-data all 0.1.29-2build1 [158 kB] 338s Get:120 http://ftpmaster.internal/ubuntu plucky/main amd64 libdatrie1 amd64 0.2.13-3build1 [19.0 kB] 338s Get:121 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai0 amd64 0.1.29-2build1 [18.9 kB] 338s Get:122 http://ftpmaster.internal/ubuntu plucky/main amd64 libpango-1.0-0 amd64 1.56.1-1 [255 kB] 338s Get:123 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangoft2-1.0-0 amd64 1.56.1-1 [52.6 kB] 338s Get:124 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangocairo-1.0-0 amd64 1.56.1-1 [29.1 kB] 338s Get:125 http://ftpmaster.internal/ubuntu plucky/main amd64 libwebpmux3 amd64 1.5.0-0.1 [27.6 kB] 338s Get:126 http://ftpmaster.internal/ubuntu plucky/universe amd64 gnuplot-nox amd64 6.0.2+dfsg1-1 [1170 kB] 339s Get:127 http://ftpmaster.internal/ubuntu plucky/universe amd64 dh-octave-autopkgtest all 1.8.0 [10.1 kB] 339s Get:128 http://ftpmaster.internal/ubuntu plucky/main amd64 libapt-pkg-perl amd64 0.1.41build1 [71.0 kB] 339s Get:129 http://ftpmaster.internal/ubuntu plucky/main amd64 libarray-intspan-perl all 2.004-2 [25.0 kB] 339s Get:130 http://ftpmaster.internal/ubuntu plucky/main amd64 libyaml-libyaml-perl amd64 0.903.0+ds-1 [31.0 kB] 339s Get:131 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 339s Get:132 http://ftpmaster.internal/ubuntu plucky/universe amd64 libexporter-lite-perl all 0.09-2 [9748 B] 339s Get:133 http://ftpmaster.internal/ubuntu plucky/main amd64 libencode-locale-perl all 1.05-3 [11.6 kB] 339s Get:134 http://ftpmaster.internal/ubuntu plucky/main amd64 libtimedate-perl all 2.3300-2 [34.0 kB] 339s Get:135 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-date-perl all 6.06-1 [10.2 kB] 339s Get:136 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-listing-perl all 6.16-1 [11.3 kB] 339s Get:137 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 339s Get:138 http://ftpmaster.internal/ubuntu plucky/main amd64 liburi-perl all 5.30-1 [94.4 kB] 339s Get:139 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-parser-perl amd64 3.83-1build1 [86.2 kB] 339s Get:140 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tree-perl all 5.07-3 [200 kB] 339s Get:141 http://ftpmaster.internal/ubuntu plucky/main amd64 libclone-perl amd64 0.47-1 [10.7 kB] 339s Get:142 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-html-perl all 1.004-3 [15.9 kB] 339s Get:143 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 340s Get:144 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 340s Get:145 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 340s Get:146 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 340s Get:147 http://ftpmaster.internal/ubuntu plucky/main amd64 perl-openssl-defaults amd64 7build3 [6626 B] 340s Get:148 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ssleay-perl amd64 1.94-3 [318 kB] 340s Get:149 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-socket-ssl-perl all 2.089-1 [200 kB] 340s Get:150 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-http-perl all 6.23-1 [22.3 kB] 340s Get:151 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 340s Get:152 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 340s Get:153 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-perl all 6.78-1 [139 kB] 340s Get:154 http://ftpmaster.internal/ubuntu plucky/main amd64 liberror-perl all 0.17030-1 [23.5 kB] 340s Get:155 http://ftpmaster.internal/ubuntu plucky/universe amd64 libparse-debcontrol-perl all 2.005-6 [20.4 kB] 340s Get:156 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-copyright-perl all 0.014-1 [14.5 kB] 340s Get:157 http://ftpmaster.internal/ubuntu plucky/universe amd64 libalgorithm-c3-perl all 0.11-2 [10.2 kB] 340s Get:158 http://ftpmaster.internal/ubuntu plucky/universe amd64 libclass-c3-perl all 0.35-2 [18.4 kB] 340s Get:159 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmro-compat-perl all 0.15-2 [10.1 kB] 340s Get:160 http://ftpmaster.internal/ubuntu plucky/universe amd64 libdata-section-perl all 0.200008-1 [11.6 kB] 340s Get:161 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-template-perl all 1.61-1 [48.5 kB] 340s Get:162 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-license-perl all 0.104006-1 [117 kB] 340s Get:163 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 340s Get:164 http://ftpmaster.internal/ubuntu plucky/main amd64 libsort-versions-perl all 1.62-3 [7378 B] 340s Get:165 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-reform-perl all 1.20-5 [35.4 kB] 340s Get:166 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-autoformat-perl all 1.750000-2 [29.8 kB] 340s Get:167 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 340s Get:168 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtoml-tiny-perl all 0.19-1 [21.6 kB] 340s Get:169 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-inspector-perl all 1.36-3 [15.4 kB] 340s Get:170 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-sharedir-perl all 1.118-3 [14.0 kB] 340s Get:171 http://ftpmaster.internal/ubuntu plucky/main amd64 libindirect-perl amd64 0.39-2build5 [22.2 kB] 340s Get:172 http://ftpmaster.internal/ubuntu plucky/main amd64 libxs-parse-keyword-perl amd64 0.48-2 [63.0 kB] 340s Get:173 http://ftpmaster.internal/ubuntu plucky/main amd64 libxs-parse-sublike-perl amd64 0.37-1 [45.6 kB] 340s Get:174 http://ftpmaster.internal/ubuntu plucky/main amd64 libobject-pad-perl amd64 0.820-1 [133 kB] 340s Get:175 http://ftpmaster.internal/ubuntu plucky/main amd64 libsyntax-keyword-try-perl amd64 0.30-1 [24.4 kB] 340s Get:176 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-interactive-perl all 1.026-1 [10.8 kB] 340s Get:177 http://ftpmaster.internal/ubuntu plucky/main amd64 liblog-any-perl all 1.717-1 [73.2 kB] 340s Get:178 http://ftpmaster.internal/ubuntu plucky/main amd64 liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 340s Get:179 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 340s Get:180 http://ftpmaster.internal/ubuntu plucky/main amd64 libvariable-magic-perl amd64 0.64-1build1 [36.3 kB] 340s Get:181 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-endofscope-perl all 0.28-1 [15.8 kB] 340s Get:182 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-identify-perl amd64 0.14-3build4 [9904 B] 340s Get:183 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-name-perl amd64 0.28-1 [10.7 kB] 340s Get:184 http://ftpmaster.internal/ubuntu plucky/main amd64 libnamespace-clean-perl all 0.27-2 [14.0 kB] 340s Get:185 http://ftpmaster.internal/ubuntu plucky/main amd64 libnumber-compare-perl all 0.03-3 [5974 B] 340s Get:186 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-glob-perl all 0.11-3 [6780 B] 340s Get:187 http://ftpmaster.internal/ubuntu plucky/main amd64 libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 340s Get:188 http://ftpmaster.internal/ubuntu plucky/main amd64 libpod-parser-perl all 1.67-1 [80.6 kB] 340s Get:189 http://ftpmaster.internal/ubuntu plucky/main amd64 libpod-constants-perl all 0.19-2 [16.3 kB] 340s Get:190 http://ftpmaster.internal/ubuntu plucky/main amd64 libset-intspan-perl all 1.19-3 [24.8 kB] 340s Get:191 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-copyright-perl all 0.003014-1 [20.5 kB] 341s Get:192 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-escape-perl all 2010.002-3 [16.1 kB] 341s Get:193 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 341s Get:194 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 341s Get:195 http://ftpmaster.internal/ubuntu plucky/main amd64 libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 341s Get:196 http://ftpmaster.internal/ubuntu plucky/main amd64 licensecheck all 3.3.9-1ubuntu1 [37.7 kB] 341s Get:197 http://ftpmaster.internal/ubuntu plucky/main amd64 diffstat amd64 1.67-1 [33.1 kB] 341s Get:198 http://ftpmaster.internal/ubuntu plucky/main amd64 libberkeleydb-perl amd64 0.66-1 [119 kB] 341s Get:199 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-xsaccessor-perl amd64 1.19-4build6 [33.8 kB] 341s Get:200 http://ftpmaster.internal/ubuntu plucky/main amd64 libconfig-tiny-perl all 2.30-1 [14.7 kB] 341s Get:201 http://ftpmaster.internal/ubuntu plucky/main amd64 libconst-fast-perl all 0.014-2 [8034 B] 341s Get:202 http://ftpmaster.internal/ubuntu plucky/main amd64 libcpanel-json-xs-perl amd64 4.39-1 [116 kB] 341s Get:203 http://ftpmaster.internal/ubuntu plucky/main amd64 libaliased-perl all 0.34-3 [12.8 kB] 341s Get:204 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-data-inheritable-perl all 0.10-1 [8038 B] 341s Get:205 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 341s Get:206 http://ftpmaster.internal/ubuntu plucky/main amd64 libexception-class-perl all 1.45-1 [28.6 kB] 341s Get:207 http://ftpmaster.internal/ubuntu plucky/main amd64 libiterator-perl all 0.03+ds1-2 [18.8 kB] 341s Get:208 http://ftpmaster.internal/ubuntu plucky/main amd64 libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 341s Get:209 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-dpath-perl all 0.60-1 [37.3 kB] 341s Get:210 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-domain-tld-perl all 1.75-4 [29.0 kB] 341s Get:211 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-domain-perl all 0.15-1 [10.4 kB] 341s Get:212 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 341s Get:213 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-netmask-perl all 2.0002-2 [24.8 kB] 341s Get:214 http://ftpmaster.internal/ubuntu plucky/main amd64 libnetaddr-ip-perl amd64 4.079+dfsg-2build5 [80.0 kB] 341s Get:215 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-ip-perl all 0.31-1 [17.2 kB] 341s Get:216 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-validate-uri-perl all 0.07-3 [10.8 kB] 341s Get:217 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-size-perl amd64 0.84-1build1 [19.6 kB] 341s Get:218 http://ftpmaster.internal/ubuntu plucky/main amd64 libemail-address-xs-perl amd64 1.05-1build5 [29.5 kB] 341s Get:219 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-system-simple-perl all 1.30-2 [22.3 kB] 341s Get:220 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-basedir-perl all 0.09-2 [14.4 kB] 341s Get:221 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-find-rule-perl all 0.34-3 [24.4 kB] 341s Get:222 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-string-perl all 1.08-4 [11.1 kB] 341s Get:223 http://ftpmaster.internal/ubuntu plucky/main amd64 libfont-ttf-perl all 1.06-2 [323 kB] 342s Get:224 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 342s Get:225 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 342s Get:226 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-run3-perl all 0.049-1 [28.8 kB] 342s Get:227 http://ftpmaster.internal/ubuntu plucky/main amd64 libjson-maybexs-perl all 1.004008-1 [11.1 kB] 342s Get:228 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-compare-perl all 0.55-2 [62.9 kB] 342s Get:229 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-someutils-perl all 0.59-1 [30.4 kB] 342s Get:230 http://ftpmaster.internal/ubuntu plucky/main amd64 liblist-utilsby-perl all 0.12-2 [14.9 kB] 342s Get:231 http://ftpmaster.internal/ubuntu plucky/main amd64 libmldbm-perl all 2.05-4 [16.0 kB] 342s Get:232 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 342s Get:233 http://ftpmaster.internal/ubuntu plucky/main amd64 libimport-into-perl all 1.002005-2 [10.7 kB] 342s Get:234 http://ftpmaster.internal/ubuntu plucky/main amd64 librole-tiny-perl all 2.002004-1 [16.3 kB] 342s Get:235 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 342s Get:236 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoo-perl all 2.005005-1 [47.4 kB] 342s Get:237 http://ftpmaster.internal/ubuntu plucky/main amd64 libstrictures-perl all 2.000006-1 [16.3 kB] 342s Get:238 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoox-aliases-perl all 0.001006-2 [6796 B] 342s Get:239 http://ftpmaster.internal/ubuntu plucky/main amd64 libperlio-gzip-perl amd64 0.20-1build5 [14.8 kB] 342s Get:240 http://ftpmaster.internal/ubuntu plucky/main amd64 libperlio-utf8-strict-perl amd64 0.010-1build4 [11.1 kB] 342s Get:241 http://ftpmaster.internal/ubuntu plucky/main amd64 libproc-processtable-perl amd64 0.636-1build4 [35.9 kB] 342s Get:242 http://ftpmaster.internal/ubuntu plucky/main amd64 libregexp-wildcards-perl all 1.05-3 [12.9 kB] 342s Get:243 http://ftpmaster.internal/ubuntu plucky/main amd64 libsereal-decoder-perl amd64 5.004+ds-1build4 [101 kB] 342s Get:244 http://ftpmaster.internal/ubuntu plucky/main amd64 libsereal-encoder-perl amd64 5.004+ds-1build4 [105 kB] 342s Get:245 http://ftpmaster.internal/ubuntu plucky/main amd64 libterm-readkey-perl amd64 2.38-2build5 [23.2 kB] 342s Get:246 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-levenshteinxs-perl amd64 0.03-5build5 [8116 B] 342s Get:247 http://ftpmaster.internal/ubuntu plucky/main amd64 libmarkdown2 amd64 2.2.7-2.1 [42.3 kB] 342s Get:248 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-markdown-discount-perl amd64 0.18-1 [12.4 kB] 342s Get:249 http://ftpmaster.internal/ubuntu plucky/main amd64 libdata-messagepack-perl amd64 1.02-1build5 [31.6 kB] 342s Get:250 http://ftpmaster.internal/ubuntu plucky/main amd64 libtext-xslate-perl amd64 3.5.9-2build1 [161 kB] 342s Get:251 http://ftpmaster.internal/ubuntu plucky/main amd64 libtime-duration-perl all 1.21-2 [12.3 kB] 342s Get:252 http://ftpmaster.internal/ubuntu plucky/main amd64 libtime-moment-perl amd64 0.44-2build5 [71.6 kB] 342s Get:253 http://ftpmaster.internal/ubuntu plucky/main amd64 libunicode-utf8-perl amd64 0.62-2build4 [18.3 kB] 342s Get:254 http://ftpmaster.internal/ubuntu plucky/main amd64 libcgi-pm-perl all 4.67-1 [185 kB] 342s Get:255 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-form-perl all 6.12-1 [31.1 kB] 342s Get:256 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-mechanize-perl all 2.19-1ubuntu1 [93.3 kB] 342s Get:257 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 342s Get:258 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-sax-base-perl all 1.09-3 [18.9 kB] 342s Get:259 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 342s Get:260 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml-libxml-perl amd64 2.0207+dfsg+really+2.0134-5build1 [305 kB] 343s Get:261 http://ftpmaster.internal/ubuntu plucky/main amd64 lzip amd64 1.25-2 [87.1 kB] 343s Get:262 http://ftpmaster.internal/ubuntu plucky/main amd64 lzop amd64 1.04-2build3 [82.2 kB] 343s Get:263 http://ftpmaster.internal/ubuntu plucky/main amd64 patchutils amd64 0.4.2-1build3 [77.0 kB] 343s Get:264 http://ftpmaster.internal/ubuntu plucky/main amd64 t1utils amd64 1.41-4build3 [61.3 kB] 343s Get:265 http://ftpmaster.internal/ubuntu plucky/main amd64 unzip amd64 6.0-28ubuntu6 [181 kB] 343s Get:266 http://ftpmaster.internal/ubuntu plucky/main amd64 lintian all 2.121.1+nmu1ubuntu2 [1075 kB] 344s Get:267 http://ftpmaster.internal/ubuntu plucky/universe amd64 libconfig-model-dpkg-perl all 3.010 [176 kB] 344s Get:268 http://ftpmaster.internal/ubuntu plucky/main amd64 libconvert-binhex-perl all 1.125-3 [27.1 kB] 344s Get:269 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-smtp-ssl-perl all 1.04-2 [6218 B] 344s Get:270 http://ftpmaster.internal/ubuntu plucky/main amd64 libmailtools-perl all 2.22-1 [77.1 kB] 344s Get:271 http://ftpmaster.internal/ubuntu plucky/main amd64 libmime-tools-perl all 5.515-1 [187 kB] 344s Get:272 http://ftpmaster.internal/ubuntu plucky/main amd64 libsuitesparseconfig7 amd64 1:7.8.3+dfsg-3 [13.5 kB] 344s Get:273 http://ftpmaster.internal/ubuntu plucky/universe amd64 libamd3 amd64 1:7.8.3+dfsg-3 [31.0 kB] 344s Get:274 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas3 amd64 3.12.1-2 [359 kB] 344s Get:275 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran5 amd64 15-20250222-0ubuntu1 [919 kB] 345s Get:276 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack3 amd64 3.12.1-2 [3179 kB] 347s Get:277 http://ftpmaster.internal/ubuntu plucky/universe amd64 libarpack2t64 amd64 3.9.1-4 [120 kB] 347s Get:278 http://ftpmaster.internal/ubuntu plucky/universe amd64 libccolamd3 amd64 1:7.8.3+dfsg-3 [27.5 kB] 347s Get:279 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcamd3 amd64 1:7.8.3+dfsg-3 [27.6 kB] 347s Get:280 http://ftpmaster.internal/ubuntu plucky/main amd64 libcolamd3 amd64 1:7.8.3+dfsg-3 [19.5 kB] 347s Get:281 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcholmod5 amd64 1:7.8.3+dfsg-3 [876 kB] 348s Get:282 http://ftpmaster.internal/ubuntu plucky/universe amd64 libcxsparse4 amd64 1:7.8.3+dfsg-3 [83.2 kB] 348s Get:283 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-double3 amd64 3.3.10-2fakesync1build1 [839 kB] 349s Get:284 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-single3 amd64 3.3.10-2fakesync1build1 [871 kB] 349s Get:285 http://ftpmaster.internal/ubuntu plucky/main amd64 libxfixes3 amd64 1:6.0.0-2build1 [10.8 kB] 349s Get:286 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcursor1 amd64 1:1.2.3-1 [23.1 kB] 349s Get:287 http://ftpmaster.internal/ubuntu plucky/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 349s Get:288 http://ftpmaster.internal/ubuntu plucky/main amd64 libxinerama1 amd64 2:1.1.4-3build1 [6396 B] 349s Get:289 http://ftpmaster.internal/ubuntu plucky/universe amd64 libfltk1.3t64 amd64 1.3.8-6.1build2 [606 kB] 349s Get:290 http://ftpmaster.internal/ubuntu plucky/main amd64 libglvnd0 amd64 1.7.0-1build1 [69.6 kB] 349s Get:291 http://ftpmaster.internal/ubuntu plucky/main amd64 libx11-xcb1 amd64 2:1.8.10-2 [7944 B] 349s Get:292 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-dri3-0 amd64 1.17.0-2 [7508 B] 349s Get:293 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-glx0 amd64 1.17.0-2 [24.8 kB] 350s Get:294 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-present0 amd64 1.17.0-2 [6064 B] 350s Get:295 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xfixes0 amd64 1.17.0-2 [10.2 kB] 350s Get:296 http://ftpmaster.internal/ubuntu plucky/main amd64 libxxf86vm1 amd64 1:1.1.4-1build4 [9282 B] 350s Get:297 http://ftpmaster.internal/ubuntu plucky/main amd64 libpciaccess0 amd64 0.17-3build1 [18.6 kB] 350s Get:298 http://ftpmaster.internal/ubuntu plucky/main amd64 libdrm-intel1 amd64 2.4.123-1 [68.8 kB] 350s Get:299 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-randr0 amd64 1.17.0-2 [17.9 kB] 350s Get:300 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-sync1 amd64 1.17.0-2 [9312 B] 350s Get:301 http://ftpmaster.internal/ubuntu plucky/main amd64 libxshmfence1 amd64 1.3-1build5 [4764 B] 350s Get:302 http://ftpmaster.internal/ubuntu plucky/main amd64 mesa-libgallium amd64 25.0.1-2ubuntu1 [12.1 MB] 362s Get:303 http://ftpmaster.internal/ubuntu plucky/main amd64 libwayland-server0 amd64 1.23.1-3 [37.2 kB] 362s Get:304 http://ftpmaster.internal/ubuntu plucky/main amd64 libgbm1 amd64 25.0.1-2ubuntu1 [33.4 kB] 363s Get:305 http://ftpmaster.internal/ubuntu plucky/main amd64 libvulkan1 amd64 1.4.304.0-1 [147 kB] 363s Get:306 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl1-mesa-dri amd64 25.0.1-2ubuntu1 [35.7 kB] 363s Get:307 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx-mesa0 amd64 25.0.1-2ubuntu1 [146 kB] 363s Get:308 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx0 amd64 1.7.0-1build1 [38.6 kB] 363s Get:309 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl1 amd64 1.7.0-1build1 [102 kB] 363s Get:310 http://ftpmaster.internal/ubuntu plucky/universe amd64 libfltk-gl1.3t64 amd64 1.3.8-6.1build2 [43.0 kB] 363s Get:311 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgl2ps1.4 amd64 1.4.2+dfsg1-2build1 [41.9 kB] 363s Get:312 http://ftpmaster.internal/ubuntu plucky/main amd64 libltdl7 amd64 2.5.4-4 [46.5 kB] 363s Get:313 http://ftpmaster.internal/ubuntu plucky/universe amd64 libglpk40 amd64 5.0-1build2 [369 kB] 363s Get:314 http://ftpmaster.internal/ubuntu plucky/main amd64 libopengl0 amd64 1.7.0-1build1 [32.8 kB] 363s Get:315 http://ftpmaster.internal/ubuntu plucky/main amd64 libglu1-mesa amd64 9.0.2-1.1build1 [152 kB] 363s Get:316 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhwy1t64 amd64 1.2.0-3ubuntu3 [734 kB] 364s Get:317 http://ftpmaster.internal/ubuntu plucky/main amd64 liblcms2-2 amd64 2.16-2 [212 kB] 364s Get:318 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjxl0.11 amd64 0.11.1-1 [1363 kB] 365s Get:319 http://ftpmaster.internal/ubuntu plucky/main amd64 libwmflite-0.2-7 amd64 0.2.13-1.1build3 [68.6 kB] 365s Get:320 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgraphicsmagick-q16-3t64 amd64 1.4+really1.3.45+hg17689-1 [1584 kB] 366s Get:321 http://ftpmaster.internal/ubuntu plucky/universe amd64 libgraphicsmagick++-q16-12t64 amd64 1.4+really1.3.45+hg17689-1 [116 kB] 366s Get:322 http://ftpmaster.internal/ubuntu plucky/universe amd64 libaec0 amd64 1.1.3-1 [22.7 kB] 366s Get:323 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsz2 amd64 1.1.3-1 [5456 B] 366s Get:324 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-310 amd64 1.14.5+repack-3 [1519 kB] 366s Get:325 http://ftpmaster.internal/ubuntu plucky/main amd64 libasound2-data all 1.2.13-1build1 [21.1 kB] 366s Get:326 http://ftpmaster.internal/ubuntu plucky/main amd64 libasound2t64 amd64 1.2.13-1build1 [437 kB] 367s Get:327 http://ftpmaster.internal/ubuntu plucky/main amd64 libopus0 amd64 1.5.2-2 [2913 kB] 368s Get:328 http://ftpmaster.internal/ubuntu plucky/main amd64 libsamplerate0 amd64 0.2.2-4build1 [1344 kB] 369s Get:329 http://ftpmaster.internal/ubuntu plucky/main amd64 libjack-jackd2-0 amd64 1.9.22~dfsg-4 [312 kB] 369s Get:330 http://ftpmaster.internal/ubuntu plucky/universe amd64 libportaudio2 amd64 19.6.0-1.2build3 [67.9 kB] 369s Get:331 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqhull-r8.0 amd64 2020.2-6build1 [193 kB] 369s Get:332 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqrupdate1 amd64 1.1.5-1 [50.7 kB] 369s Get:333 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqscintilla2-qt6-l10n all 2.14.1+dfsg-1build4 [56.4 kB] 369s Get:334 http://ftpmaster.internal/ubuntu plucky/universe amd64 libb2-1 amd64 0.98.1-1.1build1 [45.0 kB] 369s Get:335 http://ftpmaster.internal/ubuntu plucky/universe amd64 libdouble-conversion3 amd64 3.3.1-1 [41.7 kB] 369s Get:336 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-16-0 amd64 10.45-1 [268 kB] 369s Get:337 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6core6t64 amd64 6.8.2+dfsg-5 [2136 kB] 370s Get:338 http://ftpmaster.internal/ubuntu plucky/main amd64 libwayland-client0 amd64 1.23.1-3 [29.7 kB] 370s Get:339 http://ftpmaster.internal/ubuntu plucky/main amd64 libegl-mesa0 amd64 25.0.1-2ubuntu1 [136 kB] 370s Get:340 http://ftpmaster.internal/ubuntu plucky/main amd64 libegl1 amd64 1.7.0-1build1 [28.7 kB] 370s Get:341 http://ftpmaster.internal/ubuntu plucky/main amd64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 370s Get:342 http://ftpmaster.internal/ubuntu plucky/main amd64 libice6 amd64 2:1.1.1-1 [44.1 kB] 370s Get:343 http://ftpmaster.internal/ubuntu plucky/main amd64 libmtdev1t64 amd64 1.1.7-1 [16.3 kB] 370s Get:344 http://ftpmaster.internal/ubuntu plucky/main amd64 libwacom-common all 2.14.0-1 [103 kB] 370s Get:345 http://ftpmaster.internal/ubuntu plucky/main amd64 libwacom9 amd64 2.14.0-1 [27.3 kB] 370s Get:346 http://ftpmaster.internal/ubuntu plucky/main amd64 libinput-bin amd64 1.27.1-1 [23.4 kB] 370s Get:347 http://ftpmaster.internal/ubuntu plucky/main amd64 libinput10 amd64 1.27.1-1 [155 kB] 370s Get:348 http://ftpmaster.internal/ubuntu plucky/universe amd64 libmd4c0 amd64 0.5.2-2 [50.1 kB] 370s Get:349 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6dbus6 amd64 6.8.2+dfsg-5 [290 kB] 370s Get:350 http://ftpmaster.internal/ubuntu plucky/main amd64 libsm6 amd64 2:1.2.4-1 [17.4 kB] 370s Get:351 http://ftpmaster.internal/ubuntu plucky/universe amd64 libts0t64 amd64 1.22-1.1build1 [63.8 kB] 370s Get:352 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-util1 amd64 0.4.1-1 [11.2 kB] 370s Get:353 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-image0 amd64 0.4.0-2build1 [10.8 kB] 370s Get:354 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-render-util0 amd64 0.3.10-1 [10.8 kB] 370s Get:355 http://ftpmaster.internal/ubuntu plucky/universe amd64 libxcb-cursor0 amd64 0.1.5-1 [10.8 kB] 370s Get:356 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-icccm4 amd64 0.4.2-1 [11.1 kB] 370s Get:357 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-keysyms1 amd64 0.4.1-1 [8738 B] 370s Get:358 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-shape0 amd64 1.17.0-2 [6092 B] 370s Get:359 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xinput0 amd64 1.17.0-2 [33.2 kB] 370s Get:360 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-xkb1 amd64 1.17.0-2 [32.3 kB] 370s Get:361 http://ftpmaster.internal/ubuntu plucky/main amd64 libxkbcommon-x11-0 amd64 1.7.0-2 [15.2 kB] 370s Get:362 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6gui6 amd64 6.8.2+dfsg-5 [3835 kB] 372s Get:363 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-common-data amd64 0.8-16ubuntu1 [30.9 kB] 372s Get:364 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-common3 amd64 0.8-16ubuntu1 [23.6 kB] 372s Get:365 http://ftpmaster.internal/ubuntu plucky/main amd64 libavahi-client3 amd64 0.8-16ubuntu1 [27.5 kB] 372s Get:366 http://ftpmaster.internal/ubuntu plucky/main amd64 libcups2t64 amd64 2.4.11-0ubuntu2 [292 kB] 372s Get:367 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6widgets6 amd64 6.8.2+dfsg-5 [2999 kB] 373s Get:368 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6printsupport6 amd64 6.8.2+dfsg-5 [233 kB] 374s Get:369 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqscintilla2-qt6-15 amd64 2.14.1+dfsg-1build4 [1160 kB] 374s Get:370 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6core5compat6 amd64 6.8.2-3 [162 kB] 374s Get:371 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6sql6 amd64 6.8.2+dfsg-5 [151 kB] 374s Get:372 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6help6 amd64 6.8.2-3 [207 kB] 374s Get:373 http://ftpmaster.internal/ubuntu plucky/main amd64 libduktape207 amd64 2.7.0+tests-0ubuntu3 [143 kB] 374s Get:374 http://ftpmaster.internal/ubuntu plucky/main amd64 libproxy1v5 amd64 0.5.9-1 [27.9 kB] 374s Get:375 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6network6 amd64 6.8.2+dfsg-5 [899 kB] 375s Get:376 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6opengl6 amd64 6.8.2+dfsg-5 [465 kB] 375s Get:377 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6openglwidgets6 amd64 6.8.2+dfsg-5 [43.6 kB] 375s Get:378 http://ftpmaster.internal/ubuntu plucky/universe amd64 libqt6xml6 amd64 6.8.2+dfsg-5 [84.8 kB] 375s Get:379 http://ftpmaster.internal/ubuntu plucky/main amd64 libogg0 amd64 1.3.5-3build1 [22.7 kB] 375s Get:380 http://ftpmaster.internal/ubuntu plucky/main amd64 libflac12t64 amd64 1.4.3+ds-4 [268 kB] 375s Get:381 http://ftpmaster.internal/ubuntu plucky/main amd64 libmp3lame0 amd64 3.100-6build1 [142 kB] 375s Get:382 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpg123-0t64 amd64 1.32.10-1 [191 kB] 375s Get:383 http://ftpmaster.internal/ubuntu plucky/main amd64 libvorbis0a amd64 1.3.7-2 [98.4 kB] 375s Get:384 http://ftpmaster.internal/ubuntu plucky/main amd64 libvorbisenc2 amd64 1.3.7-2 [80.8 kB] 375s Get:385 http://ftpmaster.internal/ubuntu plucky/main amd64 libsndfile1 amd64 1.2.2-2 [275 kB] 375s Get:386 http://ftpmaster.internal/ubuntu plucky/universe amd64 libspqr4 amd64 1:7.8.3+dfsg-3 [169 kB] 376s Get:387 http://ftpmaster.internal/ubuntu plucky/universe amd64 libumfpack6 amd64 1:7.8.3+dfsg-3 [337 kB] 376s Get:388 http://ftpmaster.internal/ubuntu plucky/universe amd64 libtext-unidecode-perl all 1.30-3 [105 kB] 376s Get:389 http://ftpmaster.internal/ubuntu plucky/universe amd64 texinfo-lib amd64 7.1.1-1 [136 kB] 376s Get:390 http://ftpmaster.internal/ubuntu plucky/universe amd64 tex-common all 6.19 [29.8 kB] 376s Get:391 http://ftpmaster.internal/ubuntu plucky/universe amd64 texinfo all 7.1.1-1 [1272 kB] 376s Get:392 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-common all 9.4.0-1 [6087 kB] 379s Get:393 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave amd64 9.4.0-1 [10.8 MB] 383s Get:394 http://ftpmaster.internal/ubuntu plucky/main amd64 libncurses-dev amd64 6.5+20250216-2 [424 kB] 384s Get:395 http://ftpmaster.internal/ubuntu plucky/main amd64 libreadline-dev amd64 8.2-6 [184 kB] 384s Get:396 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-fortran-310 amd64 1.14.5+repack-3 [108 kB] 384s Get:397 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-310 amd64 1.14.5+repack-3 [62.6 kB] 384s Get:398 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-fortran-310 amd64 1.14.5+repack-3 [32.4 kB] 384s Get:399 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-cpp-310 amd64 1.14.5+repack-3 [129 kB] 384s Get:400 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-hl-cpp-310 amd64 1.14.5+repack-3 [11.7 kB] 384s Get:401 http://ftpmaster.internal/ubuntu plucky/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1ubuntu1 [895 kB] 384s Get:402 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8-dev amd64 2.1.5-3ubuntu2 [324 kB] 384s Get:403 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8-dev amd64 8c-2ubuntu11 [1484 B] 384s Get:404 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-dev amd64 8c-2ubuntu11 [1482 B] 385s Get:405 http://ftpmaster.internal/ubuntu plucky/universe amd64 libaec-dev amd64 1.1.3-1 [19.8 kB] 385s Get:406 http://ftpmaster.internal/ubuntu plucky/main amd64 libbrotli-dev amd64 1.1.0-2build4 [381 kB] 385s Get:407 http://ftpmaster.internal/ubuntu plucky/main amd64 libidn2-dev amd64 2.3.7-2build2 [120 kB] 386s Get:408 http://ftpmaster.internal/ubuntu plucky/main amd64 comerr-dev amd64 2.1-1.47.2-1ubuntu1 [44.9 kB] 386s Get:409 http://ftpmaster.internal/ubuntu plucky/main amd64 libgssrpc4t64 amd64 1.21.3-4ubuntu2 [58.1 kB] 386s Get:410 http://ftpmaster.internal/ubuntu plucky/main amd64 libkadm5clnt-mit12 amd64 1.21.3-4ubuntu2 [41.3 kB] 386s Get:411 http://ftpmaster.internal/ubuntu plucky/main amd64 libkdb5-10t64 amd64 1.21.3-4ubuntu2 [42.0 kB] 386s Get:412 http://ftpmaster.internal/ubuntu plucky/main amd64 libkadm5srv-mit12 amd64 1.21.3-4ubuntu2 [55.5 kB] 386s Get:413 http://ftpmaster.internal/ubuntu plucky/main amd64 krb5-multidev amd64 1.21.3-4ubuntu2 [125 kB] 386s Get:414 http://ftpmaster.internal/ubuntu plucky/main amd64 libkrb5-dev amd64 1.21.3-4ubuntu2 [11.9 kB] 386s Get:415 http://ftpmaster.internal/ubuntu plucky/main amd64 libldap-dev amd64 2.6.9+dfsg-1~exp2ubuntu1 [335 kB] 386s Get:416 http://ftpmaster.internal/ubuntu plucky/main amd64 libpkgconf3 amd64 1.8.1-4 [32.3 kB] 386s Get:417 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf-bin amd64 1.8.1-4 [21.6 kB] 386s Get:418 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf amd64 1.8.1-4 [16.8 kB] 386s Get:419 http://ftpmaster.internal/ubuntu plucky/main amd64 libnghttp2-dev amd64 1.64.0-1 [123 kB] 386s Get:420 http://ftpmaster.internal/ubuntu plucky/main amd64 libpsl-dev amd64 0.21.2-1.1build1 [76.4 kB] 387s Get:421 http://ftpmaster.internal/ubuntu plucky/main amd64 libgmpxx4ldbl amd64 2:6.3.0+dfsg-3ubuntu1 [10.0 kB] 387s Get:422 http://ftpmaster.internal/ubuntu plucky/main amd64 libgmp-dev amd64 2:6.3.0+dfsg-3ubuntu1 [341 kB] 387s Get:423 http://ftpmaster.internal/ubuntu plucky/main amd64 libevent-2.1-7t64 amd64 2.1.12-stable-10 [144 kB] 387s Get:424 http://ftpmaster.internal/ubuntu plucky/main amd64 libunbound8 amd64 1.22.0-1ubuntu1 [519 kB] 388s Get:425 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls-dane0t64 amd64 3.8.9-2ubuntu2 [24.4 kB] 388s Get:426 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls-openssl27t64 amd64 3.8.9-2ubuntu2 [24.6 kB] 388s Get:427 http://ftpmaster.internal/ubuntu plucky/main amd64 libp11-kit-dev amd64 0.25.5-2ubuntu3 [23.5 kB] 388s Get:428 http://ftpmaster.internal/ubuntu plucky/main amd64 libtasn1-6-dev amd64 4.20.0-2 [98.1 kB] 388s Get:429 http://ftpmaster.internal/ubuntu plucky/main amd64 nettle-dev amd64 3.10.1-1 [1187 kB] 389s Get:430 http://ftpmaster.internal/ubuntu plucky/main amd64 libgnutls28-dev amd64 3.8.9-2ubuntu2 [1118 kB] 390s Get:431 http://ftpmaster.internal/ubuntu plucky/main amd64 librtmp-dev amd64 2.4+20151223.gitfa8646d.1-2build7 [66.7 kB] 390s Get:432 http://ftpmaster.internal/ubuntu plucky/main amd64 libssl-dev amd64 3.4.1-1ubuntu1 [2873 kB] 393s Get:433 http://ftpmaster.internal/ubuntu plucky/main amd64 libssh2-1-dev amd64 1.11.1-1 [292 kB] 394s Get:434 http://ftpmaster.internal/ubuntu plucky/main amd64 libzstd-dev amd64 1.5.6+dfsg-2 [444 kB] 394s Get:435 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4-openssl-dev amd64 8.12.1-3ubuntu1 [522 kB] 395s Get:436 http://ftpmaster.internal/ubuntu plucky/universe amd64 hdf5-helpers amd64 1.14.5+repack-3 [17.0 kB] 395s Get:437 http://ftpmaster.internal/ubuntu plucky/universe amd64 libhdf5-dev amd64 1.14.5+repack-3 [3505 kB] 399s Get:438 http://ftpmaster.internal/ubuntu plucky/main amd64 xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB] 399s Get:439 http://ftpmaster.internal/ubuntu plucky/main amd64 x11proto-dev all 2024.1-1 [606 kB] 399s Get:440 http://ftpmaster.internal/ubuntu plucky/main amd64 libxau-dev amd64 1:1.0.11-1 [9798 B] 399s Get:441 http://ftpmaster.internal/ubuntu plucky/main amd64 libxdmcp-dev amd64 1:1.1.5-1 [26.7 kB] 399s Get:442 http://ftpmaster.internal/ubuntu plucky/main amd64 xtrans-dev all 1.4.0-1 [68.9 kB] 400s Get:443 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb1-dev amd64 1.17.0-2 [86.4 kB] 400s Get:444 http://ftpmaster.internal/ubuntu plucky/main amd64 libx11-dev amd64 2:1.8.10-2 [777 kB] 400s Get:445 http://ftpmaster.internal/ubuntu plucky/main amd64 libglx-dev amd64 1.7.0-1build1 [14.2 kB] 400s Get:446 http://ftpmaster.internal/ubuntu plucky/main amd64 libgl-dev amd64 1.7.0-1build1 [102 kB] 401s Get:447 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas-dev amd64 3.12.1-2 [338 kB] 401s Get:448 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack-dev amd64 3.12.1-2 [6489 kB] 408s Get:449 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-long3 amd64 3.3.10-2fakesync1build1 [378 kB] 409s Get:450 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-quad3 amd64 3.3.10-2fakesync1build1 [669 kB] 409s Get:451 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-bin amd64 3.3.10-2fakesync1build1 [39.2 kB] 409s Get:452 http://ftpmaster.internal/ubuntu plucky/main amd64 libfftw3-dev amd64 3.3.10-2fakesync1build1 [2349 kB] 412s Get:453 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran-14-dev amd64 14.2.0-17ubuntu3 [966 kB] 413s Get:454 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [12.6 MB] 426s Get:455 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14 amd64 14.2.0-17ubuntu3 [13.6 kB] 426s Get:456 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1022 B] 426s Get:457 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran amd64 4:14.2.0-1ubuntu1 [1174 B] 426s Get:458 http://ftpmaster.internal/ubuntu plucky/main amd64 libstdc++-14-dev amd64 14.2.0-17ubuntu3 [2486 kB] 429s Get:459 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [13.4 MB] 443s Get:460 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14 amd64 14.2.0-17ubuntu3 [21.8 kB] 443s Get:461 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [968 B] 443s Get:462 http://ftpmaster.internal/ubuntu plucky/main amd64 g++ amd64 4:14.2.0-1ubuntu1 [1100 B] 443s Get:463 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-dev amd64 9.4.0-1 [463 kB] 444s Get:464 http://ftpmaster.internal/ubuntu plucky/universe amd64 dh-octave all 1.8.0 [19.7 kB] 444s Get:465 http://ftpmaster.internal/ubuntu plucky/main amd64 libfontenc1 amd64 1:1.1.8-1build1 [14.0 kB] 444s Get:466 http://ftpmaster.internal/ubuntu plucky/main amd64 libxt6t64 amd64 1:1.2.1-1.2build1 [171 kB] 444s Get:467 http://ftpmaster.internal/ubuntu plucky/main amd64 libxmu6 amd64 2:1.1.3-3build2 [47.6 kB] 444s Get:468 http://ftpmaster.internal/ubuntu plucky/main amd64 libxaw7 amd64 2:1.0.16-1 [207 kB] 445s Get:469 http://ftpmaster.internal/ubuntu plucky/main amd64 libxfont2 amd64 1:2.0.6-1build1 [93.0 kB] 445s Get:470 http://ftpmaster.internal/ubuntu plucky/main amd64 libxkbfile1 amd64 1:1.1.0-1build4 [70.0 kB] 445s Get:471 http://ftpmaster.internal/ubuntu plucky/main amd64 libxrandr2 amd64 2:1.5.4-1 [19.6 kB] 445s Get:472 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-io amd64 2.6.4-3build2 [223 kB] 445s Get:473 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-statistics-common all 1.7.3-2 [932 kB] 446s Get:474 http://ftpmaster.internal/ubuntu plucky/universe amd64 octave-statistics amd64 1.7.3-2 [206 kB] 446s Get:475 http://ftpmaster.internal/ubuntu plucky/main amd64 x11-xkb-utils amd64 7.7+9 [169 kB] 447s Get:476 http://ftpmaster.internal/ubuntu plucky/main amd64 xserver-common all 2:21.1.16-1ubuntu1 [34.4 kB] 447s Get:477 http://ftpmaster.internal/ubuntu plucky/universe amd64 xvfb amd64 2:21.1.16-1ubuntu1 [975 kB] 449s Fetched 207 MB in 2min 27s (1406 kB/s) 449s Selecting previously unselected package libstemmer0d:amd64. 449s (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 ... 76968 files and directories currently installed.) 449s Preparing to unpack .../000-libstemmer0d_2.2.0-4build1_amd64.deb ... 449s Unpacking libstemmer0d:amd64 (2.2.0-4build1) ... 449s Selecting previously unselected package libappstream5:amd64. 449s Preparing to unpack .../001-libappstream5_1.0.4-1_amd64.deb ... 449s Unpacking libappstream5:amd64 (1.0.4-1) ... 449s Selecting previously unselected package appstream. 449s Preparing to unpack .../002-appstream_1.0.4-1_amd64.deb ... 449s Unpacking appstream (1.0.4-1) ... 449s Selecting previously unselected package m4. 449s Preparing to unpack .../003-m4_1.4.19-7_amd64.deb ... 449s Unpacking m4 (1.4.19-7) ... 449s Selecting previously unselected package autoconf. 449s Preparing to unpack .../004-autoconf_2.72-3ubuntu1_all.deb ... 449s Unpacking autoconf (2.72-3ubuntu1) ... 449s Selecting previously unselected package autotools-dev. 449s Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ... 449s Unpacking autotools-dev (20220109.1) ... 449s Selecting previously unselected package automake. 449s Preparing to unpack .../006-automake_1%3a1.17-3ubuntu1_all.deb ... 449s Unpacking automake (1:1.17-3ubuntu1) ... 449s Selecting previously unselected package autopoint. 449s Preparing to unpack .../007-autopoint_0.23.1-1_all.deb ... 449s Unpacking autopoint (0.23.1-1) ... 449s Selecting previously unselected package libcapture-tiny-perl. 449s Preparing to unpack .../008-libcapture-tiny-perl_0.50-1_all.deb ... 449s Unpacking libcapture-tiny-perl (0.50-1) ... 449s Selecting previously unselected package libparams-util-perl. 449s Preparing to unpack .../009-libparams-util-perl_1.102-3build1_amd64.deb ... 449s Unpacking libparams-util-perl (1.102-3build1) ... 449s Selecting previously unselected package libsub-install-perl. 449s Preparing to unpack .../010-libsub-install-perl_0.929-1_all.deb ... 449s Unpacking libsub-install-perl (0.929-1) ... 449s Selecting previously unselected package libdata-optlist-perl. 449s Preparing to unpack .../011-libdata-optlist-perl_0.114-1_all.deb ... 449s Unpacking libdata-optlist-perl (0.114-1) ... 449s Selecting previously unselected package libb-hooks-op-check-perl:amd64. 449s Preparing to unpack .../012-libb-hooks-op-check-perl_0.22-3build2_amd64.deb ... 449s Unpacking libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 449s Selecting previously unselected package libdynaloader-functions-perl. 449s Preparing to unpack .../013-libdynaloader-functions-perl_0.004-1_all.deb ... 449s Unpacking libdynaloader-functions-perl (0.004-1) ... 449s Selecting previously unselected package libdevel-callchecker-perl:amd64. 449s Preparing to unpack .../014-libdevel-callchecker-perl_0.009-1build1_amd64.deb ... 449s Unpacking libdevel-callchecker-perl:amd64 (0.009-1build1) ... 449s Selecting previously unselected package libparams-classify-perl:amd64. 449s Preparing to unpack .../015-libparams-classify-perl_0.015-2build6_amd64.deb ... 449s Unpacking libparams-classify-perl:amd64 (0.015-2build6) ... 449s Selecting previously unselected package libmodule-runtime-perl. 449s Preparing to unpack .../016-libmodule-runtime-perl_0.016-2_all.deb ... 449s Unpacking libmodule-runtime-perl (0.016-2) ... 449s Selecting previously unselected package libtry-tiny-perl. 449s Preparing to unpack .../017-libtry-tiny-perl_0.32-1_all.deb ... 449s Unpacking libtry-tiny-perl (0.32-1) ... 449s Selecting previously unselected package libmodule-implementation-perl. 449s Preparing to unpack .../018-libmodule-implementation-perl_0.09-2_all.deb ... 449s Unpacking libmodule-implementation-perl (0.09-2) ... 449s Selecting previously unselected package libpackage-stash-perl. 449s Preparing to unpack .../019-libpackage-stash-perl_0.40-1_all.deb ... 449s Unpacking libpackage-stash-perl (0.40-1) ... 449s Selecting previously unselected package libclass-load-perl. 449s Preparing to unpack .../020-libclass-load-perl_0.25-2_all.deb ... 449s Unpacking libclass-load-perl (0.25-2) ... 449s Selecting previously unselected package libio-stringy-perl. 449s Preparing to unpack .../021-libio-stringy-perl_2.113-2_all.deb ... 449s Unpacking libio-stringy-perl (2.113-2) ... 449s Selecting previously unselected package libparams-validate-perl:amd64. 449s Preparing to unpack .../022-libparams-validate-perl_1.31-2build4_amd64.deb ... 449s Unpacking libparams-validate-perl:amd64 (1.31-2build4) ... 449s Selecting previously unselected package libsub-exporter-perl. 449s Preparing to unpack .../023-libsub-exporter-perl_0.990-1_all.deb ... 449s Unpacking libsub-exporter-perl (0.990-1) ... 449s Selecting previously unselected package libgetopt-long-descriptive-perl. 449s Preparing to unpack .../024-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 449s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 450s Selecting previously unselected package libio-tiecombine-perl. 450s Preparing to unpack .../025-libio-tiecombine-perl_1.005-3_all.deb ... 450s Unpacking libio-tiecombine-perl (1.005-3) ... 450s Selecting previously unselected package libmodule-pluggable-perl. 450s Preparing to unpack .../026-libmodule-pluggable-perl_5.2-5_all.deb ... 450s Unpacking libmodule-pluggable-perl (5.2-5) ... 450s Selecting previously unselected package libstring-rewriteprefix-perl. 450s Preparing to unpack .../027-libstring-rewriteprefix-perl_0.009-1_all.deb ... 450s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 450s Selecting previously unselected package libapp-cmd-perl. 450s Preparing to unpack .../028-libapp-cmd-perl_0.337-2_all.deb ... 450s Unpacking libapp-cmd-perl (0.337-2) ... 450s Selecting previously unselected package libboolean-perl. 450s Preparing to unpack .../029-libboolean-perl_0.46-3_all.deb ... 450s Unpacking libboolean-perl (0.46-3) ... 450s Selecting previously unselected package libsub-uplevel-perl. 450s Preparing to unpack .../030-libsub-uplevel-perl_0.2800-3_all.deb ... 450s Unpacking libsub-uplevel-perl (0.2800-3) ... 450s Selecting previously unselected package libtest-exception-perl. 450s Preparing to unpack .../031-libtest-exception-perl_0.43-3_all.deb ... 450s Unpacking libtest-exception-perl (0.43-3) ... 450s Selecting previously unselected package libcarp-assert-more-perl. 450s Preparing to unpack .../032-libcarp-assert-more-perl_2.8.0-1_all.deb ... 450s Unpacking libcarp-assert-more-perl (2.8.0-1) ... 450s Selecting previously unselected package libfile-which-perl. 450s Preparing to unpack .../033-libfile-which-perl_1.27-2_all.deb ... 450s Unpacking libfile-which-perl (1.27-2) ... 450s Selecting previously unselected package libfile-homedir-perl. 450s Preparing to unpack .../034-libfile-homedir-perl_1.006-2_all.deb ... 450s Unpacking libfile-homedir-perl (1.006-2) ... 450s Selecting previously unselected package libclone-choose-perl. 450s Preparing to unpack .../035-libclone-choose-perl_0.010-2_all.deb ... 450s Unpacking libclone-choose-perl (0.010-2) ... 450s Selecting previously unselected package libhash-merge-perl. 450s Preparing to unpack .../036-libhash-merge-perl_0.302-1_all.deb ... 450s Unpacking libhash-merge-perl (0.302-1) ... 450s Selecting previously unselected package libjson-perl. 450s Preparing to unpack .../037-libjson-perl_4.10000-1_all.deb ... 450s Unpacking libjson-perl (4.10000-1) ... 450s Selecting previously unselected package libexporter-tiny-perl. 450s Preparing to unpack .../038-libexporter-tiny-perl_1.006002-1_all.deb ... 450s Unpacking libexporter-tiny-perl (1.006002-1) ... 450s Selecting previously unselected package liblist-moreutils-xs-perl. 450s Preparing to unpack .../039-liblist-moreutils-xs-perl_0.430-4build1_amd64.deb ... 450s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 450s Selecting previously unselected package liblist-moreutils-perl. 450s Preparing to unpack .../040-liblist-moreutils-perl_0.430-2_all.deb ... 450s Unpacking liblist-moreutils-perl (0.430-2) ... 450s Selecting previously unselected package liblog-log4perl-perl. 450s Preparing to unpack .../041-liblog-log4perl-perl_1.57-1_all.deb ... 450s Unpacking liblog-log4perl-perl (1.57-1) ... 450s Selecting previously unselected package libmouse-perl:amd64. 450s Preparing to unpack .../042-libmouse-perl_2.5.11-1build1_amd64.deb ... 450s Unpacking libmouse-perl:amd64 (2.5.11-1build1) ... 450s Selecting previously unselected package libmousex-nativetraits-perl. 450s Preparing to unpack .../043-libmousex-nativetraits-perl_1.09-3_all.deb ... 450s Unpacking libmousex-nativetraits-perl (1.09-3) ... 450s Selecting previously unselected package libmousex-strictconstructor-perl. 450s Preparing to unpack .../044-libmousex-strictconstructor-perl_0.02-3_all.deb ... 450s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 450s Selecting previously unselected package libparse-recdescent-perl. 450s Preparing to unpack .../045-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 450s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 450s Selecting previously unselected package libpath-tiny-perl. 450s Preparing to unpack .../046-libpath-tiny-perl_0.146-1_all.deb ... 450s Unpacking libpath-tiny-perl (0.146-1) ... 450s Selecting previously unselected package libpod-pom-perl. 450s Preparing to unpack .../047-libpod-pom-perl_2.01-4_all.deb ... 450s Unpacking libpod-pom-perl (2.01-4) ... 450s Selecting previously unselected package libregexp-common-perl. 450s Preparing to unpack .../048-libregexp-common-perl_2024080801-1_all.deb ... 450s Unpacking libregexp-common-perl (2024080801-1) ... 450s Selecting previously unselected package libyaml-tiny-perl. 450s Preparing to unpack .../049-libyaml-tiny-perl_1.76-1_all.deb ... 450s Unpacking libyaml-tiny-perl (1.76-1) ... 450s Selecting previously unselected package libconfig-model-perl. 450s Preparing to unpack .../050-libconfig-model-perl_2.155-1_all.deb ... 450s Unpacking libconfig-model-perl (2.155-1) ... 450s Selecting previously unselected package libyaml-pp-perl. 450s Preparing to unpack .../051-libyaml-pp-perl_0.39.0-1_all.deb ... 450s Unpacking libyaml-pp-perl (0.39.0-1) ... 450s Selecting previously unselected package cme. 450s Preparing to unpack .../052-cme_1.041-1_all.deb ... 450s Unpacking cme (1.041-1) ... 450s Selecting previously unselected package libisl23:amd64. 450s Preparing to unpack .../053-libisl23_0.27-1_amd64.deb ... 450s Unpacking libisl23:amd64 (0.27-1) ... 450s Selecting previously unselected package libmpc3:amd64. 450s Preparing to unpack .../054-libmpc3_1.3.1-1build2_amd64.deb ... 450s Unpacking libmpc3:amd64 (1.3.1-1build2) ... 450s Selecting previously unselected package cpp-14-x86-64-linux-gnu. 450s Preparing to unpack .../055-cpp-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 450s Unpacking cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 451s Selecting previously unselected package cpp-14. 451s Preparing to unpack .../056-cpp-14_14.2.0-17ubuntu3_amd64.deb ... 451s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 451s Selecting previously unselected package cpp-x86-64-linux-gnu. 451s Preparing to unpack .../057-cpp-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 451s Unpacking cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 451s Selecting previously unselected package cpp. 451s Preparing to unpack .../058-cpp_4%3a14.2.0-1ubuntu1_amd64.deb ... 451s Unpacking cpp (4:14.2.0-1ubuntu1) ... 451s Selecting previously unselected package libdebhelper-perl. 451s Preparing to unpack .../059-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 451s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 451s Selecting previously unselected package libcc1-0:amd64. 451s Preparing to unpack .../060-libcc1-0_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libcc1-0:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libgomp1:amd64. 451s Preparing to unpack .../061-libgomp1_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libgomp1:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libitm1:amd64. 451s Preparing to unpack .../062-libitm1_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libitm1:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libasan8:amd64. 451s Preparing to unpack .../063-libasan8_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libasan8:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package liblsan0:amd64. 451s Preparing to unpack .../064-liblsan0_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking liblsan0:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libtsan2:amd64. 451s Preparing to unpack .../065-libtsan2_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libtsan2:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libubsan1:amd64. 451s Preparing to unpack .../066-libubsan1_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libubsan1:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libhwasan0:amd64. 451s Preparing to unpack .../067-libhwasan0_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libhwasan0:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libquadmath0:amd64. 451s Preparing to unpack .../068-libquadmath0_15-20250222-0ubuntu1_amd64.deb ... 451s Unpacking libquadmath0:amd64 (15-20250222-0ubuntu1) ... 451s Selecting previously unselected package libgcc-14-dev:amd64. 451s Preparing to unpack .../069-libgcc-14-dev_14.2.0-17ubuntu3_amd64.deb ... 451s Unpacking libgcc-14-dev:amd64 (14.2.0-17ubuntu3) ... 451s Selecting previously unselected package gcc-14-x86-64-linux-gnu. 451s Preparing to unpack .../070-gcc-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 451s Unpacking gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 451s Selecting previously unselected package gcc-14. 451s Preparing to unpack .../071-gcc-14_14.2.0-17ubuntu3_amd64.deb ... 451s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 451s Selecting previously unselected package gcc-x86-64-linux-gnu. 451s Preparing to unpack .../072-gcc-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 451s Unpacking gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 452s Selecting previously unselected package gcc. 452s Preparing to unpack .../073-gcc_4%3a14.2.0-1ubuntu1_amd64.deb ... 452s Unpacking gcc (4:14.2.0-1ubuntu1) ... 452s Selecting previously unselected package libtool. 452s Preparing to unpack .../074-libtool_2.5.4-4_all.deb ... 452s Unpacking libtool (2.5.4-4) ... 452s Selecting previously unselected package dh-autoreconf. 452s Preparing to unpack .../075-dh-autoreconf_20_all.deb ... 452s Unpacking dh-autoreconf (20) ... 452s Selecting previously unselected package libarchive-zip-perl. 452s Preparing to unpack .../076-libarchive-zip-perl_1.68-1_all.deb ... 452s Unpacking libarchive-zip-perl (1.68-1) ... 452s Selecting previously unselected package libfile-stripnondeterminism-perl. 452s Preparing to unpack .../077-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 452s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 452s Selecting previously unselected package dh-strip-nondeterminism. 452s Preparing to unpack .../078-dh-strip-nondeterminism_1.14.1-2_all.deb ... 452s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 452s Selecting previously unselected package debugedit. 452s Preparing to unpack .../079-debugedit_1%3a5.1-2_amd64.deb ... 452s Unpacking debugedit (1:5.1-2) ... 452s Selecting previously unselected package dwz. 452s Preparing to unpack .../080-dwz_0.15-1build6_amd64.deb ... 452s Unpacking dwz (0.15-1build6) ... 452s Selecting previously unselected package gettext. 452s Preparing to unpack .../081-gettext_0.23.1-1_amd64.deb ... 452s Unpacking gettext (0.23.1-1) ... 452s Selecting previously unselected package intltool-debian. 452s Preparing to unpack .../082-intltool-debian_0.35.0+20060710.6_all.deb ... 452s Unpacking intltool-debian (0.35.0+20060710.6) ... 452s Selecting previously unselected package po-debconf. 452s Preparing to unpack .../083-po-debconf_1.0.21+nmu1_all.deb ... 452s Unpacking po-debconf (1.0.21+nmu1) ... 452s Selecting previously unselected package debhelper. 452s Preparing to unpack .../084-debhelper_13.24.1ubuntu2_all.deb ... 452s Unpacking debhelper (13.24.1ubuntu2) ... 452s Selecting previously unselected package aglfn. 452s Preparing to unpack .../085-aglfn_1.7+git20191031.4036a9c-2_all.deb ... 452s Unpacking aglfn (1.7+git20191031.4036a9c-2) ... 452s Selecting previously unselected package gnuplot-data. 452s Preparing to unpack .../086-gnuplot-data_6.0.2+dfsg1-1_all.deb ... 452s Unpacking gnuplot-data (6.0.2+dfsg1-1) ... 452s Selecting previously unselected package fonts-dejavu-mono. 452s Preparing to unpack .../087-fonts-dejavu-mono_2.37-8_all.deb ... 452s Unpacking fonts-dejavu-mono (2.37-8) ... 452s Selecting previously unselected package fonts-dejavu-core. 452s Preparing to unpack .../088-fonts-dejavu-core_2.37-8_all.deb ... 452s Unpacking fonts-dejavu-core (2.37-8) ... 452s Selecting previously unselected package fonts-freefont-otf. 452s Preparing to unpack .../089-fonts-freefont-otf_20211204+svn4273-2_all.deb ... 452s Unpacking fonts-freefont-otf (20211204+svn4273-2) ... 452s Selecting previously unselected package fontconfig-config. 452s Preparing to unpack .../090-fontconfig-config_2.15.0-2ubuntu1_amd64.deb ... 452s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 452s Selecting previously unselected package libfontconfig1:amd64. 452s Preparing to unpack .../091-libfontconfig1_2.15.0-2ubuntu1_amd64.deb ... 452s Unpacking libfontconfig1:amd64 (2.15.0-2ubuntu1) ... 452s Selecting previously unselected package libpixman-1-0:amd64. 452s Preparing to unpack .../092-libpixman-1-0_0.44.0-3_amd64.deb ... 452s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 452s Selecting previously unselected package libxcb-render0:amd64. 452s Preparing to unpack .../093-libxcb-render0_1.17.0-2_amd64.deb ... 452s Unpacking libxcb-render0:amd64 (1.17.0-2) ... 452s Selecting previously unselected package libxcb-shm0:amd64. 452s Preparing to unpack .../094-libxcb-shm0_1.17.0-2_amd64.deb ... 452s Unpacking libxcb-shm0:amd64 (1.17.0-2) ... 452s Selecting previously unselected package libxrender1:amd64. 452s Preparing to unpack .../095-libxrender1_1%3a0.9.10-1.1build1_amd64.deb ... 452s Unpacking libxrender1:amd64 (1:0.9.10-1.1build1) ... 452s Selecting previously unselected package libcairo2:amd64. 452s Preparing to unpack .../096-libcairo2_1.18.2-2_amd64.deb ... 452s Unpacking libcairo2:amd64 (1.18.2-2) ... 452s Selecting previously unselected package libsharpyuv0:amd64. 452s Preparing to unpack .../097-libsharpyuv0_1.5.0-0.1_amd64.deb ... 452s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 453s Selecting previously unselected package libaom3:amd64. 453s Preparing to unpack .../098-libaom3_3.12.0-1_amd64.deb ... 453s Unpacking libaom3:amd64 (3.12.0-1) ... 453s Selecting previously unselected package libheif-plugin-aomdec:amd64. 453s Preparing to unpack .../099-libheif-plugin-aomdec_1.19.7-1_amd64.deb ... 453s Unpacking libheif-plugin-aomdec:amd64 (1.19.7-1) ... 453s Selecting previously unselected package libde265-0:amd64. 453s Preparing to unpack .../100-libde265-0_1.0.15-1build5_amd64.deb ... 453s Unpacking libde265-0:amd64 (1.0.15-1build5) ... 453s Selecting previously unselected package libheif-plugin-libde265:amd64. 453s Preparing to unpack .../101-libheif-plugin-libde265_1.19.7-1_amd64.deb ... 453s Unpacking libheif-plugin-libde265:amd64 (1.19.7-1) ... 453s Selecting previously unselected package libheif1:amd64. 453s Preparing to unpack .../102-libheif1_1.19.7-1_amd64.deb ... 453s Unpacking libheif1:amd64 (1.19.7-1) ... 453s Selecting previously unselected package libimagequant0:amd64. 453s Preparing to unpack .../103-libimagequant0_2.18.0-1build1_amd64.deb ... 453s Unpacking libimagequant0:amd64 (2.18.0-1build1) ... 453s Selecting previously unselected package libjpeg-turbo8:amd64. 453s Preparing to unpack .../104-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 453s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 453s Selecting previously unselected package libjpeg8:amd64. 453s Preparing to unpack .../105-libjpeg8_8c-2ubuntu11_amd64.deb ... 453s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 453s Selecting previously unselected package libgraphite2-3:amd64. 453s Preparing to unpack .../106-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 453s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 453s Selecting previously unselected package libharfbuzz0b:amd64. 453s Preparing to unpack .../107-libharfbuzz0b_10.2.0-1_amd64.deb ... 453s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 453s Selecting previously unselected package libraqm0:amd64. 453s Preparing to unpack .../108-libraqm0_0.10.2-1_amd64.deb ... 453s Unpacking libraqm0:amd64 (0.10.2-1) ... 453s Selecting previously unselected package libdeflate0:amd64. 453s Preparing to unpack .../109-libdeflate0_1.23-1_amd64.deb ... 453s Unpacking libdeflate0:amd64 (1.23-1) ... 453s Selecting previously unselected package libjbig0:amd64. 453s Preparing to unpack .../110-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 453s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 453s Selecting previously unselected package liblerc4:amd64. 453s Preparing to unpack .../111-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 453s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 453s Selecting previously unselected package libwebp7:amd64. 453s Preparing to unpack .../112-libwebp7_1.5.0-0.1_amd64.deb ... 453s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 453s Selecting previously unselected package libtiff6:amd64. 453s Preparing to unpack .../113-libtiff6_4.5.1+git230720-4ubuntu4_amd64.deb ... 453s Unpacking libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 453s Selecting previously unselected package libxpm4:amd64. 453s Preparing to unpack .../114-libxpm4_1%3a3.5.17-1build2_amd64.deb ... 453s Unpacking libxpm4:amd64 (1:3.5.17-1build2) ... 453s Selecting previously unselected package libgd3:amd64. 453s Preparing to unpack .../115-libgd3_2.3.3-12ubuntu3_amd64.deb ... 453s Unpacking libgd3:amd64 (2.3.3-12ubuntu3) ... 453s Selecting previously unselected package liblua5.4-0:amd64. 453s Preparing to unpack .../116-liblua5.4-0_5.4.7-1_amd64.deb ... 453s Unpacking liblua5.4-0:amd64 (5.4.7-1) ... 453s Selecting previously unselected package fontconfig. 453s Preparing to unpack .../117-fontconfig_2.15.0-2ubuntu1_amd64.deb ... 453s Unpacking fontconfig (2.15.0-2ubuntu1) ... 453s Selecting previously unselected package libthai-data. 453s Preparing to unpack .../118-libthai-data_0.1.29-2build1_all.deb ... 453s Unpacking libthai-data (0.1.29-2build1) ... 453s Selecting previously unselected package libdatrie1:amd64. 453s Preparing to unpack .../119-libdatrie1_0.2.13-3build1_amd64.deb ... 453s Unpacking libdatrie1:amd64 (0.2.13-3build1) ... 453s Selecting previously unselected package libthai0:amd64. 453s Preparing to unpack .../120-libthai0_0.1.29-2build1_amd64.deb ... 453s Unpacking libthai0:amd64 (0.1.29-2build1) ... 453s Selecting previously unselected package libpango-1.0-0:amd64. 453s Preparing to unpack .../121-libpango-1.0-0_1.56.1-1_amd64.deb ... 453s Unpacking libpango-1.0-0:amd64 (1.56.1-1) ... 453s Selecting previously unselected package libpangoft2-1.0-0:amd64. 453s Preparing to unpack .../122-libpangoft2-1.0-0_1.56.1-1_amd64.deb ... 453s Unpacking libpangoft2-1.0-0:amd64 (1.56.1-1) ... 453s Selecting previously unselected package libpangocairo-1.0-0:amd64. 453s Preparing to unpack .../123-libpangocairo-1.0-0_1.56.1-1_amd64.deb ... 453s Unpacking libpangocairo-1.0-0:amd64 (1.56.1-1) ... 453s Selecting previously unselected package libwebpmux3:amd64. 453s Preparing to unpack .../124-libwebpmux3_1.5.0-0.1_amd64.deb ... 453s Unpacking libwebpmux3:amd64 (1.5.0-0.1) ... 453s Selecting previously unselected package gnuplot-nox. 453s Preparing to unpack .../125-gnuplot-nox_6.0.2+dfsg1-1_amd64.deb ... 453s Unpacking gnuplot-nox (6.0.2+dfsg1-1) ... 454s Selecting previously unselected package dh-octave-autopkgtest. 454s Preparing to unpack .../126-dh-octave-autopkgtest_1.8.0_all.deb ... 454s Unpacking dh-octave-autopkgtest (1.8.0) ... 454s Selecting previously unselected package libapt-pkg-perl. 454s Preparing to unpack .../127-libapt-pkg-perl_0.1.41build1_amd64.deb ... 454s Unpacking libapt-pkg-perl (0.1.41build1) ... 454s Selecting previously unselected package libarray-intspan-perl. 454s Preparing to unpack .../128-libarray-intspan-perl_2.004-2_all.deb ... 454s Unpacking libarray-intspan-perl (2.004-2) ... 454s Selecting previously unselected package libyaml-libyaml-perl. 454s Preparing to unpack .../129-libyaml-libyaml-perl_0.903.0+ds-1_amd64.deb ... 454s Unpacking libyaml-libyaml-perl (0.903.0+ds-1) ... 454s Selecting previously unselected package libconfig-model-backend-yaml-perl. 454s Preparing to unpack .../130-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 454s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 454s Selecting previously unselected package libexporter-lite-perl. 454s Preparing to unpack .../131-libexporter-lite-perl_0.09-2_all.deb ... 454s Unpacking libexporter-lite-perl (0.09-2) ... 454s Selecting previously unselected package libencode-locale-perl. 454s Preparing to unpack .../132-libencode-locale-perl_1.05-3_all.deb ... 454s Unpacking libencode-locale-perl (1.05-3) ... 454s Selecting previously unselected package libtimedate-perl. 454s Preparing to unpack .../133-libtimedate-perl_2.3300-2_all.deb ... 454s Unpacking libtimedate-perl (2.3300-2) ... 454s Selecting previously unselected package libhttp-date-perl. 454s Preparing to unpack .../134-libhttp-date-perl_6.06-1_all.deb ... 454s Unpacking libhttp-date-perl (6.06-1) ... 454s Selecting previously unselected package libfile-listing-perl. 454s Preparing to unpack .../135-libfile-listing-perl_6.16-1_all.deb ... 454s Unpacking libfile-listing-perl (6.16-1) ... 454s Selecting previously unselected package libhtml-tagset-perl. 454s Preparing to unpack .../136-libhtml-tagset-perl_3.24-1_all.deb ... 454s Unpacking libhtml-tagset-perl (3.24-1) ... 454s Selecting previously unselected package liburi-perl. 454s Preparing to unpack .../137-liburi-perl_5.30-1_all.deb ... 454s Unpacking liburi-perl (5.30-1) ... 454s Selecting previously unselected package libhtml-parser-perl:amd64. 454s Preparing to unpack .../138-libhtml-parser-perl_3.83-1build1_amd64.deb ... 454s Unpacking libhtml-parser-perl:amd64 (3.83-1build1) ... 454s Selecting previously unselected package libhtml-tree-perl. 454s Preparing to unpack .../139-libhtml-tree-perl_5.07-3_all.deb ... 454s Unpacking libhtml-tree-perl (5.07-3) ... 454s Selecting previously unselected package libclone-perl:amd64. 454s Preparing to unpack .../140-libclone-perl_0.47-1_amd64.deb ... 454s Unpacking libclone-perl:amd64 (0.47-1) ... 454s Selecting previously unselected package libio-html-perl. 454s Preparing to unpack .../141-libio-html-perl_1.004-3_all.deb ... 454s Unpacking libio-html-perl (1.004-3) ... 454s Selecting previously unselected package liblwp-mediatypes-perl. 454s Preparing to unpack .../142-liblwp-mediatypes-perl_6.04-2_all.deb ... 454s Unpacking liblwp-mediatypes-perl (6.04-2) ... 454s Selecting previously unselected package libhttp-message-perl. 454s Preparing to unpack .../143-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 454s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 454s Selecting previously unselected package libhttp-cookies-perl. 454s Preparing to unpack .../144-libhttp-cookies-perl_6.11-1_all.deb ... 454s Unpacking libhttp-cookies-perl (6.11-1) ... 454s Selecting previously unselected package libhttp-negotiate-perl. 454s Preparing to unpack .../145-libhttp-negotiate-perl_6.01-2_all.deb ... 454s Unpacking libhttp-negotiate-perl (6.01-2) ... 454s Selecting previously unselected package perl-openssl-defaults:amd64. 454s Preparing to unpack .../146-perl-openssl-defaults_7build3_amd64.deb ... 454s Unpacking perl-openssl-defaults:amd64 (7build3) ... 454s Selecting previously unselected package libnet-ssleay-perl:amd64. 454s Preparing to unpack .../147-libnet-ssleay-perl_1.94-3_amd64.deb ... 454s Unpacking libnet-ssleay-perl:amd64 (1.94-3) ... 454s Selecting previously unselected package libio-socket-ssl-perl. 454s Preparing to unpack .../148-libio-socket-ssl-perl_2.089-1_all.deb ... 454s Unpacking libio-socket-ssl-perl (2.089-1) ... 454s Selecting previously unselected package libnet-http-perl. 454s Preparing to unpack .../149-libnet-http-perl_6.23-1_all.deb ... 454s Unpacking libnet-http-perl (6.23-1) ... 454s Selecting previously unselected package liblwp-protocol-https-perl. 454s Preparing to unpack .../150-liblwp-protocol-https-perl_6.14-1_all.deb ... 454s Unpacking liblwp-protocol-https-perl (6.14-1) ... 454s Selecting previously unselected package libwww-robotrules-perl. 454s Preparing to unpack .../151-libwww-robotrules-perl_6.02-1_all.deb ... 454s Unpacking libwww-robotrules-perl (6.02-1) ... 454s Selecting previously unselected package libwww-perl. 454s Preparing to unpack .../152-libwww-perl_6.78-1_all.deb ... 454s Unpacking libwww-perl (6.78-1) ... 454s Selecting previously unselected package liberror-perl. 454s Preparing to unpack .../153-liberror-perl_0.17030-1_all.deb ... 454s Unpacking liberror-perl (0.17030-1) ... 454s Selecting previously unselected package libparse-debcontrol-perl. 454s Preparing to unpack .../154-libparse-debcontrol-perl_2.005-6_all.deb ... 454s Unpacking libparse-debcontrol-perl (2.005-6) ... 454s Selecting previously unselected package libsoftware-copyright-perl. 454s Preparing to unpack .../155-libsoftware-copyright-perl_0.014-1_all.deb ... 454s Unpacking libsoftware-copyright-perl (0.014-1) ... 454s Selecting previously unselected package libalgorithm-c3-perl. 454s Preparing to unpack .../156-libalgorithm-c3-perl_0.11-2_all.deb ... 454s Unpacking libalgorithm-c3-perl (0.11-2) ... 454s Selecting previously unselected package libclass-c3-perl. 454s Preparing to unpack .../157-libclass-c3-perl_0.35-2_all.deb ... 454s Unpacking libclass-c3-perl (0.35-2) ... 454s Selecting previously unselected package libmro-compat-perl. 454s Preparing to unpack .../158-libmro-compat-perl_0.15-2_all.deb ... 454s Unpacking libmro-compat-perl (0.15-2) ... 454s Selecting previously unselected package libdata-section-perl. 454s Preparing to unpack .../159-libdata-section-perl_0.200008-1_all.deb ... 454s Unpacking libdata-section-perl (0.200008-1) ... 454s Selecting previously unselected package libtext-template-perl. 454s Preparing to unpack .../160-libtext-template-perl_1.61-1_all.deb ... 454s Unpacking libtext-template-perl (1.61-1) ... 454s Selecting previously unselected package libsoftware-license-perl. 454s Preparing to unpack .../161-libsoftware-license-perl_0.104006-1_all.deb ... 454s Unpacking libsoftware-license-perl (0.104006-1) ... 455s Selecting previously unselected package libsoftware-licensemoreutils-perl. 455s Preparing to unpack .../162-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 455s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 455s Selecting previously unselected package libsort-versions-perl. 455s Preparing to unpack .../163-libsort-versions-perl_1.62-3_all.deb ... 455s Unpacking libsort-versions-perl (1.62-3) ... 455s Selecting previously unselected package libtext-reform-perl. 455s Preparing to unpack .../164-libtext-reform-perl_1.20-5_all.deb ... 455s Unpacking libtext-reform-perl (1.20-5) ... 455s Selecting previously unselected package libtext-autoformat-perl. 455s Preparing to unpack .../165-libtext-autoformat-perl_1.750000-2_all.deb ... 455s Unpacking libtext-autoformat-perl (1.750000-2) ... 455s Selecting previously unselected package libtext-levenshtein-damerau-perl. 455s Preparing to unpack .../166-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 455s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 455s Selecting previously unselected package libtoml-tiny-perl. 455s Preparing to unpack .../167-libtoml-tiny-perl_0.19-1_all.deb ... 455s Unpacking libtoml-tiny-perl (0.19-1) ... 455s Selecting previously unselected package libclass-inspector-perl. 455s Preparing to unpack .../168-libclass-inspector-perl_1.36-3_all.deb ... 455s Unpacking libclass-inspector-perl (1.36-3) ... 455s Selecting previously unselected package libfile-sharedir-perl. 455s Preparing to unpack .../169-libfile-sharedir-perl_1.118-3_all.deb ... 455s Unpacking libfile-sharedir-perl (1.118-3) ... 455s Selecting previously unselected package libindirect-perl. 455s Preparing to unpack .../170-libindirect-perl_0.39-2build5_amd64.deb ... 455s Unpacking libindirect-perl (0.39-2build5) ... 455s Selecting previously unselected package libxs-parse-keyword-perl. 455s Preparing to unpack .../171-libxs-parse-keyword-perl_0.48-2_amd64.deb ... 455s Unpacking libxs-parse-keyword-perl (0.48-2) ... 455s Selecting previously unselected package libxs-parse-sublike-perl:amd64. 455s Preparing to unpack .../172-libxs-parse-sublike-perl_0.37-1_amd64.deb ... 455s Unpacking libxs-parse-sublike-perl:amd64 (0.37-1) ... 455s Selecting previously unselected package libobject-pad-perl. 455s Preparing to unpack .../173-libobject-pad-perl_0.820-1_amd64.deb ... 455s Unpacking libobject-pad-perl (0.820-1) ... 455s Selecting previously unselected package libsyntax-keyword-try-perl. 455s Preparing to unpack .../174-libsyntax-keyword-try-perl_0.30-1_amd64.deb ... 455s Unpacking libsyntax-keyword-try-perl (0.30-1) ... 455s Selecting previously unselected package libio-interactive-perl. 455s Preparing to unpack .../175-libio-interactive-perl_1.026-1_all.deb ... 455s Unpacking libio-interactive-perl (1.026-1) ... 455s Selecting previously unselected package liblog-any-perl. 455s Preparing to unpack .../176-liblog-any-perl_1.717-1_all.deb ... 455s Unpacking liblog-any-perl (1.717-1) ... 455s Selecting previously unselected package liblog-any-adapter-screen-perl. 455s Preparing to unpack .../177-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 455s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 455s Selecting previously unselected package libsub-exporter-progressive-perl. 455s Preparing to unpack .../178-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 455s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 455s Selecting previously unselected package libvariable-magic-perl. 455s Preparing to unpack .../179-libvariable-magic-perl_0.64-1build1_amd64.deb ... 455s Unpacking libvariable-magic-perl (0.64-1build1) ... 455s Selecting previously unselected package libb-hooks-endofscope-perl. 455s Preparing to unpack .../180-libb-hooks-endofscope-perl_0.28-1_all.deb ... 455s Unpacking libb-hooks-endofscope-perl (0.28-1) ... 455s Selecting previously unselected package libsub-identify-perl. 455s Preparing to unpack .../181-libsub-identify-perl_0.14-3build4_amd64.deb ... 455s Unpacking libsub-identify-perl (0.14-3build4) ... 455s Selecting previously unselected package libsub-name-perl:amd64. 455s Preparing to unpack .../182-libsub-name-perl_0.28-1_amd64.deb ... 455s Unpacking libsub-name-perl:amd64 (0.28-1) ... 455s Selecting previously unselected package libnamespace-clean-perl. 455s Preparing to unpack .../183-libnamespace-clean-perl_0.27-2_all.deb ... 455s Unpacking libnamespace-clean-perl (0.27-2) ... 455s Selecting previously unselected package libnumber-compare-perl. 455s Preparing to unpack .../184-libnumber-compare-perl_0.03-3_all.deb ... 455s Unpacking libnumber-compare-perl (0.03-3) ... 455s Selecting previously unselected package libtext-glob-perl. 455s Preparing to unpack .../185-libtext-glob-perl_0.11-3_all.deb ... 455s Unpacking libtext-glob-perl (0.11-3) ... 455s Selecting previously unselected package libpath-iterator-rule-perl. 455s Preparing to unpack .../186-libpath-iterator-rule-perl_1.015-2_all.deb ... 455s Unpacking libpath-iterator-rule-perl (1.015-2) ... 455s Selecting previously unselected package libpod-parser-perl. 455s Preparing to unpack .../187-libpod-parser-perl_1.67-1_all.deb ... 455s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 455s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 455s Unpacking libpod-parser-perl (1.67-1) ... 455s Selecting previously unselected package libpod-constants-perl. 455s Preparing to unpack .../188-libpod-constants-perl_0.19-2_all.deb ... 455s Unpacking libpod-constants-perl (0.19-2) ... 455s Selecting previously unselected package libset-intspan-perl. 455s Preparing to unpack .../189-libset-intspan-perl_1.19-3_all.deb ... 455s Unpacking libset-intspan-perl (1.19-3) ... 455s Selecting previously unselected package libstring-copyright-perl. 455s Preparing to unpack .../190-libstring-copyright-perl_0.003014-1_all.deb ... 455s Unpacking libstring-copyright-perl (0.003014-1) ... 455s Selecting previously unselected package libstring-escape-perl. 455s Preparing to unpack .../191-libstring-escape-perl_2010.002-3_all.deb ... 455s Unpacking libstring-escape-perl (2010.002-3) ... 455s Selecting previously unselected package libregexp-pattern-license-perl. 455s Preparing to unpack .../192-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 455s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 455s Selecting previously unselected package libregexp-pattern-perl. 455s Preparing to unpack .../193-libregexp-pattern-perl_0.2.14-2_all.deb ... 455s Unpacking libregexp-pattern-perl (0.2.14-2) ... 455s Selecting previously unselected package libstring-license-perl. 455s Preparing to unpack .../194-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 455s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 455s Selecting previously unselected package licensecheck. 455s Preparing to unpack .../195-licensecheck_3.3.9-1ubuntu1_all.deb ... 455s Unpacking licensecheck (3.3.9-1ubuntu1) ... 455s Selecting previously unselected package diffstat. 455s Preparing to unpack .../196-diffstat_1.67-1_amd64.deb ... 455s Unpacking diffstat (1.67-1) ... 455s Selecting previously unselected package libberkeleydb-perl:amd64. 456s Preparing to unpack .../197-libberkeleydb-perl_0.66-1_amd64.deb ... 456s Unpacking libberkeleydb-perl:amd64 (0.66-1) ... 456s Selecting previously unselected package libclass-xsaccessor-perl. 456s Preparing to unpack .../198-libclass-xsaccessor-perl_1.19-4build6_amd64.deb ... 456s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 456s Selecting previously unselected package libconfig-tiny-perl. 456s Preparing to unpack .../199-libconfig-tiny-perl_2.30-1_all.deb ... 456s Unpacking libconfig-tiny-perl (2.30-1) ... 456s Selecting previously unselected package libconst-fast-perl. 456s Preparing to unpack .../200-libconst-fast-perl_0.014-2_all.deb ... 456s Unpacking libconst-fast-perl (0.014-2) ... 456s Selecting previously unselected package libcpanel-json-xs-perl:amd64. 456s Preparing to unpack .../201-libcpanel-json-xs-perl_4.39-1_amd64.deb ... 456s Unpacking libcpanel-json-xs-perl:amd64 (4.39-1) ... 456s Selecting previously unselected package libaliased-perl. 456s Preparing to unpack .../202-libaliased-perl_0.34-3_all.deb ... 456s Unpacking libaliased-perl (0.34-3) ... 456s Selecting previously unselected package libclass-data-inheritable-perl. 456s Preparing to unpack .../203-libclass-data-inheritable-perl_0.10-1_all.deb ... 456s Unpacking libclass-data-inheritable-perl (0.10-1) ... 456s Selecting previously unselected package libdevel-stacktrace-perl. 456s Preparing to unpack .../204-libdevel-stacktrace-perl_2.0500-1_all.deb ... 456s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 456s Selecting previously unselected package libexception-class-perl. 456s Preparing to unpack .../205-libexception-class-perl_1.45-1_all.deb ... 456s Unpacking libexception-class-perl (1.45-1) ... 456s Selecting previously unselected package libiterator-perl. 456s Preparing to unpack .../206-libiterator-perl_0.03+ds1-2_all.deb ... 456s Unpacking libiterator-perl (0.03+ds1-2) ... 456s Selecting previously unselected package libiterator-util-perl. 456s Preparing to unpack .../207-libiterator-util-perl_0.02+ds1-2_all.deb ... 456s Unpacking libiterator-util-perl (0.02+ds1-2) ... 456s Selecting previously unselected package libdata-dpath-perl. 456s Preparing to unpack .../208-libdata-dpath-perl_0.60-1_all.deb ... 456s Unpacking libdata-dpath-perl (0.60-1) ... 456s Selecting previously unselected package libnet-domain-tld-perl. 456s Preparing to unpack .../209-libnet-domain-tld-perl_1.75-4_all.deb ... 456s Unpacking libnet-domain-tld-perl (1.75-4) ... 456s Selecting previously unselected package libdata-validate-domain-perl. 456s Preparing to unpack .../210-libdata-validate-domain-perl_0.15-1_all.deb ... 456s Unpacking libdata-validate-domain-perl (0.15-1) ... 456s Selecting previously unselected package libnet-ipv6addr-perl. 456s Preparing to unpack .../211-libnet-ipv6addr-perl_1.02-1_all.deb ... 456s Unpacking libnet-ipv6addr-perl (1.02-1) ... 456s Selecting previously unselected package libnet-netmask-perl. 456s Preparing to unpack .../212-libnet-netmask-perl_2.0002-2_all.deb ... 456s Unpacking libnet-netmask-perl (2.0002-2) ... 456s Selecting previously unselected package libnetaddr-ip-perl. 456s Preparing to unpack .../213-libnetaddr-ip-perl_4.079+dfsg-2build5_amd64.deb ... 456s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 456s Selecting previously unselected package libdata-validate-ip-perl. 456s Preparing to unpack .../214-libdata-validate-ip-perl_0.31-1_all.deb ... 456s Unpacking libdata-validate-ip-perl (0.31-1) ... 456s Selecting previously unselected package libdata-validate-uri-perl. 456s Preparing to unpack .../215-libdata-validate-uri-perl_0.07-3_all.deb ... 456s Unpacking libdata-validate-uri-perl (0.07-3) ... 456s Selecting previously unselected package libdevel-size-perl. 456s Preparing to unpack .../216-libdevel-size-perl_0.84-1build1_amd64.deb ... 456s Unpacking libdevel-size-perl (0.84-1build1) ... 456s Selecting previously unselected package libemail-address-xs-perl. 456s Preparing to unpack .../217-libemail-address-xs-perl_1.05-1build5_amd64.deb ... 456s Unpacking libemail-address-xs-perl (1.05-1build5) ... 456s Selecting previously unselected package libipc-system-simple-perl. 456s Preparing to unpack .../218-libipc-system-simple-perl_1.30-2_all.deb ... 456s Unpacking libipc-system-simple-perl (1.30-2) ... 456s Selecting previously unselected package libfile-basedir-perl. 456s Preparing to unpack .../219-libfile-basedir-perl_0.09-2_all.deb ... 456s Unpacking libfile-basedir-perl (0.09-2) ... 456s Selecting previously unselected package libfile-find-rule-perl. 456s Preparing to unpack .../220-libfile-find-rule-perl_0.34-3_all.deb ... 456s Unpacking libfile-find-rule-perl (0.34-3) ... 456s Selecting previously unselected package libio-string-perl. 456s Preparing to unpack .../221-libio-string-perl_1.08-4_all.deb ... 456s Unpacking libio-string-perl (1.08-4) ... 456s Selecting previously unselected package libfont-ttf-perl. 456s Preparing to unpack .../222-libfont-ttf-perl_1.06-2_all.deb ... 456s Unpacking libfont-ttf-perl (1.06-2) ... 456s Selecting previously unselected package libhtml-html5-entities-perl. 456s Preparing to unpack .../223-libhtml-html5-entities-perl_0.004-3_all.deb ... 456s Unpacking libhtml-html5-entities-perl (0.004-3) ... 456s Selecting previously unselected package libhtml-tokeparser-simple-perl. 456s Preparing to unpack .../224-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 456s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 456s Selecting previously unselected package libipc-run3-perl. 456s Preparing to unpack .../225-libipc-run3-perl_0.049-1_all.deb ... 456s Unpacking libipc-run3-perl (0.049-1) ... 456s Selecting previously unselected package libjson-maybexs-perl. 456s Preparing to unpack .../226-libjson-maybexs-perl_1.004008-1_all.deb ... 456s Unpacking libjson-maybexs-perl (1.004008-1) ... 456s Selecting previously unselected package liblist-compare-perl. 456s Preparing to unpack .../227-liblist-compare-perl_0.55-2_all.deb ... 456s Unpacking liblist-compare-perl (0.55-2) ... 456s Selecting previously unselected package liblist-someutils-perl. 456s Preparing to unpack .../228-liblist-someutils-perl_0.59-1_all.deb ... 456s Unpacking liblist-someutils-perl (0.59-1) ... 456s Selecting previously unselected package liblist-utilsby-perl. 456s Preparing to unpack .../229-liblist-utilsby-perl_0.12-2_all.deb ... 456s Unpacking liblist-utilsby-perl (0.12-2) ... 456s Selecting previously unselected package libmldbm-perl. 456s Preparing to unpack .../230-libmldbm-perl_2.05-4_all.deb ... 456s Unpacking libmldbm-perl (2.05-4) ... 457s Selecting previously unselected package libclass-method-modifiers-perl. 457s Preparing to unpack .../231-libclass-method-modifiers-perl_2.15-1_all.deb ... 457s Unpacking libclass-method-modifiers-perl (2.15-1) ... 457s Selecting previously unselected package libimport-into-perl. 457s Preparing to unpack .../232-libimport-into-perl_1.002005-2_all.deb ... 457s Unpacking libimport-into-perl (1.002005-2) ... 457s Selecting previously unselected package librole-tiny-perl. 457s Preparing to unpack .../233-librole-tiny-perl_2.002004-1_all.deb ... 457s Unpacking librole-tiny-perl (2.002004-1) ... 457s Selecting previously unselected package libsub-quote-perl. 457s Preparing to unpack .../234-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 457s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 457s Selecting previously unselected package libmoo-perl. 457s Preparing to unpack .../235-libmoo-perl_2.005005-1_all.deb ... 457s Unpacking libmoo-perl (2.005005-1) ... 457s Selecting previously unselected package libstrictures-perl. 457s Preparing to unpack .../236-libstrictures-perl_2.000006-1_all.deb ... 457s Unpacking libstrictures-perl (2.000006-1) ... 457s Selecting previously unselected package libmoox-aliases-perl. 457s Preparing to unpack .../237-libmoox-aliases-perl_0.001006-2_all.deb ... 457s Unpacking libmoox-aliases-perl (0.001006-2) ... 457s Selecting previously unselected package libperlio-gzip-perl. 457s Preparing to unpack .../238-libperlio-gzip-perl_0.20-1build5_amd64.deb ... 457s Unpacking libperlio-gzip-perl (0.20-1build5) ... 457s Selecting previously unselected package libperlio-utf8-strict-perl. 457s Preparing to unpack .../239-libperlio-utf8-strict-perl_0.010-1build4_amd64.deb ... 457s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 457s Selecting previously unselected package libproc-processtable-perl:amd64. 457s Preparing to unpack .../240-libproc-processtable-perl_0.636-1build4_amd64.deb ... 457s Unpacking libproc-processtable-perl:amd64 (0.636-1build4) ... 457s Selecting previously unselected package libregexp-wildcards-perl. 457s Preparing to unpack .../241-libregexp-wildcards-perl_1.05-3_all.deb ... 457s Unpacking libregexp-wildcards-perl (1.05-3) ... 457s Selecting previously unselected package libsereal-decoder-perl. 457s Preparing to unpack .../242-libsereal-decoder-perl_5.004+ds-1build4_amd64.deb ... 457s Unpacking libsereal-decoder-perl (5.004+ds-1build4) ... 457s Selecting previously unselected package libsereal-encoder-perl. 457s Preparing to unpack .../243-libsereal-encoder-perl_5.004+ds-1build4_amd64.deb ... 457s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 457s Selecting previously unselected package libterm-readkey-perl. 457s Preparing to unpack .../244-libterm-readkey-perl_2.38-2build5_amd64.deb ... 457s Unpacking libterm-readkey-perl (2.38-2build5) ... 457s Selecting previously unselected package libtext-levenshteinxs-perl. 457s Preparing to unpack .../245-libtext-levenshteinxs-perl_0.03-5build5_amd64.deb ... 457s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 457s Selecting previously unselected package libmarkdown2:amd64. 457s Preparing to unpack .../246-libmarkdown2_2.2.7-2.1_amd64.deb ... 457s Unpacking libmarkdown2:amd64 (2.2.7-2.1) ... 457s Selecting previously unselected package libtext-markdown-discount-perl. 457s Preparing to unpack .../247-libtext-markdown-discount-perl_0.18-1_amd64.deb ... 457s Unpacking libtext-markdown-discount-perl (0.18-1) ... 457s Selecting previously unselected package libdata-messagepack-perl. 457s Preparing to unpack .../248-libdata-messagepack-perl_1.02-1build5_amd64.deb ... 457s Unpacking libdata-messagepack-perl (1.02-1build5) ... 457s Selecting previously unselected package libtext-xslate-perl:amd64. 457s Preparing to unpack .../249-libtext-xslate-perl_3.5.9-2build1_amd64.deb ... 457s Unpacking libtext-xslate-perl:amd64 (3.5.9-2build1) ... 457s Selecting previously unselected package libtime-duration-perl. 457s Preparing to unpack .../250-libtime-duration-perl_1.21-2_all.deb ... 457s Unpacking libtime-duration-perl (1.21-2) ... 457s Selecting previously unselected package libtime-moment-perl. 457s Preparing to unpack .../251-libtime-moment-perl_0.44-2build5_amd64.deb ... 457s Unpacking libtime-moment-perl (0.44-2build5) ... 457s Selecting previously unselected package libunicode-utf8-perl. 457s Preparing to unpack .../252-libunicode-utf8-perl_0.62-2build4_amd64.deb ... 457s Unpacking libunicode-utf8-perl (0.62-2build4) ... 457s Selecting previously unselected package libcgi-pm-perl. 457s Preparing to unpack .../253-libcgi-pm-perl_4.67-1_all.deb ... 457s Unpacking libcgi-pm-perl (4.67-1) ... 457s Selecting previously unselected package libhtml-form-perl. 457s Preparing to unpack .../254-libhtml-form-perl_6.12-1_all.deb ... 457s Unpacking libhtml-form-perl (6.12-1) ... 457s Selecting previously unselected package libwww-mechanize-perl. 457s Preparing to unpack .../255-libwww-mechanize-perl_2.19-1ubuntu1_all.deb ... 457s Unpacking libwww-mechanize-perl (2.19-1ubuntu1) ... 457s Selecting previously unselected package libxml-namespacesupport-perl. 457s Preparing to unpack .../256-libxml-namespacesupport-perl_1.12-2_all.deb ... 457s Unpacking libxml-namespacesupport-perl (1.12-2) ... 457s Selecting previously unselected package libxml-sax-base-perl. 457s Preparing to unpack .../257-libxml-sax-base-perl_1.09-3_all.deb ... 457s Unpacking libxml-sax-base-perl (1.09-3) ... 457s Selecting previously unselected package libxml-sax-perl. 457s Preparing to unpack .../258-libxml-sax-perl_1.02+dfsg-4_all.deb ... 457s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 457s Selecting previously unselected package libxml-libxml-perl. 457s Preparing to unpack .../259-libxml-libxml-perl_2.0207+dfsg+really+2.0134-5build1_amd64.deb ... 457s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 457s Selecting previously unselected package lzip. 457s Preparing to unpack .../260-lzip_1.25-2_amd64.deb ... 457s Unpacking lzip (1.25-2) ... 457s Selecting previously unselected package lzop. 457s Preparing to unpack .../261-lzop_1.04-2build3_amd64.deb ... 457s Unpacking lzop (1.04-2build3) ... 457s Selecting previously unselected package patchutils. 457s Preparing to unpack .../262-patchutils_0.4.2-1build3_amd64.deb ... 457s Unpacking patchutils (0.4.2-1build3) ... 458s Selecting previously unselected package t1utils. 458s Preparing to unpack .../263-t1utils_1.41-4build3_amd64.deb ... 458s Unpacking t1utils (1.41-4build3) ... 458s Selecting previously unselected package unzip. 458s Preparing to unpack .../264-unzip_6.0-28ubuntu6_amd64.deb ... 458s Unpacking unzip (6.0-28ubuntu6) ... 458s Selecting previously unselected package lintian. 458s Preparing to unpack .../265-lintian_2.121.1+nmu1ubuntu2_all.deb ... 458s Unpacking lintian (2.121.1+nmu1ubuntu2) ... 458s Selecting previously unselected package libconfig-model-dpkg-perl. 458s Preparing to unpack .../266-libconfig-model-dpkg-perl_3.010_all.deb ... 458s Unpacking libconfig-model-dpkg-perl (3.010) ... 458s Selecting previously unselected package libconvert-binhex-perl. 458s Preparing to unpack .../267-libconvert-binhex-perl_1.125-3_all.deb ... 458s Unpacking libconvert-binhex-perl (1.125-3) ... 458s Selecting previously unselected package libnet-smtp-ssl-perl. 458s Preparing to unpack .../268-libnet-smtp-ssl-perl_1.04-2_all.deb ... 458s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 458s Selecting previously unselected package libmailtools-perl. 458s Preparing to unpack .../269-libmailtools-perl_2.22-1_all.deb ... 458s Unpacking libmailtools-perl (2.22-1) ... 458s Selecting previously unselected package libmime-tools-perl. 458s Preparing to unpack .../270-libmime-tools-perl_5.515-1_all.deb ... 458s Unpacking libmime-tools-perl (5.515-1) ... 458s Selecting previously unselected package libsuitesparseconfig7:amd64. 458s Preparing to unpack .../271-libsuitesparseconfig7_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libsuitesparseconfig7:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libamd3:amd64. 458s Preparing to unpack .../272-libamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libamd3:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libblas3:amd64. 458s Preparing to unpack .../273-libblas3_3.12.1-2_amd64.deb ... 458s Unpacking libblas3:amd64 (3.12.1-2) ... 458s Selecting previously unselected package libgfortran5:amd64. 458s Preparing to unpack .../274-libgfortran5_15-20250222-0ubuntu1_amd64.deb ... 458s Unpacking libgfortran5:amd64 (15-20250222-0ubuntu1) ... 458s Selecting previously unselected package liblapack3:amd64. 458s Preparing to unpack .../275-liblapack3_3.12.1-2_amd64.deb ... 458s Unpacking liblapack3:amd64 (3.12.1-2) ... 458s Selecting previously unselected package libarpack2t64:amd64. 458s Preparing to unpack .../276-libarpack2t64_3.9.1-4_amd64.deb ... 458s Unpacking libarpack2t64:amd64 (3.9.1-4) ... 458s Selecting previously unselected package libccolamd3:amd64. 458s Preparing to unpack .../277-libccolamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libccolamd3:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libcamd3:amd64. 458s Preparing to unpack .../278-libcamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libcamd3:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libcolamd3:amd64. 458s Preparing to unpack .../279-libcolamd3_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libcolamd3:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libcholmod5:amd64. 458s Preparing to unpack .../280-libcholmod5_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libcholmod5:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libcxsparse4:amd64. 458s Preparing to unpack .../281-libcxsparse4_1%3a7.8.3+dfsg-3_amd64.deb ... 458s Unpacking libcxsparse4:amd64 (1:7.8.3+dfsg-3) ... 458s Selecting previously unselected package libfftw3-double3:amd64. 458s Preparing to unpack .../282-libfftw3-double3_3.3.10-2fakesync1build1_amd64.deb ... 458s Unpacking libfftw3-double3:amd64 (3.3.10-2fakesync1build1) ... 458s Selecting previously unselected package libfftw3-single3:amd64. 459s Preparing to unpack .../283-libfftw3-single3_3.3.10-2fakesync1build1_amd64.deb ... 459s Unpacking libfftw3-single3:amd64 (3.3.10-2fakesync1build1) ... 459s Selecting previously unselected package libxfixes3:amd64. 459s Preparing to unpack .../284-libxfixes3_1%3a6.0.0-2build1_amd64.deb ... 459s Unpacking libxfixes3:amd64 (1:6.0.0-2build1) ... 459s Selecting previously unselected package libxcursor1:amd64. 459s Preparing to unpack .../285-libxcursor1_1%3a1.2.3-1_amd64.deb ... 459s Unpacking libxcursor1:amd64 (1:1.2.3-1) ... 459s Selecting previously unselected package libxft2:amd64. 459s Preparing to unpack .../286-libxft2_2.3.6-1build1_amd64.deb ... 459s Unpacking libxft2:amd64 (2.3.6-1build1) ... 459s Selecting previously unselected package libxinerama1:amd64. 459s Preparing to unpack .../287-libxinerama1_2%3a1.1.4-3build1_amd64.deb ... 459s Unpacking libxinerama1:amd64 (2:1.1.4-3build1) ... 459s Selecting previously unselected package libfltk1.3t64:amd64. 459s Preparing to unpack .../288-libfltk1.3t64_1.3.8-6.1build2_amd64.deb ... 459s Unpacking libfltk1.3t64:amd64 (1.3.8-6.1build2) ... 459s Selecting previously unselected package libglvnd0:amd64. 459s Preparing to unpack .../289-libglvnd0_1.7.0-1build1_amd64.deb ... 459s Unpacking libglvnd0:amd64 (1.7.0-1build1) ... 459s Selecting previously unselected package libx11-xcb1:amd64. 459s Preparing to unpack .../290-libx11-xcb1_2%3a1.8.10-2_amd64.deb ... 459s Unpacking libx11-xcb1:amd64 (2:1.8.10-2) ... 459s Selecting previously unselected package libxcb-dri3-0:amd64. 459s Preparing to unpack .../291-libxcb-dri3-0_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-dri3-0:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxcb-glx0:amd64. 459s Preparing to unpack .../292-libxcb-glx0_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-glx0:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxcb-present0:amd64. 459s Preparing to unpack .../293-libxcb-present0_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-present0:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxcb-xfixes0:amd64. 459s Preparing to unpack .../294-libxcb-xfixes0_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-xfixes0:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxxf86vm1:amd64. 459s Preparing to unpack .../295-libxxf86vm1_1%3a1.1.4-1build4_amd64.deb ... 459s Unpacking libxxf86vm1:amd64 (1:1.1.4-1build4) ... 459s Selecting previously unselected package libpciaccess0:amd64. 459s Preparing to unpack .../296-libpciaccess0_0.17-3build1_amd64.deb ... 459s Unpacking libpciaccess0:amd64 (0.17-3build1) ... 459s Selecting previously unselected package libdrm-intel1:amd64. 459s Preparing to unpack .../297-libdrm-intel1_2.4.123-1_amd64.deb ... 459s Unpacking libdrm-intel1:amd64 (2.4.123-1) ... 459s Selecting previously unselected package libxcb-randr0:amd64. 459s Preparing to unpack .../298-libxcb-randr0_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-randr0:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxcb-sync1:amd64. 459s Preparing to unpack .../299-libxcb-sync1_1.17.0-2_amd64.deb ... 459s Unpacking libxcb-sync1:amd64 (1.17.0-2) ... 459s Selecting previously unselected package libxshmfence1:amd64. 459s Preparing to unpack .../300-libxshmfence1_1.3-1build5_amd64.deb ... 459s Unpacking libxshmfence1:amd64 (1.3-1build5) ... 459s Selecting previously unselected package mesa-libgallium:amd64. 459s Preparing to unpack .../301-mesa-libgallium_25.0.1-2ubuntu1_amd64.deb ... 459s Unpacking mesa-libgallium:amd64 (25.0.1-2ubuntu1) ... 459s Selecting previously unselected package libwayland-server0:amd64. 459s Preparing to unpack .../302-libwayland-server0_1.23.1-3_amd64.deb ... 459s Unpacking libwayland-server0:amd64 (1.23.1-3) ... 459s Selecting previously unselected package libgbm1:amd64. 459s Preparing to unpack .../303-libgbm1_25.0.1-2ubuntu1_amd64.deb ... 459s Unpacking libgbm1:amd64 (25.0.1-2ubuntu1) ... 459s Selecting previously unselected package libvulkan1:amd64. 459s Preparing to unpack .../304-libvulkan1_1.4.304.0-1_amd64.deb ... 459s Unpacking libvulkan1:amd64 (1.4.304.0-1) ... 459s Selecting previously unselected package libgl1-mesa-dri:amd64. 459s Preparing to unpack .../305-libgl1-mesa-dri_25.0.1-2ubuntu1_amd64.deb ... 459s Unpacking libgl1-mesa-dri:amd64 (25.0.1-2ubuntu1) ... 459s Selecting previously unselected package libglx-mesa0:amd64. 459s Preparing to unpack .../306-libglx-mesa0_25.0.1-2ubuntu1_amd64.deb ... 459s Unpacking libglx-mesa0:amd64 (25.0.1-2ubuntu1) ... 459s Selecting previously unselected package libglx0:amd64. 459s Preparing to unpack .../307-libglx0_1.7.0-1build1_amd64.deb ... 459s Unpacking libglx0:amd64 (1.7.0-1build1) ... 459s Selecting previously unselected package libgl1:amd64. 459s Preparing to unpack .../308-libgl1_1.7.0-1build1_amd64.deb ... 459s Unpacking libgl1:amd64 (1.7.0-1build1) ... 459s Selecting previously unselected package libfltk-gl1.3t64:amd64. 459s Preparing to unpack .../309-libfltk-gl1.3t64_1.3.8-6.1build2_amd64.deb ... 459s Unpacking libfltk-gl1.3t64:amd64 (1.3.8-6.1build2) ... 460s Selecting previously unselected package libgl2ps1.4. 460s Preparing to unpack .../310-libgl2ps1.4_1.4.2+dfsg1-2build1_amd64.deb ... 460s Unpacking libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 460s Selecting previously unselected package libltdl7:amd64. 460s Preparing to unpack .../311-libltdl7_2.5.4-4_amd64.deb ... 460s Unpacking libltdl7:amd64 (2.5.4-4) ... 460s Selecting previously unselected package libglpk40:amd64. 460s Preparing to unpack .../312-libglpk40_5.0-1build2_amd64.deb ... 460s Unpacking libglpk40:amd64 (5.0-1build2) ... 460s Selecting previously unselected package libopengl0:amd64. 460s Preparing to unpack .../313-libopengl0_1.7.0-1build1_amd64.deb ... 460s Unpacking libopengl0:amd64 (1.7.0-1build1) ... 460s Selecting previously unselected package libglu1-mesa:amd64. 460s Preparing to unpack .../314-libglu1-mesa_9.0.2-1.1build1_amd64.deb ... 460s Unpacking libglu1-mesa:amd64 (9.0.2-1.1build1) ... 460s Selecting previously unselected package libhwy1t64:amd64. 460s Preparing to unpack .../315-libhwy1t64_1.2.0-3ubuntu3_amd64.deb ... 460s Unpacking libhwy1t64:amd64 (1.2.0-3ubuntu3) ... 460s Selecting previously unselected package liblcms2-2:amd64. 460s Preparing to unpack .../316-liblcms2-2_2.16-2_amd64.deb ... 460s Unpacking liblcms2-2:amd64 (2.16-2) ... 460s Selecting previously unselected package libjxl0.11:amd64. 460s Preparing to unpack .../317-libjxl0.11_0.11.1-1_amd64.deb ... 460s Unpacking libjxl0.11:amd64 (0.11.1-1) ... 460s Selecting previously unselected package libwmflite-0.2-7:amd64. 460s Preparing to unpack .../318-libwmflite-0.2-7_0.2.13-1.1build3_amd64.deb ... 460s Unpacking libwmflite-0.2-7:amd64 (0.2.13-1.1build3) ... 460s Selecting previously unselected package libgraphicsmagick-q16-3t64. 460s Preparing to unpack .../319-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17689-1_amd64.deb ... 460s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 460s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 460s Preparing to unpack .../320-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17689-1_amd64.deb ... 460s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 460s Selecting previously unselected package libaec0:amd64. 460s Preparing to unpack .../321-libaec0_1.1.3-1_amd64.deb ... 460s Unpacking libaec0:amd64 (1.1.3-1) ... 460s Selecting previously unselected package libsz2:amd64. 460s Preparing to unpack .../322-libsz2_1.1.3-1_amd64.deb ... 460s Unpacking libsz2:amd64 (1.1.3-1) ... 460s Selecting previously unselected package libhdf5-310:amd64. 460s Preparing to unpack .../323-libhdf5-310_1.14.5+repack-3_amd64.deb ... 460s Unpacking libhdf5-310:amd64 (1.14.5+repack-3) ... 460s Selecting previously unselected package libasound2-data. 460s Preparing to unpack .../324-libasound2-data_1.2.13-1build1_all.deb ... 460s Unpacking libasound2-data (1.2.13-1build1) ... 460s Selecting previously unselected package libasound2t64:amd64. 460s Preparing to unpack .../325-libasound2t64_1.2.13-1build1_amd64.deb ... 460s Unpacking libasound2t64:amd64 (1.2.13-1build1) ... 460s Selecting previously unselected package libopus0:amd64. 460s Preparing to unpack .../326-libopus0_1.5.2-2_amd64.deb ... 460s Unpacking libopus0:amd64 (1.5.2-2) ... 460s Selecting previously unselected package libsamplerate0:amd64. 460s Preparing to unpack .../327-libsamplerate0_0.2.2-4build1_amd64.deb ... 460s Unpacking libsamplerate0:amd64 (0.2.2-4build1) ... 460s Selecting previously unselected package libjack-jackd2-0:amd64. 460s Preparing to unpack .../328-libjack-jackd2-0_1.9.22~dfsg-4_amd64.deb ... 460s Unpacking libjack-jackd2-0:amd64 (1.9.22~dfsg-4) ... 460s Selecting previously unselected package libportaudio2:amd64. 460s Preparing to unpack .../329-libportaudio2_19.6.0-1.2build3_amd64.deb ... 460s Unpacking libportaudio2:amd64 (19.6.0-1.2build3) ... 460s Selecting previously unselected package libqhull-r8.0:amd64. 460s Preparing to unpack .../330-libqhull-r8.0_2020.2-6build1_amd64.deb ... 460s Unpacking libqhull-r8.0:amd64 (2020.2-6build1) ... 460s Selecting previously unselected package libqrupdate1:amd64. 460s Preparing to unpack .../331-libqrupdate1_1.1.5-1_amd64.deb ... 460s Unpacking libqrupdate1:amd64 (1.1.5-1) ... 460s Selecting previously unselected package libqscintilla2-qt6-l10n. 460s Preparing to unpack .../332-libqscintilla2-qt6-l10n_2.14.1+dfsg-1build4_all.deb ... 460s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 460s Selecting previously unselected package libb2-1:amd64. 460s Preparing to unpack .../333-libb2-1_0.98.1-1.1build1_amd64.deb ... 460s Unpacking libb2-1:amd64 (0.98.1-1.1build1) ... 460s Selecting previously unselected package libdouble-conversion3:amd64. 460s Preparing to unpack .../334-libdouble-conversion3_3.3.1-1_amd64.deb ... 460s Unpacking libdouble-conversion3:amd64 (3.3.1-1) ... 460s Selecting previously unselected package libpcre2-16-0:amd64. 460s Preparing to unpack .../335-libpcre2-16-0_10.45-1_amd64.deb ... 460s Unpacking libpcre2-16-0:amd64 (10.45-1) ... 460s Selecting previously unselected package libqt6core6t64:amd64. 460s Preparing to unpack .../336-libqt6core6t64_6.8.2+dfsg-5_amd64.deb ... 460s Unpacking libqt6core6t64:amd64 (6.8.2+dfsg-5) ... 460s Selecting previously unselected package libwayland-client0:amd64. 461s Preparing to unpack .../337-libwayland-client0_1.23.1-3_amd64.deb ... 461s Unpacking libwayland-client0:amd64 (1.23.1-3) ... 461s Selecting previously unselected package libegl-mesa0:amd64. 461s Preparing to unpack .../338-libegl-mesa0_25.0.1-2ubuntu1_amd64.deb ... 461s Unpacking libegl-mesa0:amd64 (25.0.1-2ubuntu1) ... 461s Selecting previously unselected package libegl1:amd64. 461s Preparing to unpack .../339-libegl1_1.7.0-1build1_amd64.deb ... 461s Unpacking libegl1:amd64 (1.7.0-1build1) ... 461s Selecting previously unselected package x11-common. 461s Preparing to unpack .../340-x11-common_1%3a7.7+23ubuntu3_all.deb ... 461s Unpacking x11-common (1:7.7+23ubuntu3) ... 461s Selecting previously unselected package libice6:amd64. 461s Preparing to unpack .../341-libice6_2%3a1.1.1-1_amd64.deb ... 461s Unpacking libice6:amd64 (2:1.1.1-1) ... 461s Selecting previously unselected package libmtdev1t64:amd64. 461s Preparing to unpack .../342-libmtdev1t64_1.1.7-1_amd64.deb ... 461s Unpacking libmtdev1t64:amd64 (1.1.7-1) ... 461s Selecting previously unselected package libwacom-common. 461s Preparing to unpack .../343-libwacom-common_2.14.0-1_all.deb ... 461s Unpacking libwacom-common (2.14.0-1) ... 461s Selecting previously unselected package libwacom9:amd64. 461s Preparing to unpack .../344-libwacom9_2.14.0-1_amd64.deb ... 461s Unpacking libwacom9:amd64 (2.14.0-1) ... 461s Selecting previously unselected package libinput-bin. 461s Preparing to unpack .../345-libinput-bin_1.27.1-1_amd64.deb ... 461s Unpacking libinput-bin (1.27.1-1) ... 461s Selecting previously unselected package libinput10:amd64. 461s Preparing to unpack .../346-libinput10_1.27.1-1_amd64.deb ... 461s Unpacking libinput10:amd64 (1.27.1-1) ... 461s Selecting previously unselected package libmd4c0:amd64. 461s Preparing to unpack .../347-libmd4c0_0.5.2-2_amd64.deb ... 461s Unpacking libmd4c0:amd64 (0.5.2-2) ... 461s Selecting previously unselected package libqt6dbus6:amd64. 461s Preparing to unpack .../348-libqt6dbus6_6.8.2+dfsg-5_amd64.deb ... 461s Unpacking libqt6dbus6:amd64 (6.8.2+dfsg-5) ... 461s Selecting previously unselected package libsm6:amd64. 461s Preparing to unpack .../349-libsm6_2%3a1.2.4-1_amd64.deb ... 461s Unpacking libsm6:amd64 (2:1.2.4-1) ... 461s Selecting previously unselected package libts0t64:amd64. 461s Preparing to unpack .../350-libts0t64_1.22-1.1build1_amd64.deb ... 461s Unpacking libts0t64:amd64 (1.22-1.1build1) ... 461s Selecting previously unselected package libxcb-util1:amd64. 461s Preparing to unpack .../351-libxcb-util1_0.4.1-1_amd64.deb ... 461s Unpacking libxcb-util1:amd64 (0.4.1-1) ... 461s Selecting previously unselected package libxcb-image0:amd64. 461s Preparing to unpack .../352-libxcb-image0_0.4.0-2build1_amd64.deb ... 461s Unpacking libxcb-image0:amd64 (0.4.0-2build1) ... 461s Selecting previously unselected package libxcb-render-util0:amd64. 461s Preparing to unpack .../353-libxcb-render-util0_0.3.10-1_amd64.deb ... 461s Unpacking libxcb-render-util0:amd64 (0.3.10-1) ... 461s Selecting previously unselected package libxcb-cursor0:amd64. 461s Preparing to unpack .../354-libxcb-cursor0_0.1.5-1_amd64.deb ... 461s Unpacking libxcb-cursor0:amd64 (0.1.5-1) ... 461s Selecting previously unselected package libxcb-icccm4:amd64. 461s Preparing to unpack .../355-libxcb-icccm4_0.4.2-1_amd64.deb ... 461s Unpacking libxcb-icccm4:amd64 (0.4.2-1) ... 461s Selecting previously unselected package libxcb-keysyms1:amd64. 461s Preparing to unpack .../356-libxcb-keysyms1_0.4.1-1_amd64.deb ... 461s Unpacking libxcb-keysyms1:amd64 (0.4.1-1) ... 461s Selecting previously unselected package libxcb-shape0:amd64. 461s Preparing to unpack .../357-libxcb-shape0_1.17.0-2_amd64.deb ... 461s Unpacking libxcb-shape0:amd64 (1.17.0-2) ... 461s Selecting previously unselected package libxcb-xinput0:amd64. 461s Preparing to unpack .../358-libxcb-xinput0_1.17.0-2_amd64.deb ... 461s Unpacking libxcb-xinput0:amd64 (1.17.0-2) ... 461s Selecting previously unselected package libxcb-xkb1:amd64. 461s Preparing to unpack .../359-libxcb-xkb1_1.17.0-2_amd64.deb ... 461s Unpacking libxcb-xkb1:amd64 (1.17.0-2) ... 461s Selecting previously unselected package libxkbcommon-x11-0:amd64. 461s Preparing to unpack .../360-libxkbcommon-x11-0_1.7.0-2_amd64.deb ... 461s Unpacking libxkbcommon-x11-0:amd64 (1.7.0-2) ... 461s Selecting previously unselected package libqt6gui6:amd64. 461s Preparing to unpack .../361-libqt6gui6_6.8.2+dfsg-5_amd64.deb ... 461s Unpacking libqt6gui6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libavahi-common-data:amd64. 462s Preparing to unpack .../362-libavahi-common-data_0.8-16ubuntu1_amd64.deb ... 462s Unpacking libavahi-common-data:amd64 (0.8-16ubuntu1) ... 462s Selecting previously unselected package libavahi-common3:amd64. 462s Preparing to unpack .../363-libavahi-common3_0.8-16ubuntu1_amd64.deb ... 462s Unpacking libavahi-common3:amd64 (0.8-16ubuntu1) ... 462s Selecting previously unselected package libavahi-client3:amd64. 462s Preparing to unpack .../364-libavahi-client3_0.8-16ubuntu1_amd64.deb ... 462s Unpacking libavahi-client3:amd64 (0.8-16ubuntu1) ... 462s Selecting previously unselected package libcups2t64:amd64. 462s Preparing to unpack .../365-libcups2t64_2.4.11-0ubuntu2_amd64.deb ... 462s Unpacking libcups2t64:amd64 (2.4.11-0ubuntu2) ... 462s Selecting previously unselected package libqt6widgets6:amd64. 462s Preparing to unpack .../366-libqt6widgets6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6widgets6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqt6printsupport6:amd64. 462s Preparing to unpack .../367-libqt6printsupport6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6printsupport6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqscintilla2-qt6-15:amd64. 462s Preparing to unpack .../368-libqscintilla2-qt6-15_2.14.1+dfsg-1build4_amd64.deb ... 462s Unpacking libqscintilla2-qt6-15:amd64 (2.14.1+dfsg-1build4) ... 462s Selecting previously unselected package libqt6core5compat6:amd64. 462s Preparing to unpack .../369-libqt6core5compat6_6.8.2-3_amd64.deb ... 462s Unpacking libqt6core5compat6:amd64 (6.8.2-3) ... 462s Selecting previously unselected package libqt6sql6:amd64. 462s Preparing to unpack .../370-libqt6sql6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6sql6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqt6help6:amd64. 462s Preparing to unpack .../371-libqt6help6_6.8.2-3_amd64.deb ... 462s Unpacking libqt6help6:amd64 (6.8.2-3) ... 462s Selecting previously unselected package libduktape207:amd64. 462s Preparing to unpack .../372-libduktape207_2.7.0+tests-0ubuntu3_amd64.deb ... 462s Unpacking libduktape207:amd64 (2.7.0+tests-0ubuntu3) ... 462s Selecting previously unselected package libproxy1v5:amd64. 462s Preparing to unpack .../373-libproxy1v5_0.5.9-1_amd64.deb ... 462s Unpacking libproxy1v5:amd64 (0.5.9-1) ... 462s Selecting previously unselected package libqt6network6:amd64. 462s Preparing to unpack .../374-libqt6network6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6network6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqt6opengl6:amd64. 462s Preparing to unpack .../375-libqt6opengl6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6opengl6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqt6openglwidgets6:amd64. 462s Preparing to unpack .../376-libqt6openglwidgets6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6openglwidgets6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libqt6xml6:amd64. 462s Preparing to unpack .../377-libqt6xml6_6.8.2+dfsg-5_amd64.deb ... 462s Unpacking libqt6xml6:amd64 (6.8.2+dfsg-5) ... 462s Selecting previously unselected package libogg0:amd64. 462s Preparing to unpack .../378-libogg0_1.3.5-3build1_amd64.deb ... 462s Unpacking libogg0:amd64 (1.3.5-3build1) ... 462s Selecting previously unselected package libflac12t64:amd64. 462s Preparing to unpack .../379-libflac12t64_1.4.3+ds-4_amd64.deb ... 462s Unpacking libflac12t64:amd64 (1.4.3+ds-4) ... 462s Selecting previously unselected package libmp3lame0:amd64. 462s Preparing to unpack .../380-libmp3lame0_3.100-6build1_amd64.deb ... 462s Unpacking libmp3lame0:amd64 (3.100-6build1) ... 462s Selecting previously unselected package libmpg123-0t64:amd64. 462s Preparing to unpack .../381-libmpg123-0t64_1.32.10-1_amd64.deb ... 462s Unpacking libmpg123-0t64:amd64 (1.32.10-1) ... 462s Selecting previously unselected package libvorbis0a:amd64. 462s Preparing to unpack .../382-libvorbis0a_1.3.7-2_amd64.deb ... 462s Unpacking libvorbis0a:amd64 (1.3.7-2) ... 462s Selecting previously unselected package libvorbisenc2:amd64. 462s Preparing to unpack .../383-libvorbisenc2_1.3.7-2_amd64.deb ... 462s Unpacking libvorbisenc2:amd64 (1.3.7-2) ... 462s Selecting previously unselected package libsndfile1:amd64. 462s Preparing to unpack .../384-libsndfile1_1.2.2-2_amd64.deb ... 462s Unpacking libsndfile1:amd64 (1.2.2-2) ... 462s Selecting previously unselected package libspqr4:amd64. 462s Preparing to unpack .../385-libspqr4_1%3a7.8.3+dfsg-3_amd64.deb ... 462s Unpacking libspqr4:amd64 (1:7.8.3+dfsg-3) ... 462s Selecting previously unselected package libumfpack6:amd64. 462s Preparing to unpack .../386-libumfpack6_1%3a7.8.3+dfsg-3_amd64.deb ... 462s Unpacking libumfpack6:amd64 (1:7.8.3+dfsg-3) ... 462s Selecting previously unselected package libtext-unidecode-perl. 462s Preparing to unpack .../387-libtext-unidecode-perl_1.30-3_all.deb ... 462s Unpacking libtext-unidecode-perl (1.30-3) ... 462s Selecting previously unselected package texinfo-lib. 463s Preparing to unpack .../388-texinfo-lib_7.1.1-1_amd64.deb ... 463s Unpacking texinfo-lib (7.1.1-1) ... 463s Selecting previously unselected package tex-common. 463s Preparing to unpack .../389-tex-common_6.19_all.deb ... 463s Unpacking tex-common (6.19) ... 463s Selecting previously unselected package texinfo. 463s Preparing to unpack .../390-texinfo_7.1.1-1_all.deb ... 463s Unpacking texinfo (7.1.1-1) ... 463s Selecting previously unselected package octave-common. 463s Preparing to unpack .../391-octave-common_9.4.0-1_all.deb ... 463s Unpacking octave-common (9.4.0-1) ... 463s Selecting previously unselected package octave. 463s Preparing to unpack .../392-octave_9.4.0-1_amd64.deb ... 463s Unpacking octave (9.4.0-1) ... 463s Selecting previously unselected package libncurses-dev:amd64. 463s Preparing to unpack .../393-libncurses-dev_6.5+20250216-2_amd64.deb ... 463s Unpacking libncurses-dev:amd64 (6.5+20250216-2) ... 463s Selecting previously unselected package libreadline-dev:amd64. 463s Preparing to unpack .../394-libreadline-dev_8.2-6_amd64.deb ... 463s Unpacking libreadline-dev:amd64 (8.2-6) ... 463s Selecting previously unselected package libhdf5-fortran-310:amd64. 463s Preparing to unpack .../395-libhdf5-fortran-310_1.14.5+repack-3_amd64.deb ... 463s Unpacking libhdf5-fortran-310:amd64 (1.14.5+repack-3) ... 463s Selecting previously unselected package libhdf5-hl-310:amd64. 463s Preparing to unpack .../396-libhdf5-hl-310_1.14.5+repack-3_amd64.deb ... 463s Unpacking libhdf5-hl-310:amd64 (1.14.5+repack-3) ... 463s Selecting previously unselected package libhdf5-hl-fortran-310:amd64. 463s Preparing to unpack .../397-libhdf5-hl-fortran-310_1.14.5+repack-3_amd64.deb ... 463s Unpacking libhdf5-hl-fortran-310:amd64 (1.14.5+repack-3) ... 463s Selecting previously unselected package libhdf5-cpp-310:amd64. 463s Preparing to unpack .../398-libhdf5-cpp-310_1.14.5+repack-3_amd64.deb ... 463s Unpacking libhdf5-cpp-310:amd64 (1.14.5+repack-3) ... 463s Selecting previously unselected package libhdf5-hl-cpp-310:amd64. 463s Preparing to unpack .../399-libhdf5-hl-cpp-310_1.14.5+repack-3_amd64.deb ... 463s Unpacking libhdf5-hl-cpp-310:amd64 (1.14.5+repack-3) ... 463s Selecting previously unselected package zlib1g-dev:amd64. 463s Preparing to unpack .../400-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_amd64.deb ... 463s Unpacking zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 463s Selecting previously unselected package libjpeg-turbo8-dev:amd64. 463s Preparing to unpack .../401-libjpeg-turbo8-dev_2.1.5-3ubuntu2_amd64.deb ... 463s Unpacking libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 463s Selecting previously unselected package libjpeg8-dev:amd64. 463s Preparing to unpack .../402-libjpeg8-dev_8c-2ubuntu11_amd64.deb ... 463s Unpacking libjpeg8-dev:amd64 (8c-2ubuntu11) ... 463s Selecting previously unselected package libjpeg-dev:amd64. 463s Preparing to unpack .../403-libjpeg-dev_8c-2ubuntu11_amd64.deb ... 463s Unpacking libjpeg-dev:amd64 (8c-2ubuntu11) ... 463s Selecting previously unselected package libaec-dev:amd64. 463s Preparing to unpack .../404-libaec-dev_1.1.3-1_amd64.deb ... 463s Unpacking libaec-dev:amd64 (1.1.3-1) ... 463s Selecting previously unselected package libbrotli-dev:amd64. 463s Preparing to unpack .../405-libbrotli-dev_1.1.0-2build4_amd64.deb ... 463s Unpacking libbrotli-dev:amd64 (1.1.0-2build4) ... 464s Selecting previously unselected package libidn2-dev:amd64. 464s Preparing to unpack .../406-libidn2-dev_2.3.7-2build2_amd64.deb ... 464s Unpacking libidn2-dev:amd64 (2.3.7-2build2) ... 464s Selecting previously unselected package comerr-dev:amd64. 464s Preparing to unpack .../407-comerr-dev_2.1-1.47.2-1ubuntu1_amd64.deb ... 464s Unpacking comerr-dev:amd64 (2.1-1.47.2-1ubuntu1) ... 464s Selecting previously unselected package libgssrpc4t64:amd64. 464s Preparing to unpack .../408-libgssrpc4t64_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking libgssrpc4t64:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package libkadm5clnt-mit12:amd64. 464s Preparing to unpack .../409-libkadm5clnt-mit12_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking libkadm5clnt-mit12:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package libkdb5-10t64:amd64. 464s Preparing to unpack .../410-libkdb5-10t64_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking libkdb5-10t64:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package libkadm5srv-mit12:amd64. 464s Preparing to unpack .../411-libkadm5srv-mit12_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking libkadm5srv-mit12:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package krb5-multidev:amd64. 464s Preparing to unpack .../412-krb5-multidev_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking krb5-multidev:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package libkrb5-dev:amd64. 464s Preparing to unpack .../413-libkrb5-dev_1.21.3-4ubuntu2_amd64.deb ... 464s Unpacking libkrb5-dev:amd64 (1.21.3-4ubuntu2) ... 464s Selecting previously unselected package libldap-dev:amd64. 464s Preparing to unpack .../414-libldap-dev_2.6.9+dfsg-1~exp2ubuntu1_amd64.deb ... 464s Unpacking libldap-dev:amd64 (2.6.9+dfsg-1~exp2ubuntu1) ... 464s Selecting previously unselected package libpkgconf3:amd64. 464s Preparing to unpack .../415-libpkgconf3_1.8.1-4_amd64.deb ... 464s Unpacking libpkgconf3:amd64 (1.8.1-4) ... 464s Selecting previously unselected package pkgconf-bin. 464s Preparing to unpack .../416-pkgconf-bin_1.8.1-4_amd64.deb ... 464s Unpacking pkgconf-bin (1.8.1-4) ... 464s Selecting previously unselected package pkgconf:amd64. 464s Preparing to unpack .../417-pkgconf_1.8.1-4_amd64.deb ... 464s Unpacking pkgconf:amd64 (1.8.1-4) ... 464s Selecting previously unselected package libnghttp2-dev:amd64. 464s Preparing to unpack .../418-libnghttp2-dev_1.64.0-1_amd64.deb ... 464s Unpacking libnghttp2-dev:amd64 (1.64.0-1) ... 464s Selecting previously unselected package libpsl-dev:amd64. 464s Preparing to unpack .../419-libpsl-dev_0.21.2-1.1build1_amd64.deb ... 464s Unpacking libpsl-dev:amd64 (0.21.2-1.1build1) ... 464s Selecting previously unselected package libgmpxx4ldbl:amd64. 464s Preparing to unpack .../420-libgmpxx4ldbl_2%3a6.3.0+dfsg-3ubuntu1_amd64.deb ... 464s Unpacking libgmpxx4ldbl:amd64 (2:6.3.0+dfsg-3ubuntu1) ... 464s Selecting previously unselected package libgmp-dev:amd64. 464s Preparing to unpack .../421-libgmp-dev_2%3a6.3.0+dfsg-3ubuntu1_amd64.deb ... 464s Unpacking libgmp-dev:amd64 (2:6.3.0+dfsg-3ubuntu1) ... 464s Selecting previously unselected package libevent-2.1-7t64:amd64. 464s Preparing to unpack .../422-libevent-2.1-7t64_2.1.12-stable-10_amd64.deb ... 464s Unpacking libevent-2.1-7t64:amd64 (2.1.12-stable-10) ... 464s Selecting previously unselected package libunbound8:amd64. 464s Preparing to unpack .../423-libunbound8_1.22.0-1ubuntu1_amd64.deb ... 464s Unpacking libunbound8:amd64 (1.22.0-1ubuntu1) ... 464s Selecting previously unselected package libgnutls-dane0t64:amd64. 464s Preparing to unpack .../424-libgnutls-dane0t64_3.8.9-2ubuntu2_amd64.deb ... 464s Unpacking libgnutls-dane0t64:amd64 (3.8.9-2ubuntu2) ... 464s Selecting previously unselected package libgnutls-openssl27t64:amd64. 464s Preparing to unpack .../425-libgnutls-openssl27t64_3.8.9-2ubuntu2_amd64.deb ... 464s Unpacking libgnutls-openssl27t64:amd64 (3.8.9-2ubuntu2) ... 464s Selecting previously unselected package libp11-kit-dev:amd64. 464s Preparing to unpack .../426-libp11-kit-dev_0.25.5-2ubuntu3_amd64.deb ... 464s Unpacking libp11-kit-dev:amd64 (0.25.5-2ubuntu3) ... 464s Selecting previously unselected package libtasn1-6-dev:amd64. 464s Preparing to unpack .../427-libtasn1-6-dev_4.20.0-2_amd64.deb ... 464s Unpacking libtasn1-6-dev:amd64 (4.20.0-2) ... 464s Selecting previously unselected package nettle-dev:amd64. 464s Preparing to unpack .../428-nettle-dev_3.10.1-1_amd64.deb ... 464s Unpacking nettle-dev:amd64 (3.10.1-1) ... 464s Selecting previously unselected package libgnutls28-dev:amd64. 464s Preparing to unpack .../429-libgnutls28-dev_3.8.9-2ubuntu2_amd64.deb ... 464s Unpacking libgnutls28-dev:amd64 (3.8.9-2ubuntu2) ... 464s Selecting previously unselected package librtmp-dev:amd64. 464s Preparing to unpack .../430-librtmp-dev_2.4+20151223.gitfa8646d.1-2build7_amd64.deb ... 464s Unpacking librtmp-dev:amd64 (2.4+20151223.gitfa8646d.1-2build7) ... 464s Selecting previously unselected package libssl-dev:amd64. 464s Preparing to unpack .../431-libssl-dev_3.4.1-1ubuntu1_amd64.deb ... 464s Unpacking libssl-dev:amd64 (3.4.1-1ubuntu1) ... 464s Selecting previously unselected package libssh2-1-dev:amd64. 465s Preparing to unpack .../432-libssh2-1-dev_1.11.1-1_amd64.deb ... 465s Unpacking libssh2-1-dev:amd64 (1.11.1-1) ... 465s Selecting previously unselected package libzstd-dev:amd64. 465s Preparing to unpack .../433-libzstd-dev_1.5.6+dfsg-2_amd64.deb ... 465s Unpacking libzstd-dev:amd64 (1.5.6+dfsg-2) ... 465s Selecting previously unselected package libcurl4-openssl-dev:amd64. 465s Preparing to unpack .../434-libcurl4-openssl-dev_8.12.1-3ubuntu1_amd64.deb ... 465s Unpacking libcurl4-openssl-dev:amd64 (8.12.1-3ubuntu1) ... 465s Selecting previously unselected package hdf5-helpers. 465s Preparing to unpack .../435-hdf5-helpers_1.14.5+repack-3_amd64.deb ... 465s Unpacking hdf5-helpers (1.14.5+repack-3) ... 465s Selecting previously unselected package libhdf5-dev. 465s Preparing to unpack .../436-libhdf5-dev_1.14.5+repack-3_amd64.deb ... 465s Unpacking libhdf5-dev (1.14.5+repack-3) ... 465s Selecting previously unselected package xorg-sgml-doctools. 465s Preparing to unpack .../437-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ... 465s Unpacking xorg-sgml-doctools (1:1.11-1.1) ... 465s Selecting previously unselected package x11proto-dev. 465s Preparing to unpack .../438-x11proto-dev_2024.1-1_all.deb ... 465s Unpacking x11proto-dev (2024.1-1) ... 465s Selecting previously unselected package libxau-dev:amd64. 465s Preparing to unpack .../439-libxau-dev_1%3a1.0.11-1_amd64.deb ... 465s Unpacking libxau-dev:amd64 (1:1.0.11-1) ... 465s Selecting previously unselected package libxdmcp-dev:amd64. 465s Preparing to unpack .../440-libxdmcp-dev_1%3a1.1.5-1_amd64.deb ... 465s Unpacking libxdmcp-dev:amd64 (1:1.1.5-1) ... 465s Selecting previously unselected package xtrans-dev. 465s Preparing to unpack .../441-xtrans-dev_1.4.0-1_all.deb ... 465s Unpacking xtrans-dev (1.4.0-1) ... 465s Selecting previously unselected package libxcb1-dev:amd64. 465s Preparing to unpack .../442-libxcb1-dev_1.17.0-2_amd64.deb ... 465s Unpacking libxcb1-dev:amd64 (1.17.0-2) ... 465s Selecting previously unselected package libx11-dev:amd64. 465s Preparing to unpack .../443-libx11-dev_2%3a1.8.10-2_amd64.deb ... 465s Unpacking libx11-dev:amd64 (2:1.8.10-2) ... 465s Selecting previously unselected package libglx-dev:amd64. 465s Preparing to unpack .../444-libglx-dev_1.7.0-1build1_amd64.deb ... 465s Unpacking libglx-dev:amd64 (1.7.0-1build1) ... 465s Selecting previously unselected package libgl-dev:amd64. 465s Preparing to unpack .../445-libgl-dev_1.7.0-1build1_amd64.deb ... 465s Unpacking libgl-dev:amd64 (1.7.0-1build1) ... 465s Selecting previously unselected package libblas-dev:amd64. 465s Preparing to unpack .../446-libblas-dev_3.12.1-2_amd64.deb ... 465s Unpacking libblas-dev:amd64 (3.12.1-2) ... 465s Selecting previously unselected package liblapack-dev:amd64. 465s Preparing to unpack .../447-liblapack-dev_3.12.1-2_amd64.deb ... 465s Unpacking liblapack-dev:amd64 (3.12.1-2) ... 465s Selecting previously unselected package libfftw3-long3:amd64. 465s Preparing to unpack .../448-libfftw3-long3_3.3.10-2fakesync1build1_amd64.deb ... 465s Unpacking libfftw3-long3:amd64 (3.3.10-2fakesync1build1) ... 465s Selecting previously unselected package libfftw3-quad3:amd64. 465s Preparing to unpack .../449-libfftw3-quad3_3.3.10-2fakesync1build1_amd64.deb ... 465s Unpacking libfftw3-quad3:amd64 (3.3.10-2fakesync1build1) ... 465s Selecting previously unselected package libfftw3-bin. 465s Preparing to unpack .../450-libfftw3-bin_3.3.10-2fakesync1build1_amd64.deb ... 465s Unpacking libfftw3-bin (3.3.10-2fakesync1build1) ... 465s Selecting previously unselected package libfftw3-dev:amd64. 465s Preparing to unpack .../451-libfftw3-dev_3.3.10-2fakesync1build1_amd64.deb ... 465s Unpacking libfftw3-dev:amd64 (3.3.10-2fakesync1build1) ... 465s Selecting previously unselected package libgfortran-14-dev:amd64. 465s Preparing to unpack .../452-libgfortran-14-dev_14.2.0-17ubuntu3_amd64.deb ... 465s Unpacking libgfortran-14-dev:amd64 (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package gfortran-14-x86-64-linux-gnu. 466s Preparing to unpack .../453-gfortran-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 466s Unpacking gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package gfortran-14. 466s Preparing to unpack .../454-gfortran-14_14.2.0-17ubuntu3_amd64.deb ... 466s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package gfortran-x86-64-linux-gnu. 466s Preparing to unpack .../455-gfortran-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 466s Unpacking gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 466s Selecting previously unselected package gfortran. 466s Preparing to unpack .../456-gfortran_4%3a14.2.0-1ubuntu1_amd64.deb ... 466s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 466s Selecting previously unselected package libstdc++-14-dev:amd64. 466s Preparing to unpack .../457-libstdc++-14-dev_14.2.0-17ubuntu3_amd64.deb ... 466s Unpacking libstdc++-14-dev:amd64 (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package g++-14-x86-64-linux-gnu. 466s Preparing to unpack .../458-g++-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 466s Unpacking g++-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package g++-14. 466s Preparing to unpack .../459-g++-14_14.2.0-17ubuntu3_amd64.deb ... 466s Unpacking g++-14 (14.2.0-17ubuntu3) ... 466s Selecting previously unselected package g++-x86-64-linux-gnu. 466s Preparing to unpack .../460-g++-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 466s Unpacking g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 466s Selecting previously unselected package g++. 466s Preparing to unpack .../461-g++_4%3a14.2.0-1ubuntu1_amd64.deb ... 466s Unpacking g++ (4:14.2.0-1ubuntu1) ... 466s Selecting previously unselected package octave-dev. 466s Preparing to unpack .../462-octave-dev_9.4.0-1_amd64.deb ... 466s Unpacking octave-dev (9.4.0-1) ... 466s Selecting previously unselected package dh-octave. 466s Preparing to unpack .../463-dh-octave_1.8.0_all.deb ... 466s Unpacking dh-octave (1.8.0) ... 466s Selecting previously unselected package libfontenc1:amd64. 466s Preparing to unpack .../464-libfontenc1_1%3a1.1.8-1build1_amd64.deb ... 466s Unpacking libfontenc1:amd64 (1:1.1.8-1build1) ... 466s Selecting previously unselected package libxt6t64:amd64. 466s Preparing to unpack .../465-libxt6t64_1%3a1.2.1-1.2build1_amd64.deb ... 466s Unpacking libxt6t64:amd64 (1:1.2.1-1.2build1) ... 466s Selecting previously unselected package libxmu6:amd64. 466s Preparing to unpack .../466-libxmu6_2%3a1.1.3-3build2_amd64.deb ... 466s Unpacking libxmu6:amd64 (2:1.1.3-3build2) ... 466s Selecting previously unselected package libxaw7:amd64. 467s Preparing to unpack .../467-libxaw7_2%3a1.0.16-1_amd64.deb ... 467s Unpacking libxaw7:amd64 (2:1.0.16-1) ... 467s Selecting previously unselected package libxfont2:amd64. 467s Preparing to unpack .../468-libxfont2_1%3a2.0.6-1build1_amd64.deb ... 467s Unpacking libxfont2:amd64 (1:2.0.6-1build1) ... 467s Selecting previously unselected package libxkbfile1:amd64. 467s Preparing to unpack .../469-libxkbfile1_1%3a1.1.0-1build4_amd64.deb ... 467s Unpacking libxkbfile1:amd64 (1:1.1.0-1build4) ... 467s Selecting previously unselected package libxrandr2:amd64. 467s Preparing to unpack .../470-libxrandr2_2%3a1.5.4-1_amd64.deb ... 467s Unpacking libxrandr2:amd64 (2:1.5.4-1) ... 467s Selecting previously unselected package octave-io. 467s Preparing to unpack .../471-octave-io_2.6.4-3build2_amd64.deb ... 467s Unpacking octave-io (2.6.4-3build2) ... 467s Selecting previously unselected package octave-statistics-common. 467s Preparing to unpack .../472-octave-statistics-common_1.7.3-2_all.deb ... 467s Unpacking octave-statistics-common (1.7.3-2) ... 467s Selecting previously unselected package octave-statistics. 467s Preparing to unpack .../473-octave-statistics_1.7.3-2_amd64.deb ... 467s Unpacking octave-statistics (1.7.3-2) ... 467s Selecting previously unselected package x11-xkb-utils. 467s Preparing to unpack .../474-x11-xkb-utils_7.7+9_amd64.deb ... 467s Unpacking x11-xkb-utils (7.7+9) ... 467s Selecting previously unselected package xserver-common. 467s Preparing to unpack .../475-xserver-common_2%3a21.1.16-1ubuntu1_all.deb ... 467s Unpacking xserver-common (2:21.1.16-1ubuntu1) ... 467s Selecting previously unselected package xvfb. 467s Preparing to unpack .../476-xvfb_2%3a21.1.16-1ubuntu1_amd64.deb ... 467s Unpacking xvfb (2:21.1.16-1ubuntu1) ... 467s Setting up libapt-pkg-perl (0.1.41build1) ... 467s Setting up libhwy1t64:amd64 (1.2.0-3ubuntu3) ... 467s Setting up libmodule-pluggable-perl (5.2-5) ... 467s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 467s Setting up libstring-escape-perl (2010.002-3) ... 467s Setting up libgnutls-openssl27t64:amd64 (3.8.9-2ubuntu2) ... 467s Setting up libxcb-dri3-0:amd64 (1.17.0-2) ... 467s Setting up liblcms2-2:amd64 (2.16-2) ... 467s Setting up libberkeleydb-perl:amd64 (0.66-1) ... 467s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 467s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 467s Setting up libwayland-server0:amd64 (1.23.1-3) ... 467s Setting up libaom3:amd64 (3.12.0-1) ... 467s Setting up libx11-xcb1:amd64 (2:1.8.10-2) ... 467s Setting up libpciaccess0:amd64 (0.17-3build1) ... 467s Setting up libfile-which-perl (1.27-2) ... 467s Setting up libdouble-conversion3:amd64 (3.3.1-1) ... 467s Setting up libncurses-dev:amd64 (6.5+20250216-2) ... 467s Setting up libunicode-utf8-perl (0.62-2build4) ... 467s Setting up libset-intspan-perl (1.19-3) ... 467s Setting up libxcb-xfixes0:amd64 (1.17.0-2) ... 467s Setting up libogg0:amd64 (1.3.5-3build1) ... 467s Setting up libmouse-perl:amd64 (2.5.11-1build1) ... 467s Setting up libzstd-dev:amd64 (1.5.6+dfsg-2) ... 467s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 467s Setting up libpod-pom-perl (2.01-4) ... 467s Setting up libxpm4:amd64 (1:3.5.17-1build2) ... 467s Setting up hdf5-helpers (1.14.5+repack-3) ... 467s Setting up libwmflite-0.2-7:amd64 (0.2.13-1.1build3) ... 467s Setting up libregexp-pattern-perl (0.2.14-2) ... 467s Setting up libdata-messagepack-perl (1.02-1build5) ... 467s Setting up libclass-inspector-perl (1.36-3) ... 467s Setting up libxcb-xinput0:amd64 (1.17.0-2) ... 467s Setting up libxrender1:amd64 (1:0.9.10-1.1build1) ... 467s Setting up libdynaloader-functions-perl (0.004-1) ... 467s Setting up libdatrie1:amd64 (0.2.13-3build1) ... 467s Setting up libtext-glob-perl (0.11-3) ... 467s Setting up libclass-method-modifiers-perl (2.15-1) ... 467s Setting up liblist-compare-perl (0.55-2) ... 467s Setting up libxcb-render0:amd64 (1.17.0-2) ... 467s Setting up libclone-perl:amd64 (0.47-1) ... 467s Setting up libarchive-zip-perl (1.68-1) ... 467s Setting up libsub-identify-perl (0.14-3build4) ... 467s Setting up libcpanel-json-xs-perl:amd64 (4.39-1) ... 467s Setting up libglvnd0:amd64 (1.7.0-1build1) ... 467s Setting up libio-stringy-perl (2.113-2) ... 467s Setting up libhtml-tagset-perl (3.24-1) ... 467s Setting up libts0t64:amd64 (1.22-1.1build1) ... 467s Setting up liblog-any-perl (1.717-1) ... 467s Setting up libyaml-pp-perl (0.39.0-1) ... 467s Setting up libxcb-glx0:amd64 (1.17.0-2) ... 467s Setting up libdevel-size-perl (0.84-1build1) ... 467s Setting up unzip (6.0-28ubuntu6) ... 467s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 467s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 467s Setting up libconvert-binhex-perl (1.125-3) ... 467s Setting up libdrm-intel1:amd64 (2.4.123-1) ... 467s Setting up liblwp-mediatypes-perl (6.04-2) ... 467s Setting up libyaml-libyaml-perl (0.903.0+ds-1) ... 467s Setting up fonts-freefont-otf (20211204+svn4273-2) ... 467s Setting up libio-interactive-perl (1.026-1) ... 467s Setting up libxcb-keysyms1:amd64 (0.4.1-1) ... 467s Setting up libxcb-shape0:amd64 (1.17.0-2) ... 467s Setting up x11-common (1:7.7+23ubuntu3) ... 467s Setting up libtry-tiny-perl (0.32-1) ... 467s Setting up libdeflate0:amd64 (1.23-1) ... 467s Setting up perl-openssl-defaults:amd64 (7build3) ... 467s Setting up libmldbm-perl (2.05-4) ... 467s Setting up libxml-namespacesupport-perl (1.12-2) ... 467s Setting up m4 (1.4.19-7) ... 467s Setting up libevent-2.1-7t64:amd64 (2.1.12-stable-10) ... 467s Setting up libclone-choose-perl (0.010-2) ... 467s Setting up libqhull-r8.0:amd64 (2020.2-6build1) ... 467s Setting up libxcb-render-util0:amd64 (0.3.10-1) ... 467s Setting up libtime-moment-perl (0.44-2build5) ... 467s Setting up libencode-locale-perl (1.05-3) ... 467s Setting up libxcb-shm0:amd64 (1.17.0-2) ... 467s Setting up libxcb-icccm4:amd64 (0.4.2-1) ... 467s Setting up texinfo-lib (7.1.1-1) ... 467s Setting up libreadline-dev:amd64 (8.2-6) ... 467s Setting up libmpg123-0t64:amd64 (1.32.10-1) ... 467s Setting up libgomp1:amd64 (15-20250222-0ubuntu1) ... 467s Setting up libconfig-tiny-perl (2.30-1) ... 467s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 467s Setting up liblist-utilsby-perl (0.12-2) ... 467s Setting up libyaml-tiny-perl (1.76-1) ... 467s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 467s Setting up octave-common (9.4.0-1) ... 467s Setting up libregexp-common-perl (2024080801-1) ... 467s Setting up libpcre2-16-0:amd64 (10.45-1) ... 467s Setting up libaec0:amd64 (1.1.3-1) ... 467s Setting up libnet-netmask-perl (2.0002-2) ... 467s Setting up libopengl0:amd64 (1.7.0-1build1) ... 467s Setting up libsub-install-perl (0.929-1) ... 467s Setting up libxcb-util1:amd64 (0.4.1-1) ... 467s Setting up libpsl-dev:amd64 (0.21.2-1.1build1) ... 467s Setting up libxxf86vm1:amd64 (1:1.1.4-1build4) ... 467s Setting up libindirect-perl (0.39-2build5) ... 467s Setting up libxcb-xkb1:amd64 (1.17.0-2) ... 467s Setting up libxcb-image0:amd64 (0.4.0-2build1) ... 467s Setting up libnumber-compare-perl (0.03-3) ... 467s Setting up libxcb-present0:amd64 (1.17.0-2) ... 467s Setting up liberror-perl (0.17030-1) ... 467s Setting up libasound2-data (1.2.13-1build1) ... 467s Setting up patchutils (0.4.2-1build3) ... 467s Setting up tex-common (6.19) ... 467s update-language: texlive-base not installed and configured, doing nothing! 467s Setting up libjson-maybexs-perl (1.004008-1) ... 467s Setting up libxml-sax-base-perl (1.09-3) ... 467s Setting up libio-string-perl (1.08-4) ... 467s Setting up libboolean-perl (0.46-3) ... 467s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 467s Setting up xtrans-dev (1.4.0-1) ... 467s Setting up libfontenc1:amd64 (1:1.1.8-1build1) ... 467s Setting up autotools-dev (20220109.1) ... 467s Setting up libblas3:amd64 (3.12.1-2) ... 468s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 468s Setting up libclass-data-inheritable-perl (0.10-1) ... 468s Setting up libunbound8:amd64 (1.22.0-1ubuntu1) ... 468s Setting up libpkgconf3:amd64 (1.8.1-4) ... 468s Setting up libgmpxx4ldbl:amd64 (2:6.3.0+dfsg-3ubuntu1) ... 468s Setting up libalgorithm-c3-perl (0.11-2) ... 468s Setting up libasound2t64:amd64 (1.2.13-1build1) ... 468s Setting up liblog-log4perl-perl (1.57-1) ... 468s Setting up libtext-reform-perl (1.20-5) ... 468s Setting up libgnutls-dane0t64:amd64 (3.8.9-2ubuntu2) ... 468s Setting up libfile-find-rule-perl (0.34-3) ... 468s Setting up libxfixes3:amd64 (1:6.0.0-2build1) ... 468s Setting up libxcb-sync1:amd64 (1.17.0-2) ... 468s Setting up libipc-system-simple-perl (1.30-2) ... 468s Setting up libio-tiecombine-perl (1.005-3) ... 468s Setting up libnet-domain-tld-perl (1.75-4) ... 468s Setting up libgssrpc4t64:amd64 (1.21.3-4ubuntu2) ... 468s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 468s Setting up libldap-dev:amd64 (2.6.9+dfsg-1~exp2ubuntu1) ... 468s Setting up aglfn (1.7+git20191031.4036a9c-2) ... 468s Setting up libxcb-cursor0:amd64 (0.1.5-1) ... 468s Setting up lzip (1.25-2) ... 468s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 468s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 468s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 468s Setting up libavahi-common-data:amd64 (0.8-16ubuntu1) ... 468s Setting up libopus0:amd64 (1.5.2-2) ... 468s Setting up t1utils (1.41-4build3) ... 468s Setting up libquadmath0:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libxinerama1:amd64 (2:1.1.4-3build1) ... 468s Setting up diffstat (1.67-1) ... 468s Setting up libimagequant0:amd64 (2.18.0-1build1) ... 468s Setting up comerr-dev:amd64 (2.1-1.47.2-1ubuntu1) ... 468s Setting up libxkbcommon-x11-0:amd64 (1.7.0-2) ... 468s Setting up fonts-dejavu-mono (2.37-8) ... 468s Setting up libssl-dev:amd64 (3.4.1-1ubuntu1) ... 468s Setting up libmpc3:amd64 (1.3.1-1build2) ... 468s Setting up libvorbis0a:amd64 (1.3.7-2) ... 468s Setting up libvariable-magic-perl (0.64-1build1) ... 468s Setting up libio-html-perl (1.004-3) ... 468s Setting up libxrandr2:amd64 (2:1.5.4-1) ... 468s Setting up libtext-template-perl (1.61-1) ... 468s Setting up libpod-parser-perl (1.67-1) ... 468s Setting up autopoint (0.23.1-1) ... 468s Setting up libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 468s Setting up fonts-dejavu-core (2.37-8) ... 468s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 468s Setting up pkgconf-bin (1.8.1-4) ... 468s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 468s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-1build4) ... 468s Setting up libltdl7:amd64 (2.5.4-4) ... 468s Setting up libidn2-dev:amd64 (2.3.7-2build2) ... 468s Setting up libfftw3-double3:amd64 (3.3.10-2fakesync1build1) ... 468s Setting up libparams-util-perl (1.102-3build1) ... 468s Setting up libgfortran5:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libvulkan1:amd64 (1.4.304.0-1) ... 468s Setting up libtime-duration-perl (1.21-2) ... 468s Setting up autoconf (2.72-3ubuntu1) ... 468s Setting up libtext-xslate-perl:amd64 (3.5.9-2build1) ... 468s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 468s Setting up libwebp7:amd64 (1.5.0-0.1) ... 468s Setting up libarray-intspan-perl (2.004-2) ... 468s Setting up libcapture-tiny-perl (0.50-1) ... 468s Setting up libtimedate-perl (2.3300-2) ... 468s Setting up libexporter-lite-perl (0.09-2) ... 468s Setting up libubsan1:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libsub-name-perl:amd64 (0.28-1) ... 468s Setting up zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 468s Setting up dwz (0.15-1build6) ... 468s Setting up libdata-validate-domain-perl (0.15-1) ... 468s Setting up libproc-processtable-perl:amd64 (0.636-1build4) ... 468s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 468s Setting up libmtdev1t64:amd64 (1.1.7-1) ... 468s Setting up libduktape207:amd64 (2.7.0+tests-0ubuntu3) ... 468s Setting up libxshmfence1:amd64 (1.3-1build5) ... 468s Setting up libhwasan0:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libxcb-randr0:amd64 (1.17.0-2) ... 468s Setting up libpath-tiny-perl (0.146-1) ... 468s Setting up libasan8:amd64 (15-20250222-0ubuntu1) ... 468s Setting up lzop (1.04-2build3) ... 468s Setting up libjson-perl (4.10000-1) ... 468s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 468s Setting up librole-tiny-perl (2.002004-1) ... 468s Setting up debugedit (1:5.1-2) ... 468s Setting up libipc-run3-perl (0.049-1) ... 468s Setting up libmd4c0:amd64 (0.5.2-2) ... 468s Setting up libregexp-wildcards-perl (1.05-3) ... 468s Setting up libmousex-strictconstructor-perl (0.02-3) ... 468s Setting up libfile-sharedir-perl (1.118-3) ... 468s Setting up libsub-uplevel-perl (0.2800-3) ... 468s Setting up libsuitesparseconfig7:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up liblua5.4-0:amd64 (5.4.7-1) ... 468s Setting up libaliased-perl (0.34-3) ... 468s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 468s Setting up libthai-data (0.1.29-2build1) ... 468s Setting up xorg-sgml-doctools (1:1.11-1.1) ... 468s Setting up libstrictures-perl (2.000006-1) ... 468s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 468s Setting up libdevel-stacktrace-perl (2.0500-1) ... 468s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 468s Setting up libtext-autoformat-perl (1.750000-2) ... 468s Setting up libglu1-mesa:amd64 (9.0.2-1.1build1) ... 468s Setting up libflac12t64:amd64 (1.4.3+ds-4) ... 468s Setting up libtoml-tiny-perl (0.19-1) ... 468s Setting up libstemmer0d:amd64 (2.2.0-4build1) ... 468s Setting up libxkbfile1:amd64 (1:1.1.0-1build4) ... 468s Setting up libsort-versions-perl (1.62-3) ... 468s Setting up libtsan2:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libexporter-tiny-perl (1.006002-1) ... 468s Setting up libterm-readkey-perl (2.38-2build5) ... 468s Setting up libisl23:amd64 (0.27-1) ... 468s Setting up libtext-unidecode-perl (1.30-3) ... 468s Setting up libde265-0:amd64 (1.0.15-1build5) ... 468s Setting up libfont-ttf-perl (1.06-2) ... 468s Setting up libfile-homedir-perl (1.006-2) ... 468s Setting up libsamplerate0:amd64 (0.2.2-4build1) ... 468s Setting up libtasn1-6-dev:amd64 (4.20.0-2) ... 468s Setting up libwebpmux3:amd64 (1.5.0-0.1) ... 468s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 468s Setting up libperlio-gzip-perl (0.20-1build5) ... 468s Setting up libjxl0.11:amd64 (0.11.1-1) ... 468s Setting up libxfont2:amd64 (1:2.0.6-1build1) ... 468s Setting up libhtml-html5-entities-perl (0.004-3) ... 468s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 468s Setting up libsereal-decoder-perl (5.004+ds-1build4) ... 468s Setting up libmarkdown2:amd64 (2.2.7-2.1) ... 468s Setting up libcc1-0:amd64 (15-20250222-0ubuntu1) ... 468s Setting up liburi-perl (5.30-1) ... 468s Setting up libnet-ipv6addr-perl (1.02-1) ... 468s Setting up libbrotli-dev:amd64 (1.1.0-2build4) ... 468s Setting up liblsan0:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libp11-kit-dev:amd64 (0.25.5-2ubuntu3) ... 468s Setting up libmp3lame0:amd64 (3.100-6build1) ... 468s Setting up libblas-dev:amd64 (3.12.1-2) ... 468s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so to provide /usr/lib/x86_64-linux-gnu/libblas.so (libblas.so-x86_64-linux-gnu) in auto mode 468s Setting up libsz2:amd64 (1.1.3-1) ... 468s Setting up libitm1:amd64 (15-20250222-0ubuntu1) ... 468s Setting up libvorbisenc2:amd64 (1.3.7-2) ... 468s Setting up libkadm5clnt-mit12:amd64 (1.21.3-4ubuntu2) ... 468s Setting up libdata-validate-ip-perl (0.31-1) ... 468s Setting up libwacom-common (2.14.0-1) ... 468s Setting up libmousex-nativetraits-perl (1.09-3) ... 468s Setting up libemail-address-xs-perl (1.05-1build5) ... 468s Setting up libwayland-client0:amd64 (1.23.1-3) ... 468s Setting up libnet-ssleay-perl:amd64 (1.94-3) ... 468s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 468s Setting up automake (1:1.17-3ubuntu1) ... 468s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 468s Setting up libb2-1:amd64 (0.98.1-1.1build1) ... 468s Setting up x11proto-dev (2024.1-1) ... 468s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 468s Setting up gnuplot-data (6.0.2+dfsg1-1) ... 468s Setting up libice6:amd64 (2:1.1.1-1) ... 468s Setting up libqt6core6t64:amd64 (6.8.2+dfsg-5) ... 468s Setting up libhttp-date-perl (6.06-1) ... 468s Setting up mesa-libgallium:amd64 (25.0.1-2ubuntu1) ... 468s Setting up libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 468s Setting up liblapack3:amd64 (3.12.1-2) ... 468s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 468s Setting up libproxy1v5:amd64 (0.5.9-1) ... 468s Setting up libfile-basedir-perl (0.09-2) ... 468s Setting up gettext (0.23.1-1) ... 468s Setting up libarpack2t64:amd64 (3.9.1-4) ... 468s Setting up libfftw3-single3:amd64 (3.3.10-2fakesync1build1) ... 468s Setting up libgmp-dev:amd64 (2:6.3.0+dfsg-3ubuntu1) ... 468s Setting up libamd3:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up libfile-listing-perl (6.16-1) ... 468s Setting up libxau-dev:amd64 (1:1.0.11-1) ... 468s Setting up nettle-dev:amd64 (3.10.1-1) ... 468s Setting up libkdb5-10t64:amd64 (1.21.3-4ubuntu2) ... 468s Setting up libgbm1:amd64 (25.0.1-2ubuntu1) ... 468s Setting up libcolamd3:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up libwacom9:amd64 (2.14.0-1) ... 468s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 468s Setting up liblist-moreutils-perl (0.430-2) ... 468s Setting up libxcursor1:amd64 (1:1.2.3-1) ... 468s Setting up libpod-constants-perl (0.19-2) ... 468s Setting up libgl1-mesa-dri:amd64 (25.0.1-2ubuntu1) ... 468s Setting up libhash-merge-perl (0.302-1) ... 468s Setting up libsoftware-copyright-perl (0.014-1) ... 468s Setting up libaec-dev:amd64 (1.1.3-1) ... 468s Setting up libavahi-common3:amd64 (0.8-16ubuntu1) ... 468s Setting up libcxsparse4:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up libfftw3-long3:amd64 (3.3.10-2fakesync1build1) ... 468s Setting up libnet-http-perl (6.23-1) ... 468s Setting up libpath-iterator-rule-perl (1.015-2) ... 468s Setting up libtext-markdown-discount-perl (0.18-1) ... 468s Setting up libappstream5:amd64 (1.0.4-1) ... 468s Setting up libexception-class-perl (1.45-1) ... 468s Setting up libclass-c3-perl (0.35-2) ... 468s Setting up libqrupdate1:amd64 (1.1.5-1) ... 468s Setting up libdevel-callchecker-perl:amd64 (0.009-1build1) ... 468s Setting up libxml-sax-perl (1.02+dfsg-4) ... 468s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 468s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 468s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 468s Setting up libcamd3:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up pkgconf:amd64 (1.8.1-4) ... 468s Setting up libinput-bin (1.27.1-1) ... 468s Setting up libxs-parse-sublike-perl:amd64 (0.37-1) ... 468s Setting up intltool-debian (0.35.0+20060710.6) ... 468s Setting up libthai0:amd64 (0.1.29-2build1) ... 468s Setting up libxdmcp-dev:amd64 (1:1.1.5-1) ... 468s Setting up libegl-mesa0:amd64 (25.0.1-2ubuntu1) ... 468s Setting up libdata-validate-uri-perl (0.07-3) ... 468s Setting up libxs-parse-keyword-perl (0.48-2) ... 468s Setting up libtest-exception-perl (0.43-3) ... 468s Setting up appstream (1.0.4-1) ... 468s ✔ Metadata cache was updated successfully. 468s Setting up libqt6xml6:amd64 (6.8.2+dfsg-5) ... 468s Setting up libglpk40:amd64 (5.0-1build2) ... 468s Setting up libqt6sql6:amd64 (6.8.2+dfsg-5) ... 468s Setting up libstring-copyright-perl (0.003014-1) ... 468s Setting up libraqm0:amd64 (0.10.2-1) ... 468s Setting up libfftw3-quad3:amd64 (3.3.10-2fakesync1build1) ... 468s Setting up liblapack-dev:amd64 (3.12.1-2) ... 468s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so to provide /usr/lib/x86_64-linux-gnu/liblapack.so (liblapack.so-x86_64-linux-gnu) in auto mode 468s Setting up libdata-optlist-perl (0.114-1) ... 468s Setting up cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 468s Setting up libssh2-1-dev:amd64 (1.11.1-1) ... 468s Setting up cpp-14 (14.2.0-17ubuntu3) ... 468s Setting up libccolamd3:amd64 (1:7.8.3+dfsg-3) ... 468s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0134-5build1) ... 468s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 468s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 468s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 469s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 469s Setting up dh-strip-nondeterminism (1.14.1-2) ... 469s Setting up libwww-robotrules-perl (6.02-1) ... 469s Setting up libsyntax-keyword-try-perl (0.30-1) ... 469s Setting up libjack-jackd2-0:amd64 (1.9.22~dfsg-4) ... 469s Setting up libhdf5-310:amd64 (1.14.5+repack-3) ... 469s Setting up libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 469s Setting up libhtml-parser-perl:amd64 (3.83-1build1) ... 469s Setting up libkadm5srv-mit12:amd64 (1.21.3-4ubuntu2) ... 469s Setting up libegl1:amd64 (1.7.0-1build1) ... 469s Setting up libqt6core5compat6:amd64 (6.8.2-3) ... 469s Setting up libfontconfig1:amd64 (2.15.0-2ubuntu1) ... 469s Setting up libsndfile1:amd64 (1.2.2-2) ... 469s Setting up libmro-compat-perl (0.15-2) ... 469s Setting up libgcc-14-dev:amd64 (14.2.0-17ubuntu3) ... 469s Setting up libjpeg8-dev:amd64 (8c-2ubuntu11) ... 469s Setting up libhdf5-fortran-310:amd64 (1.14.5+repack-3) ... 469s Setting up libstdc++-14-dev:amd64 (14.2.0-17ubuntu3) ... 469s Setting up libsm6:amd64 (2:1.2.4-1) ... 469s Setting up libavahi-client3:amd64 (0.8-16ubuntu1) ... 469s Setting up libio-socket-ssl-perl (2.089-1) ... 469s Setting up libsub-exporter-perl (0.990-1) ... 469s Setting up libqt6dbus6:amd64 (6.8.2+dfsg-5) ... 469s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 469s Setting up libhtml-form-perl (6.12-1) ... 469s Setting up krb5-multidev:amd64 (1.21.3-4ubuntu2) ... 469s Setting up libhdf5-cpp-310:amd64 (1.14.5+repack-3) ... 469s Setting up cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 469s Setting up libgfortran-14-dev:amd64 (14.2.0-17ubuntu3) ... 469s Setting up libiterator-perl (0.03+ds1-2) ... 469s Setting up libgnutls28-dev:amd64 (3.8.9-2ubuntu2) ... 469s Setting up libinput10:amd64 (1.27.1-1) ... 469s Setting up libnghttp2-dev:amd64 (1.64.0-1) ... 469s Setting up libhdf5-hl-310:amd64 (1.14.5+repack-3) ... 469s Setting up libportaudio2:amd64 (19.6.0-1.2build3) ... 469s Setting up libhttp-negotiate-perl (6.01-2) ... 469s Setting up fontconfig (2.15.0-2ubuntu1) ... 471s Regenerating fonts cache... done. 471s Setting up libcarp-assert-more-perl (2.8.0-1) ... 471s Setting up libcholmod5:amd64 (1:7.8.3+dfsg-3) ... 471s Setting up libxft2:amd64 (2.3.6-1build1) ... 471s Setting up libglx-mesa0:amd64 (25.0.1-2ubuntu1) ... 471s Setting up libxcb1-dev:amd64 (1.17.0-2) ... 471s Setting up libiterator-util-perl (0.02+ds1-2) ... 471s Setting up libglx0:amd64 (1.7.0-1build1) ... 471s Setting up libhttp-cookies-perl (6.11-1) ... 471s Setting up libspqr4:amd64 (1:7.8.3+dfsg-3) ... 471s Setting up libfftw3-bin (3.3.10-2fakesync1build1) ... 471s Setting up po-debconf (1.0.21+nmu1) ... 471s Setting up libhtml-tree-perl (5.07-3) ... 471s Setting up libparams-classify-perl:amd64 (0.015-2build6) ... 471s Setting up libpango-1.0-0:amd64 (1.56.1-1) ... 471s Setting up libcgi-pm-perl (4.67-1) ... 471s Setting up libjpeg-dev:amd64 (8c-2ubuntu11) ... 471s Setting up libx11-dev:amd64 (2:1.8.10-2) ... 471s Setting up libcairo2:amd64 (1.18.2-2) ... 471s Setting up libobject-pad-perl (0.820-1) ... 471s Setting up libkrb5-dev:amd64 (1.21.3-4ubuntu2) ... 471s Setting up libgl1:amd64 (1.7.0-1build1) ... 471s Setting up libqt6gui6:amd64 (6.8.2+dfsg-5) ... 471s Setting up libnet-smtp-ssl-perl (1.04-2) ... 471s Setting up libmodule-runtime-perl (0.016-2) ... 471s Setting up libmailtools-perl (2.22-1) ... 471s Setting up libconfig-model-perl (2.155-1) ... 471s Setting up libxt6t64:amd64 (1:1.2.1-1.2build1) ... 471s Setting up librtmp-dev:amd64 (2.4+20151223.gitfa8646d.1-2build7) ... 471s Setting up texinfo (7.1.1-1) ... 471s Setting up libumfpack6:amd64 (1:7.8.3+dfsg-3) ... 471s Setting up libconst-fast-perl (0.014-2) ... 471s Setting up libqt6network6:amd64 (6.8.2+dfsg-5) ... 471s Setting up cpp (4:14.2.0-1ubuntu1) ... 471s Setting up libdata-section-perl (0.200008-1) ... 471s Setting up libglx-dev:amd64 (1.7.0-1build1) ... 471s Setting up gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 471s Setting up libpangoft2-1.0-0:amd64 (1.56.1-1) ... 471s Setting up libdata-dpath-perl (0.60-1) ... 471s Setting up libfltk1.3t64:amd64 (1.3.8-6.1build2) ... 471s Setting up libfftw3-dev:amd64 (3.3.10-2fakesync1build1) ... 471s Setting up libcups2t64:amd64 (2.4.11-0ubuntu2) ... 471s Setting up libgl-dev:amd64 (1.7.0-1build1) ... 471s Setting up libstring-rewriteprefix-perl (0.009-1) ... 471s Setting up libpangocairo-1.0-0:amd64 (1.56.1-1) ... 471s Setting up libhdf5-hl-cpp-310:amd64 (1.14.5+repack-3) ... 471s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 471s Setting up libhdf5-hl-fortran-310:amd64 (1.14.5+repack-3) ... 471s Setting up libxmu6:amd64 (2:1.1.3-3build2) ... 471s Setting up gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 471s Setting up libmodule-implementation-perl (0.09-2) ... 471s Setting up libpackage-stash-perl (0.40-1) ... 471s Setting up libimport-into-perl (1.002005-2) ... 471s Setting up libmoo-perl (2.005005-1) ... 471s Setting up libqt6opengl6:amd64 (6.8.2+dfsg-5) ... 471s Setting up liblist-someutils-perl (0.59-1) ... 471s Setting up libxaw7:amd64 (2:1.0.16-1) ... 471s Setting up libmime-tools-perl (5.515-1) ... 471s Setting up libsoftware-license-perl (0.104006-1) ... 471s Setting up libclass-load-perl (0.25-2) ... 471s Setting up libgl2ps1.4 (1.4.2+dfsg1-2build1) ... 471s Setting up gcc-14 (14.2.0-17ubuntu3) ... 471s Setting up gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 471s Setting up libqt6widgets6:amd64 (6.8.2+dfsg-5) ... 471s Setting up libfltk-gl1.3t64:amd64 (1.3.8-6.1build2) ... 471s Setting up libcurl4-openssl-dev:amd64 (8.12.1-3ubuntu1) ... 471s Setting up libhdf5-dev (1.14.5+repack-3) ... 471s update-alternatives: using /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 471s Setting up g++-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 471s Setting up g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 471s Setting up g++-14 (14.2.0-17ubuntu3) ... 471s Setting up libmoox-aliases-perl (0.001006-2) ... 471s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 471s Setting up libparams-validate-perl:amd64 (1.31-2build4) ... 471s Setting up libqt6openglwidgets6:amd64 (6.8.2+dfsg-5) ... 471s Setting up libb-hooks-endofscope-perl (0.28-1) ... 471s Setting up libqt6printsupport6:amd64 (6.8.2+dfsg-5) ... 471s Setting up libtool (2.5.4-4) ... 471s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 471s Setting up x11-xkb-utils (7.7+9) ... 471s Setting up libqt6help6:amd64 (6.8.2-3) ... 471s Setting up libqscintilla2-qt6-15:amd64 (2.14.1+dfsg-1build4) ... 471s Setting up gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 471s Setting up gcc (4:14.2.0-1ubuntu1) ... 471s Setting up dh-autoreconf (20) ... 471s Setting up libnamespace-clean-perl (0.27-2) ... 471s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 471s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 471s Setting up g++ (4:14.2.0-1ubuntu1) ... 471s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 471s Setting up xserver-common (2:21.1.16-1ubuntu1) ... 471s Setting up licensecheck (3.3.9-1ubuntu1) ... 471s Setting up libapp-cmd-perl (0.337-2) ... 471s Setting up xvfb (2:21.1.16-1ubuntu1) ... 471s Setting up debhelper (13.24.1ubuntu2) ... 471s Setting up gfortran (4:14.2.0-1ubuntu1) ... 471s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 471s 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 471s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 471s 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 471s Setting up cme (1.041-1) ... 471s Setting up libheif-plugin-aomdec:amd64 (1.19.7-1) ... 471s Setting up libwww-perl (6.78-1) ... 471s Setting up libheif1:amd64 (1.19.7-1) ... 471s Setting up libparse-debcontrol-perl (2.005-6) ... 471s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 471s Setting up libwww-mechanize-perl (2.19-1ubuntu1) ... 471s Setting up libgd3:amd64 (2.3.3-12ubuntu3) ... 471s Setting up gnuplot-nox (6.0.2+dfsg1-1) ... 471s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 471s Setting up liblwp-protocol-https-perl (6.14-1) ... 471s Setting up libheif-plugin-libde265:amd64 (1.19.7-1) ... 471s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17689-1) ... 471s Setting up lintian (2.121.1+nmu1ubuntu2) ... 471s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17689-1) ... 471s Setting up libconfig-model-dpkg-perl (3.010) ... 471s Setting up dh-octave-autopkgtest (1.8.0) ... 471s Setting up octave (9.4.0-1) ... 471s Setting up octave-dev (9.4.0-1) ... 471s Setting up octave-io (2.6.4-3build2) ... 471s Setting up octave-statistics-common (1.7.3-2) ... 471s Setting up octave-statistics (1.7.3-2) ... 471s Setting up dh-octave (1.8.0) ... 471s Processing triggers for libc-bin (2.41-1ubuntu2) ... 471s Processing triggers for man-db (2.13.0-1) ... 473s Processing triggers for udev (257.3-1ubuntu3) ... 473s Processing triggers for install-info (7.1.1-1) ... 475s autopkgtest [10:43:22]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 475s autopkgtest [10:43:22]: test command1: [----------------------- 475s Checking package... 476s Run the unit tests... 476s Checking m files ... 476s [inst/mahal.m] 476s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/mahal.m 476s ***** error mahal () 476s ***** error mahal (1, 2, 3) 476s ***** error mahal ("A", "B") 476s ***** error mahal ([1, 2], ["A", "B"]) 476s ***** error mahal (ones (2, 2, 2)) 477s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 477s ***** error mahal (ones (2, 2), ones (2, 3)) 477s ***** test 477s X = [1 0; 0 1; 1 1; 0 0]; 477s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 477s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 477s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 477s 9 tests, 9 passed, 0 known failure, 0 skipped 477s [inst/fitcknn.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitcknn.m 477s ***** demo 477s ## Train a k-nearest neighbor classifier for k = 10 477s ## and plot the decision boundaries. 477s 477s load fisheriris 477s idx = ! strcmp (species, "setosa"); 477s X = meas(idx,3:4); 477s Y = cast (strcmpi (species(idx), "virginica"), "double"); 477s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 477s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 477s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 477s [x1G, x2G] = meshgrid (x1, x2); 477s XGrid = [x1G(:), x2G(:)]; 477s pred = predict (obj, XGrid); 477s gidx = logical (str2num (cell2mat (pred))); 477s 477s figure 477s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 477s hold on 477s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 477s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 477s xlabel ("Petal length (cm)"); 477s ylabel ("Petal width (cm)"); 477s title ("5-Nearest Neighbor Classifier Decision Boundary"); 477s legend ({"Versicolor Region", "Virginica Region", ... 477s "Sampled Versicolor", "Sampled Virginica"}, ... 477s "location", "northwest") 477s axis tight 477s hold off 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "NSMethod", "exhaustive"); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s k = 10; 477s a = fitcknn (x, y, "NumNeighbors" ,k); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = ones (4, 11); 477s y = ["a"; "a"; "b"; "b"]; 477s k = 10; 477s a = fitcknn (x, y, "NumNeighbors" ,k); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s k = 10; 477s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s k = 10; 477s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s weights = ones (4,1); 477s a = fitcknn (x, y, "Standardize", 1); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.Standardize}, {true}) 477s assert ({a.Sigma}, {std(x, [], 1)}) 477s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s weights = ones (4,1); 477s a = fitcknn (x, y, "Standardize", false); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.Standardize}, {false}) 477s assert ({a.Sigma}, {[]}) 477s assert ({a.Mu}, {[]}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s s = ones (1, 3); 477s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.DistParameter}, {s}) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 477s assert (class (a), "ClassificationKNN"); 477s assert (a.DistParameter, 5) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 477s "NSMethod", "exhaustive"); 477s assert (class (a), "ClassificationKNN"); 477s assert (a.DistParameter, 5) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 477s assert (class (a), "ClassificationKNN"); 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 477s assert ({a.BucketSize}, {20}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "IncludeTies", true); 477s assert (class (a), "ClassificationKNN"); 477s assert (a.IncludeTies, true); 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y); 477s assert (class (a), "ClassificationKNN"); 477s assert (a.IncludeTies, false); 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Prior, [0.5; 0.5]) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s prior = [0.5; 0.5]; 477s a = fitcknn (x, y, "Prior", "empirical"); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Prior, prior) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "a"; "b"]; 477s prior = [0.75; 0.25]; 477s a = fitcknn (x, y, "Prior", "empirical"); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Prior, prior) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "a"; "b"]; 477s prior = [0.5; 0.5]; 477s a = fitcknn (x, y, "Prior", "uniform"); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Prior, prior) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s cost = eye (2); 477s a = fitcknn (x, y, "Cost", cost); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Cost, [1, 0; 0, 1]) 477s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s cost = eye (2); 477s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 477s assert (class (a), "ClassificationKNN") 477s assert (a.Cost, [1, 0; 0, 1]) 477s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 477s assert ({a.BucketSize}, {50}) 477s ***** test 477s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 477s y = ["a"; "a"; "b"; "b"]; 477s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 477s assert (class (a), "ClassificationPartitionedModel"); 477s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 477s assert (a.ModelParameters.NSMethod, "exhaustive") 477s assert (a.ModelParameters.Distance, "euclidean") 477s assert ({a.Trained{1}.BucketSize}, {50}) 477s ***** error fitcknn () 477s ***** error fitcknn (ones (4,1)) 477s ***** error 477s fitcknn (ones (4,2), ones (4, 1), "K") 477s ***** error 477s fitcknn (ones (4,2), ones (3, 1)) 477s ***** error 477s fitcknn (ones (4,2), ones (3, 1), "K", 2) 477s ***** error 477s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 477s ***** error 477s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 477s ***** error ... 477s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 477s 29 tests, 29 passed, 0 known failure, 0 skipped 477s [inst/chi2gof.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/chi2gof.m 477s ***** demo 477s x = normrnd (50, 5, 100, 1); 477s [h, p, stats] = chi2gof (x) 477s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 477s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 477s ***** demo 477s x = rand (100,1 ); 477s n = length (x); 477s binedges = linspace (0, 1, 11); 477s expectedCounts = n * diff (binedges); 477s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 477s ***** demo 477s bins = 0:5; 477s obsCounts = [6 16 10 12 4 2]; 477s n = sum(obsCounts); 477s lambdaHat = sum(bins.*obsCounts) / n; 477s expCounts = n * poisspdf(bins,lambdaHat); 477s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 477s "expected", expCounts, "nparams",1) 477s ***** error chi2gof () 477s ***** error chi2gof ([2,3;3,4]) 477s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 477s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 477s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 477s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 477s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 477s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 477s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 477s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 477s ***** test 477s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 477s [h, p, stats] = chi2gof (x); 477s assert (h, 0); 477s assert (p, NaN); 477s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 477s assert (stats.df, 0); 477s assert (stats.edges, [1, 2.5, 4], 1e-14); 477s assert (stats.O, [7, 5], 1e-14); 477s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 477s 11 tests, 11 passed, 0 known failure, 0 skipped 477s [inst/vartest.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/vartest.m 477s ***** error vartest (); 477s ***** error vartest ([1, 2, 3, 4], -0.5); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 0); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "tail", "val"); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "dim", 3); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 477s ***** error ... 477s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 477s ***** test 477s load carsmall 477s [h, pval, ci] = vartest (MPG, 7^2); 477s assert (h, 1); 477s assert (pval, 0.04335086742174443, 1e-14); 477s assert (ci, [49.397; 88.039], 1e-3); 477s 12 tests, 12 passed, 0 known failure, 0 skipped 477s [inst/vartest2.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/vartest2.m 477s ***** error vartest2 (); 477s ***** error vartest2 (ones (20,1)); 477s ***** error ... 477s vartest2 (rand (20,1), 5); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 477s ***** error ... 477s vartest2 (rand (20,1), rand (25,1)*2, "some"); 477s ***** test 477s load carsmall 477s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 477s assert (h, 0); 477s assert (pval, 0.6288022362718455, 1e-13); 477s assert (ci, [0.4139; 1.7193], 1e-4); 477s assert (stat.fstat, 0.8384, 1e-4); 477s assert (stat.df1, 30); 477s assert (stat.df2, 33); 477s 14 tests, 14 passed, 0 known failure, 0 skipped 477s [inst/ztest.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ztest.m 477s ***** error ztest (); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 2, -0.5); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 477s ***** error ... 477s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 477s ***** test 477s load carsmall 477s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 477s assert (h, 0); 477s assert (pval, 1, 1e-14); 477s assert (ci, [22.094; 25.343], 1e-3); 477s ***** test 477s load carsmall 477s [h, pval, ci] = ztest (MPG, 26, 8); 477s assert (h, 1); 477s assert (pval, 0.00568359158544743, 1e-14); 477s assert (ci, [22.101; 25.335], 1e-3); 477s ***** test 477s load carsmall 477s [h, pval, ci] = ztest (MPG, 26, 4); 477s assert (h, 1); 477s assert (pval, 3.184168011941316e-08, 1e-14); 477s assert (ci, [22.909; 24.527], 1e-3); 477s 13 tests, 13 passed, 0 known failure, 0 skipped 477s [inst/bar3.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/bar3.m 477s ***** demo 477s ## Ploting 5 bars in the same series. 477s 477s z = [50; 40; 30; 20; 10]; 477s bar3 (z); 477s ***** demo 477s ## Ploting 5 bars in different groups. 477s 477s z = [50, 40, 30, 20, 10]; 477s bar3 (z); 477s ***** demo 477s ## A 3D bar graph with each series corresponding to a column in z. 477s 477s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 477s bar3 (z); 477s ***** demo 477s ## Specify y-axis locations as tick names. y must be a column vector! 477s 477s y = [1950, 1960, 1970, 1980, 1990]'; 477s z = [16, 8, 4, 2, 1]'; 477s bar3 (y, z); 477s ***** demo 477s ## Plot 3 series as a grouped plot without any space between the grouped bars 477s 477s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 477s bar3 (z, 1, 'grouped'); 477s ***** demo 477s ## Plot a stacked style 3D bar graph 477s 477s z = [19, 30, 21, 30; 40, 16, 32, 12]; 477s b = bar3 (z, 0.5, 'stacked'); 477s ***** error bar3 ("A") 477s ***** error bar3 ({2,3,4,5}) 477s ***** error ... 477s bar3 ([1,2,3]', ones (2)) 477s ***** error ... 477s bar3 ([1:5], 1.2) 477s ***** error ... 477s bar3 ([1:5]', ones (5), 1.2) 477s ***** error ... 477s bar3 ([1:5]', ones (5), [0.8, 0.7]) 477s ***** error ... 477s bar3 (ones (5), 'width') 477s ***** error ... 477s bar3 (ones (5), 'width', 1.2) 477s ***** error ... 477s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 477s ***** error ... 477s bar3 (ones (5), 'color') 477s ***** error ... 477s bar3 (ones (5), 'color', [0.8, 0.8]) 477s ***** error ... 477s bar3 (ones (5), 'color', "brown") 477s ***** error ... 477s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 477s ***** error ... 477s bar3 (ones (5), 'xlabel') 477s ***** error ... 477s bar3 (ones (5), 'xlabel', 4) 477s ***** error ... 477s bar3 (ones (5), 'ylabel') 477s ***** error ... 477s bar3 (ones (5), 'ylabel', 4) 477s ***** error bar3 (ones (5), 'this', 4) 477s ***** error ... 477s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 477s ***** error ... 477s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 477s 20 tests, 20 passed, 0 known failure, 0 skipped 477s [inst/binotest.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/binotest.m 477s ***** demo 477s % flip a coin 1000 times, showing 475 heads 477s % Hypothesis: coin is fair, i.e. p=1/2 477s [h,p_val,ci] = binotest(475,1000,0.5) 477s % Result: h = 0 : null hypothesis not rejected, coin could be fair 477s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 477s % 0.444 <= p <= 0.506 with 95% confidence 477s ***** demo 477s % flip a coin 100 times, showing 65 heads 477s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 477s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 477s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 477s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 477s % 0 <= p <= 0.76 with 99% confidence 477s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 477s [h,p_val,ci] = binotest (51,235,1/6); 477s assert (p_val, 0.0437, 0.00005) 477s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 477s assert (p_val, 0.027, 0.0005) 477s 1 test, 1 passed, 0 known failure, 0 skipped 477s [inst/crossval.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/crossval.m 477s ***** test 477s load fisheriris 477s y = meas(:, 1); 477s X = [ones(size(y)) meas(:, 2:4)]; 477s f = @(X1, y1, X2, y2) meansq (y2 - X2*regress(y1, X1)); 477s results0 = crossval (f, X, y); 477s results1 = crossval (f, X, y, 'KFold', 10); 477s folds = 5; 477s results2 = crossval (f, X, y, 'KFold', folds); 477s results3 = crossval (f, X, y, 'Partition', cvpartition (numel (y), 'KFold', folds)); 477s results4 = crossval (f, X, y, 'LeaveOut', 1); 477s mcreps = 2; n_holdout = 20; 477s results5 = crossval (f, X, y, 'HoldOut', n_holdout, 'mcreps', mcreps); 477s 477s ## ensure equal representation of iris species in the training set -- tends 477s ## to slightly reduce cross-validation mean square error 477s results6 = crossval (f, X, y, 'KFold', 5, 'stratify', grp2idx(species)); 477s 477s assert (results0, results1, 2e-15); 477s assert (results2, results3, 5e-17); 477s assert (size(results4), [1 numel(y)]); 477s assert (mean(results4), 0.1018, 1e-4); 477s assert (size(results5), [mcreps 1]); 477s warning: strmatch is obsolete; use strncmp or strcmp instead 477s 1 test, 1 passed, 0 known failure, 0 skipped 477s [inst/procrustes.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/procrustes.m 477s ***** demo 477s ## Create some random points in two dimensions 477s n = 10; 477s randn ("seed", 1); 477s X = normrnd (0, 1, [n, 2]); 477s 477s ## Those same points, rotated, scaled, translated, plus some noise 477s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 477s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 477s 477s ## Conform Y to X, plot original X and Y, and transformed Y 477s [d, Z] = procrustes (X, Y); 477s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 477s ***** demo 477s ## Find Procrustes distance and plot superimposed shape 477s 477s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 477s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 477s plot (X(:,1),X(:,2),"x"); 477s hold on 477s plot (Y(:,1),Y(:,2),"o"); 477s xlim ([0 100]); 477s ylim ([0 100]); 477s legend ("Target shape (X)", "Source shape (Y)"); 477s [d, Z] = procrustes (X, Y) 477s plot (Z(:,1), Z(:,2), "s"); 477s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 477s hold off 477s ***** demo 477s ## Apply Procrustes transformation to larger set of points 477s 477s ## Create matrices with landmark points for two triangles 477s X = [5, 0; 5, 5; 8, 5]; # target 477s Y = [0, 0; 1, 0; 1, 1]; # source 477s 477s ## Create a matrix with more points on the source triangle 477s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 477s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 477s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 477s 477s ## Plot both shapes, including the larger set of points for the source shape 477s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 477s hold on 477s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 477s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 477s xlim ([-1 10]); 477s ylim ([-1 6]); 477s legend ("Target shape (X)", "Source shape (Y)", ... 477s "More points on Y", "Location", "northwest"); 477s hold off 477s 477s ## Obtain the Procrustes transformation 477s [d, Z, transform] = procrustes (X, Y) 477s 477s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 477s ## on the source shape onto the target shape, and then visualize the results. 477s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 477s figure 477s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 477s hold on 477s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 477s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 477s xlim ([-1 10]); 477s ylim ([-1 6]); 477s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 477s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 477s legend ("Target shape (X)", "Source shape (Y)", ... 477s "More points on Y", "Transformed source shape (Z)", ... 477s "Transformed additional points", "Location", "northwest"); 477s hold off 477s ***** demo 477s ## Compare shapes without reflection 477s 477s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 477s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 477s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 477s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 477s plot (T(:,1), T(:,2), "x-"); 477s hold on 477s plot (S(:,1), S(:,2), "o-"); 477s legend ("Target shape (d)", "Source shape (b)"); 477s hold off 477s d_false = procrustes (T, S, "reflection", false); 477s printf ("Procrustes distance without reflection: %f\n", d_false); 477s d_true = procrustes (T, S, "reflection", true); 477s printf ("Procrustes distance with reflection: %f\n", d_true); 477s d_best = procrustes (T, S, "reflection", "best"); 477s printf ("Procrustes distance with best fit: %f\n", d_true); 477s ***** error procrustes (); 477s ***** error procrustes (1, 2, 3, 4, 5, 6); 477s ***** error ... 477s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 477s ***** error ... 477s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (11, 3)); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 4)); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), true); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 477s ***** error ... 477s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 477s 15 tests, 15 passed, 0 known failure, 0 skipped 477s [inst/barttest.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/barttest.m 477s ***** error barttest () 477s ***** error barttest ([2,NaN;3,4]) 477s ***** error barttest (ones (30, 4), "alpha") 477s ***** error barttest (ones (30, 4), 0) 477s ***** error barttest (ones (30, 4), 1.2) 477s ***** error barttest (ones (30, 4), [0.2, 0.05]) 477s ***** error barttest (ones (30, 1)) 477s ***** error barttest (ones (30, 1), 0.05) 477s ***** test 477s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 477s [ndim, pval, chisq] = barttest (x); 477s assert (ndim, 2); 477s assert (pval, 0); 477s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 477s ***** test 477s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 477s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 477s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 477s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 477s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 477s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 477s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 477s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 477s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 477s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 477s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 477s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 477s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 477s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 477s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 477s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 477s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 477s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 477s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 477s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 477s [ndim, pval, chisq] = barttest (x); 477s assert (ndim, 3); 477s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 477s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 477s assert (chisq, chisq_out, 1e-4); 477s 10 tests, 10 passed, 0 known failure, 0 skipped 477s [inst/signrank.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/signrank.m 477s ***** test 477s load gradespaired.mat 477s [p, h, stats] = signrank (gradespaired(:,1), ... 477s gradespaired(:,2), 'tail', 'left'); 477s assert (p, 0.0047, 1e-4); 477s assert (h, true); 477s assert (stats.zval, -2.5982, 1e-4); 477s assert (stats.signedrank, 2017.5); 477s ***** test 477s load ('gradespaired.mat'); 477s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 477s 'tail', 'left', 'method', 'exact'); 477s assert (p, 0.0045, 1e-4); 477s assert (h, true); 477s assert (stats.zval, NaN); 477s assert (stats.signedrank, 2017.5); 477s ***** test 477s load mileage 477s [p, h, stats] = signrank (mileage(:,2), 33); 477s assert (p, 0.0312, 1e-4); 477s assert (h, true); 477s assert (stats.zval, NaN); 477s assert (stats.signedrank, 21); 477s ***** test 477s load mileage 477s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 477s assert (p, 0.0156, 1e-4); 477s assert (h, true); 477s assert (stats.zval, NaN); 477s assert (stats.signedrank, 21); 477s ***** test 477s load mileage 477s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 477s 'alpha', 0.01, 'method', 'approximate'); 477s assert (p, 0.0180, 1e-4); 477s assert (h, false); 477s assert (stats.zval, 2.0966, 1e-4); 477s assert (stats.signedrank, 21); 477s ***** error signrank (ones (2)) 477s ***** error ... 477s signrank ([1, 2, 3, 4], ones (2)) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [1, 2, 3]) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'tail') 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'alpha', 0) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'alpha', "a") 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'tail', "some") 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'method', 0.01) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'method', "some") 477s ***** error ... 477s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 477s 22 tests, 22 passed, 0 known failure, 0 skipped 477s [inst/histfit.m] 477s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/histfit.m 477s ***** demo 477s histfit (randn (100, 1)) 477s ***** demo 477s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 477s ***** demo 477s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 477s ***** test 477s hf = figure ("visible", "off"); 477s unwind_protect 477s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 477s histfit (x); 477s unwind_protect_cleanup 477s close (hf); 477s end_unwind_protect 477s warning: using the gnuplot graphics toolkit is discouraged 477s 477s The gnuplot graphics toolkit is not actively maintained and has a number 477s of limitations that are unlikely to be fixed. Communication with gnuplot 477s uses a one-directional pipe and limited information is passed back to the 477s Octave interpreter so most changes made interactively in the plot window 477s will not be reflected in the graphics properties managed by Octave. For 477s example, if the plot window is closed with a mouse click, Octave will not 477s be notified and will not update its internal list of open figure windows. 477s The qt toolkit is recommended instead. 477s ***** test 477s hf = figure ("visible", "off"); 477s unwind_protect 477s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 477s histfit (x); 477s unwind_protect_cleanup 477s close (hf); 477s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 478s histfit (x, 3); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s histfit (randn (100, 1)); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s ax = gca (); 478s histfit (ax, randn (100, 1)); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s ax = gca (); 478s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s ax = gca (); 478s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** test 478s hf = figure ("visible", "off"); 478s unwind_protect 478s ax = axes ("parent", hf); 478s fail ("histfit (ax)", "histfit: too few input arguments."); 478s unwind_protect_cleanup 478s close (hf); 478s end_unwind_protect 478s ***** error ... 478s histfit ('wer') 478s ***** error histfit ([NaN, NaN, NaN]); 478s ***** error ... 478s histfit (randn (100, 1), 5.6) 478s ***** error ... 478s histfit (randn (100, 1), 8, 5) 478s ***** error ... 478s histfit (randn (100, 1), 8, {'normal'}) 478s ***** error ... 478s histfit (randn (100, 1), 8, 'Kernel') 478s ***** error ... 478s histfit (randn (100, 1), 8, 'ASDASDASD') 478s 17 tests, 17 passed, 0 known failure, 0 skipped 478s [inst/sampsizepwr.m] 478s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/sampsizepwr.m 478s ***** demo 478s ## Compute the mean closest to 100 that can be determined to be 478s ## significantly different from 100 using a t-test with a sample size 478s ## of 60 and a power of 0.8. 478s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 478s disp (mu1); 478s ***** demo 478s ## Compute the sample sizes required to distinguish mu0 = 100 from 478s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 478s ## smaller sample sizes of 1.5 and a power of 0.6. 478s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 478s ***** demo 478s ## Compute the sample size N required to distinguish p=.26 from p=.2 478s ## with a binomial test. The result is approximate, so make a plot to 478s ## see if any smaller N values also have the required power of 0.6. 478s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 478s nn = 1:250; 478s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 478s Nexact = min (nn(pwr >= 0.6)); 478s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 478s grid on 478s ***** demo 478s ## The company must test 52 bottles to detect the difference between a mean 478s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 478s ## to visualize how the sample size affects the power of the test. 478s 478s nout = sampsizepwr('t',[100 5],102,0.80); 478s nn = 1:100; 478s pwrout = sampsizepwr('t',[100 5],102,[],nn); 478s 478s figure; 478s plot (nn, pwrout, "b-", nout, 0.8, "ro") 478s title ("Power versus Sample Size") 478s xlabel ("Sample Size") 478s ylabel ("Power") 478s ***** error ... 478s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("z", 100, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("t", 100, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("t2", 60, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 478s ***** error ... 478s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("var", 0, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("var", -5, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("p", 0, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", -1, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", 0, [], 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 478s ***** error ... 478s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], [], [], 60); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], 110, [], []); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 478s ***** error ... 478s out = sampsizepwr ("var", 5, -1, [], 60); 478s ***** error ... 478s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 478s ***** error ... 478s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 478s ***** error ... 478s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], 110, 1.2); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], 110, 0); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 478s ***** error ... 478s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 478s ***** error ... 478s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 478s ***** error ... 478s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 478s ***** error ... 478s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 478s ***** warning ... 478s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 478s ***** warning ... 478s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 478s ***** test 478s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 478s assert (mu1, 103.67704316, 1e-8); 479s ***** test 479s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 479s assert (N1, 9); 479s assert (N2, 14); 479s ***** test 479s nn = 1:250; 479s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 479s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 479s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 479s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 479s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 479s ***** test 479s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 479s assert (nout, 52); 479s ***** test 479s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 479s assert (power, 0.5797373588621888, 1e-14); 479s ***** test 479s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 479s assert (nout, 18); 479s ***** test 479s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 479s assert (p1out, 25.65317979360237, 1e-14); 479s ***** test 479s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 479s assert (pwr, 0.716504004686586, 1e-14); 479s ***** test 479s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 479s assert (n, 11); 480s ***** test 480s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 480s assert ([n1, n2], [8, 16]); 480s 68 tests, 68 passed, 0 known failure, 0 skipped 480s [inst/fitcdiscr.m] 480s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitcdiscr.m 480s ***** demo 480s ## Train a linear discriminant classifier for Gamma = 0.5 480s ## and plot the decision boundaries. 480s 480s load fisheriris 480s idx = ! strcmp (species, "setosa"); 480s X = meas(idx,3:4); 480s Y = cast (strcmpi (species(idx), "virginica"), "double"); 480s obj = fitcdiscr (X, Y, "Gamma", 0.5) 480s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 480s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 480s [x1G, x2G] = meshgrid (x1, x2); 480s XGrid = [x1G(:), x2G(:)]; 480s pred = predict (obj, XGrid); 480s gidx = logical (str2num (cell2mat (pred))); 480s 480s figure 480s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 480s hold on 480s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 480s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 480s xlabel ("Petal length (cm)"); 480s ylabel ("Petal width (cm)"); 480s title ("Linear Discriminant Analysis Decision Boundary"); 480s legend ({"Versicolor Region", "Virginica Region", ... 480s "Sampled Versicolor", "Sampled Virginica"}, ... 480s "location", "northwest") 480s axis tight 480s hold off 480s ***** test 480s load fisheriris 480s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 480s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 480s assert (label, {'versicolor'}) 480s assert (score, [0, 0.9999, 0.0001], 1e-4) 480s assert (cost, [1, 0.0001, 0.9999], 1e-4) 480s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 480s assert (label, {'versicolor'}) 480s assert (score, [0, 0.6368, 0.3632], 1e-4) 480s assert (cost, [1, 0.3632, 0.6368], 1e-4) 480s assert (class (Mdl), "ClassificationDiscriminant"); 480s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 480s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 480s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 480s assert (Mdl.ClassNames, unique (species)) 480s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 480s 0.046361, 0.115388, 0.027622, 0.016355; ... 480s 0.083757, 0.027622, 0.185188, 0.021333; ... 480s 0.019201, 0.016355, 0.021333, 0.041882]; 480s assert (Mdl.Sigma, sigma, 1e-6) 480s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 480s 5.9360, 2.7700, 4.2600, 1.3260; ... 480s 6.5880, 2.9740, 5.5520, 2.0260]; 480s assert (Mdl.Mu, mu, 1e-14) 480s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 480s ***** error fitcdiscr () 480s ***** error fitcdiscr (ones (4,1)) 480s ***** error 480s fitcdiscr (ones (4,2), ones (4, 1), "K") 480s ***** error 480s fitcdiscr (ones (4,2), ones (3, 1)) 480s ***** error 480s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 480s 6 tests, 6 passed, 0 known failure, 0 skipped 480s [inst/dist_obj/RicianDistribution.m] 480s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/RicianDistribution.m 480s ***** shared pd, t 480s pd = RicianDistribution; 480s t = truncate (pd, 2, 4); 480s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 480s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 480s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 480s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 480s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 480s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 480s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 480s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 480s ***** assert (iqr (pd), 1.0890, 1e-4); 480s ***** assert (iqr (t), 0.5928, 1e-4); 480s ***** assert (mean (pd), 1.5486, 1e-4); 480s ***** assert (mean (t), 2.5380, 1e-4); 480s ***** assert (median (pd), 1.4755, 1e-4); 480s ***** assert (median (t), 2.4341, 1e-4); 480s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 480s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 480s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 480s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 480s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 480s ***** assert (any (random (t, 1000, 1) < 2), false); 480s ***** assert (any (random (t, 1000, 1) > 4), false); 480s ***** assert (std (pd), 0.7758, 1e-4); 480s ***** assert (std (t), 0.4294, 1e-4); 480s ***** assert (var (pd), 0.6019, 1e-4); 480s ***** assert (var (t), 0.1844, 1e-4); 480s ***** error ... 480s RicianDistribution(-eps, 1) 480s ***** error ... 480s RicianDistribution(-1, 1) 480s ***** error ... 480s RicianDistribution(Inf, 1) 480s ***** error ... 480s RicianDistribution(i, 1) 480s ***** error ... 480s RicianDistribution("a", 1) 480s ***** error ... 480s RicianDistribution([1, 2], 1) 480s ***** error ... 480s RicianDistribution(NaN, 1) 480s ***** error ... 480s RicianDistribution(1, 0) 480s ***** error ... 480s RicianDistribution(1, -1) 480s ***** error ... 480s RicianDistribution(1, Inf) 480s ***** error ... 480s RicianDistribution(1, i) 480s ***** error ... 480s RicianDistribution(1, "a") 480s ***** error ... 480s RicianDistribution(1, [1, 2]) 480s ***** error ... 480s RicianDistribution(1, NaN) 480s ***** error ... 480s cdf (RicianDistribution, 2, "uper") 480s ***** error ... 480s cdf (RicianDistribution, 2, 3) 480s ***** shared x 480s x = gevrnd (1, 1, 1, [1, 100]); 480s ***** error ... 480s paramci (RicianDistribution.fit (x), "alpha") 480s ***** error ... 480s paramci (RicianDistribution.fit (x), "alpha", 0) 480s ***** error ... 480s paramci (RicianDistribution.fit (x), "alpha", 1) 480s ***** error ... 480s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 480s ***** error ... 480s paramci (RicianDistribution.fit (x), "alpha", "") 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 481s "parameter", {"s", "sigma", "param"}) 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "parameter", "param") 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "NAME", "value") 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 481s ***** error ... 481s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 481s "NAME", "value") 481s ***** error ... 481s plot (RicianDistribution, "Parent") 481s ***** error ... 481s plot (RicianDistribution, "PlotType", 12) 481s ***** error ... 481s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 481s ***** error ... 481s plot (RicianDistribution, "PlotType", "pdfcdf") 481s ***** error ... 481s plot (RicianDistribution, "Discrete", "pdfcdf") 481s ***** error ... 481s plot (RicianDistribution, "Discrete", [1, 0]) 481s ***** error ... 481s plot (RicianDistribution, "Discrete", {true}) 481s ***** error ... 481s plot (RicianDistribution, "Parent", 12) 481s ***** error ... 481s plot (RicianDistribution, "Parent", "hax") 481s ***** error ... 481s plot (RicianDistribution, "invalidNAME", "pdf") 481s ***** error ... 481s plot (RicianDistribution, "PlotType", "probability") 481s ***** error ... 481s proflik (RicianDistribution, 2) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 3) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), [1, 2]) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), {1}) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, ones (2)) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display") 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display", 1) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 481s ***** error ... 481s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 481s ***** error ... 481s truncate (RicianDistribution) 481s ***** error ... 481s truncate (RicianDistribution, 2) 481s ***** error ... 481s truncate (RicianDistribution, 4, 2) 481s ***** shared pd 481s pd = RicianDistribution(1, 1); 481s pd(2) = RicianDistribution(1, 3); 481s ***** error cdf (pd, 1) 481s ***** error icdf (pd, 0.5) 481s ***** error iqr (pd) 481s ***** error mean (pd) 481s ***** error median (pd) 481s ***** error negloglik (pd) 481s ***** error paramci (pd) 481s ***** error pdf (pd, 1) 481s ***** error plot (pd) 481s ***** error proflik (pd, 2) 481s ***** error random (pd) 481s ***** error std (pd) 481s ***** error ... 481s truncate (pd, 2, 4) 481s ***** error var (pd) 481s 97 tests, 97 passed, 0 known failure, 0 skipped 481s [inst/dist_obj/GammaDistribution.m] 481s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/GammaDistribution.m 481s ***** shared pd, t 481s pd = GammaDistribution (1, 1); 481s t = truncate (pd, 2, 4); 481s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 481s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 481s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 481s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 481s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 481s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 481s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 481s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 481s ***** assert (iqr (pd), 1.0986, 1e-4); 481s ***** assert (iqr (t), 0.8020, 1e-4); 481s ***** assert (mean (pd), 1); 481s ***** assert (mean (t), 2.6870, 1e-4); 481s ***** assert (median (pd), 0.6931, 1e-4); 481s ***** assert (median (t), 2.5662, 1e-4); 481s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 481s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 481s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 481s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 481s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 481s ***** assert (any (random (t, 1000, 1) < 2), false); 481s ***** assert (any (random (t, 1000, 1) > 4), false); 481s ***** assert (std (pd), 1); 481s ***** assert (std (t), 0.5253, 1e-4); 481s ***** assert (var (pd), 1); 481s ***** assert (var (t), 0.2759, 1e-4); 481s ***** error ... 481s GammaDistribution(0, 1) 481s ***** error ... 481s GammaDistribution(Inf, 1) 481s ***** error ... 481s GammaDistribution(i, 1) 481s ***** error ... 481s GammaDistribution("a", 1) 481s ***** error ... 481s GammaDistribution([1, 2], 1) 481s ***** error ... 481s GammaDistribution(NaN, 1) 481s ***** error ... 481s GammaDistribution(1, 0) 481s ***** error ... 481s GammaDistribution(1, -1) 481s ***** error ... 481s GammaDistribution(1, Inf) 481s ***** error ... 481s GammaDistribution(1, i) 481s ***** error ... 481s GammaDistribution(1, "a") 481s ***** error ... 481s GammaDistribution(1, [1, 2]) 481s ***** error ... 481s GammaDistribution(1, NaN) 481s ***** error ... 481s cdf (GammaDistribution, 2, "uper") 481s ***** error ... 481s cdf (GammaDistribution, 2, 3) 481s ***** shared x 481s x = gamrnd (1, 1, [100, 1]); 481s ***** error ... 481s paramci (GammaDistribution.fit (x), "alpha") 481s ***** error ... 481s paramci (GammaDistribution.fit (x), "alpha", 0) 481s ***** error ... 481s paramci (GammaDistribution.fit (x), "alpha", 1) 481s ***** error ... 481s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 481s ***** error ... 481s paramci (GammaDistribution.fit (x), "alpha", "") 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 482s "parameter", {"a", "b", "param"}) 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "parameter", "param") 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "NAME", "value") 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 482s ***** error ... 482s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 482s "NAME", "value") 482s ***** error ... 482s plot (GammaDistribution, "Parent") 482s ***** error ... 482s plot (GammaDistribution, "PlotType", 12) 482s ***** error ... 482s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 482s ***** error ... 482s plot (GammaDistribution, "PlotType", "pdfcdf") 482s ***** error ... 482s plot (GammaDistribution, "Discrete", "pdfcdf") 482s ***** error ... 482s plot (GammaDistribution, "Discrete", [1, 0]) 482s ***** error ... 482s plot (GammaDistribution, "Discrete", {true}) 482s ***** error ... 482s plot (GammaDistribution, "Parent", 12) 482s ***** error ... 482s plot (GammaDistribution, "Parent", "hax") 482s ***** error ... 482s plot (GammaDistribution, "invalidNAME", "pdf") 482s ***** error ... 482s plot (GammaDistribution, "PlotType", "probability") 482s ***** error ... 482s proflik (GammaDistribution, 2) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 3) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), [1, 2]) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), {1}) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, ones (2)) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display") 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display", 1) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 482s ***** error ... 482s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 482s ***** error ... 482s truncate (GammaDistribution) 482s ***** error ... 482s truncate (GammaDistribution, 2) 482s ***** error ... 482s truncate (GammaDistribution, 4, 2) 482s ***** shared pd 482s pd = GammaDistribution(1, 1); 482s pd(2) = GammaDistribution(1, 3); 482s ***** error cdf (pd, 1) 482s ***** error icdf (pd, 0.5) 482s ***** error iqr (pd) 482s ***** error mean (pd) 482s ***** error median (pd) 482s ***** error negloglik (pd) 482s ***** error paramci (pd) 482s ***** error pdf (pd, 1) 482s ***** error plot (pd) 482s ***** error proflik (pd, 2) 482s ***** error random (pd) 482s ***** error std (pd) 482s ***** error ... 482s truncate (pd, 2, 4) 482s ***** error var (pd) 482s 96 tests, 96 passed, 0 known failure, 0 skipped 482s [inst/dist_obj/RayleighDistribution.m] 482s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/RayleighDistribution.m 482s ***** shared pd, t 482s pd = RayleighDistribution; 482s t = truncate (pd, 2, 4); 482s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 482s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 482s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 482s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 482s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 482s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 482s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 482s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 482s ***** assert (iqr (pd), 0.9066, 1e-4); 482s ***** assert (iqr (t), 0.4609, 1e-4); 482s ***** assert (mean (pd), 1.2533, 1e-4); 482s ***** assert (mean (t), 2.4169, 1e-4); 482s ***** assert (median (pd), 1.1774, 1e-4); 482s ***** assert (median (t), 2.3198, 1e-4); 482s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 482s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 482s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 482s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 482s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 482s ***** assert (any (random (t, 1000, 1) < 2), false); 482s ***** assert (any (random (t, 1000, 1) > 4), false); 482s ***** assert (std (pd), 0.6551, 1e-4); 482s ***** assert (std (t), 0.3591, 1e-4); 482s ***** assert (var (pd), 0.4292, 1e-4); 482s ***** assert (var (t), 0.1290, 1e-4); 482s ***** error ... 482s RayleighDistribution(0) 482s ***** error ... 482s RayleighDistribution(-1) 482s ***** error ... 482s RayleighDistribution(Inf) 482s ***** error ... 482s RayleighDistribution(i) 482s ***** error ... 482s RayleighDistribution("a") 482s ***** error ... 482s RayleighDistribution([1, 2]) 482s ***** error ... 482s RayleighDistribution(NaN) 482s ***** error ... 482s cdf (RayleighDistribution, 2, "uper") 482s ***** error ... 482s cdf (RayleighDistribution, 2, 3) 482s ***** shared x 482s x = raylrnd (1, [1, 100]); 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 0) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 1) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", "") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 482s "parameter", {"sigma", "param"}) 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "parameter", "param") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "NAME", "value") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 482s ***** error ... 482s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 482s "parameter", "sigma", "NAME", "value") 482s ***** error ... 482s plot (RayleighDistribution, "Parent") 482s ***** error ... 482s plot (RayleighDistribution, "PlotType", 12) 482s ***** error ... 482s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 482s ***** error ... 482s plot (RayleighDistribution, "PlotType", "pdfcdf") 482s ***** error ... 482s plot (RayleighDistribution, "Discrete", "pdfcdf") 482s ***** error ... 482s plot (RayleighDistribution, "Discrete", [1, 0]) 482s ***** error ... 482s plot (RayleighDistribution, "Discrete", {true}) 482s ***** error ... 482s plot (RayleighDistribution, "Parent", 12) 482s ***** error ... 482s plot (RayleighDistribution, "Parent", "hax") 482s ***** error ... 482s plot (RayleighDistribution, "invalidNAME", "pdf") 482s ***** error ... 482s plot (RayleighDistribution, "PlotType", "probability") 482s ***** error ... 482s proflik (RayleighDistribution, 2) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 3) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), [1, 2]) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), {1}) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, ones (2)) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display") 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 482s ***** error ... 482s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 482s ***** error ... 482s truncate (RayleighDistribution) 482s ***** error ... 482s truncate (RayleighDistribution, 2) 482s ***** error ... 482s truncate (RayleighDistribution, 4, 2) 482s ***** shared pd 482s pd = RayleighDistribution(1); 482s pd(2) = RayleighDistribution(3); 482s ***** error cdf (pd, 1) 482s ***** error icdf (pd, 0.5) 482s ***** error iqr (pd) 482s ***** error mean (pd) 482s ***** error median (pd) 482s ***** error negloglik (pd) 482s ***** error paramci (pd) 482s ***** error pdf (pd, 1) 482s ***** error plot (pd) 482s ***** error proflik (pd, 2) 482s ***** error random (pd) 482s ***** error std (pd) 482s ***** error ... 482s truncate (pd, 2, 4) 482s ***** error var (pd) 482s 90 tests, 90 passed, 0 known failure, 0 skipped 482s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 482s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 482s ***** shared pd, t 482s pd = GeneralizedExtremeValueDistribution; 482s t = truncate (pd, 2, 4); 482s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 482s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 482s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 482s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 482s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 482s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 482s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 482s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 482s ***** assert (iqr (pd), 1.5725, 1e-4); 482s ***** assert (iqr (t), 0.8164, 1e-4); 482s ***** assert (mean (pd), 0.5772, 1e-4); 482s ***** assert (mean (t), 2.7043, 1e-4); 482s ***** assert (median (pd), 0.3665, 1e-4); 482s ***** assert (median (t), 2.5887, 1e-4); 482s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 482s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 482s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 482s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 482s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 482s ***** assert (any (random (t, 1000, 1) < 2), false); 482s ***** assert (any (random (t, 1000, 1) > 4), false); 482s ***** assert (std (pd), 1.2825, 1e-4); 482s ***** assert (std (t), 0.5289, 1e-4); 482s ***** assert (var (pd), 1.6449, 1e-4); 482s ***** assert (var (t), 0.2798, 1e-4); 482s ***** error ... 482s GeneralizedExtremeValueDistribution(Inf, 1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(i, 1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution("a", 1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(NaN, 1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 0, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, -1, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, Inf, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, i, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, "a", 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, NaN, 1) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 1, Inf) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 1, i) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 1, "a") 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 482s ***** error ... 482s GeneralizedExtremeValueDistribution(1, 1, NaN) 482s ***** error ... 482s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 482s ***** error ... 482s cdf (GeneralizedExtremeValueDistribution, 2, 3) 482s ***** shared x 482s x = gevrnd (1, 1, 1, [1, 100]); 482s ***** error ... 482s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 482s ***** error ... 482s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 482s ***** error ... 482s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 482s ***** error ... 482s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 483s "parameter", "sigma", "alpha", {0.05}) 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 483s "parameter", {"k", "sigma", "mu", "param"}) 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 483s "parameter", {"k", "sigma", "mu", "param"}) 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 483s "parameter", "param") 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 483s "NAME", "value") 483s ***** error ... 483s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 483s "parameter", "sigma", "NAME", "value") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Parent") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 483s ***** error ... 483s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 483s ***** error ... 483s proflik (GeneralizedExtremeValueDistribution, 2) 483s ***** error ... 483s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 483s ***** error ... 483s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 483s ***** error ... 483s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 483s ***** error ... 483s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 484s "Display", ["on"; "on"]) 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 484s ***** error ... 484s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 484s "Display", "on") 484s ***** error ... 484s truncate (GeneralizedExtremeValueDistribution) 484s ***** error ... 484s truncate (GeneralizedExtremeValueDistribution, 2) 484s ***** error ... 484s truncate (GeneralizedExtremeValueDistribution, 4, 2) 484s ***** shared pd 484s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 484s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 484s ***** error cdf (pd, 1) 484s ***** error icdf (pd, 0.5) 484s ***** error iqr (pd) 484s ***** error mean (pd) 484s ***** error median (pd) 484s ***** error negloglik (pd) 484s ***** error paramci (pd) 484s ***** error pdf (pd, 1) 484s ***** error plot (pd) 484s ***** error proflik (pd, 2) 484s ***** error random (pd) 484s ***** error std (pd) 484s ***** error ... 484s truncate (pd, 2, 4) 484s ***** error var (pd) 484s 100 tests, 100 passed, 0 known failure, 0 skipped 484s [inst/dist_obj/WeibullDistribution.m] 484s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/WeibullDistribution.m 484s ***** shared pd, t 484s pd = WeibullDistribution; 484s t = truncate (pd, 2, 4); 484s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 484s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 484s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 484s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 484s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 484s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 484s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 484s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 484s ***** assert (iqr (pd), 1.0986, 1e-4); 484s ***** assert (iqr (t), 0.8020, 1e-4); 484s ***** assert (mean (pd), 1, 1e-14); 484s ***** assert (mean (t), 2.6870, 1e-4); 484s ***** assert (median (pd), 0.6931, 1e-4); 484s ***** assert (median (t), 2.5662, 1e-4); 484s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 484s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 484s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 484s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 484s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 484s ***** assert (any (random (t, 1000, 1) < 2), false); 484s ***** assert (any (random (t, 1000, 1) > 4), false); 484s ***** assert (std (pd), 1, 1e-14); 484s ***** assert (std (t), 0.5253, 1e-4); 484s ***** assert (var (pd), 1, 1e-14); 484s ***** assert (var (t), 0.2759, 1e-4); 484s ***** error ... 484s WeibullDistribution(0, 1) 484s ***** error ... 484s WeibullDistribution(-1, 1) 484s ***** error ... 484s WeibullDistribution(Inf, 1) 484s ***** error ... 484s WeibullDistribution(i, 1) 484s ***** error ... 484s WeibullDistribution("a", 1) 484s ***** error ... 484s WeibullDistribution([1, 2], 1) 484s ***** error ... 484s WeibullDistribution(NaN, 1) 484s ***** error ... 484s WeibullDistribution(1, 0) 484s ***** error ... 484s WeibullDistribution(1, -1) 484s ***** error ... 484s WeibullDistribution(1, Inf) 484s ***** error ... 484s WeibullDistribution(1, i) 484s ***** error ... 484s WeibullDistribution(1, "a") 484s ***** error ... 484s WeibullDistribution(1, [1, 2]) 484s ***** error ... 484s WeibullDistribution(1, NaN) 484s ***** error ... 484s cdf (WeibullDistribution, 2, "uper") 484s ***** error ... 484s cdf (WeibullDistribution, 2, 3) 484s ***** shared x 484s x = wblrnd (1, 1, [1, 100]); 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 0) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 1) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", "") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 484s "parameter", {"lambda", "k", "param"}) 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "parameter", "param") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "NAME", "value") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 484s ***** error ... 484s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 484s "NAME", "value") 484s ***** error ... 484s plot (WeibullDistribution, "Parent") 484s ***** error ... 484s plot (WeibullDistribution, "PlotType", 12) 484s ***** error ... 484s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 484s ***** error ... 484s plot (WeibullDistribution, "PlotType", "pdfcdf") 484s ***** error ... 484s plot (WeibullDistribution, "Discrete", "pdfcdf") 484s ***** error ... 484s plot (WeibullDistribution, "Discrete", [1, 0]) 484s ***** error ... 484s plot (WeibullDistribution, "Discrete", {true}) 484s ***** error ... 484s plot (WeibullDistribution, "Parent", 12) 484s ***** error ... 484s plot (WeibullDistribution, "Parent", "hax") 484s ***** error ... 484s plot (WeibullDistribution, "invalidNAME", "pdf") 484s ***** error ... 484s plot (WeibullDistribution, "PlotType", "probability") 484s ***** error ... 484s proflik (WeibullDistribution, 2) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 3) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), [1, 2]) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), {1}) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, ones (2)) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display") 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 484s ***** error ... 484s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 484s ***** error ... 484s truncate (WeibullDistribution) 484s ***** error ... 484s truncate (WeibullDistribution, 2) 484s ***** error ... 484s truncate (WeibullDistribution, 4, 2) 484s ***** shared pd 484s pd = WeibullDistribution(1, 1); 484s pd(2) = WeibullDistribution(1, 3); 484s ***** error cdf (pd, 1) 484s ***** error icdf (pd, 0.5) 484s ***** error iqr (pd) 484s ***** error mean (pd) 484s ***** error median (pd) 484s ***** error negloglik (pd) 484s ***** error paramci (pd) 484s ***** error pdf (pd, 1) 484s ***** error plot (pd) 484s ***** error proflik (pd, 2) 484s ***** error random (pd) 484s ***** error std (pd) 484s ***** error ... 484s truncate (pd, 2, 4) 484s ***** error var (pd) 484s 97 tests, 97 passed, 0 known failure, 0 skipped 484s [inst/dist_obj/BinomialDistribution.m] 484s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/BinomialDistribution.m 484s ***** shared pd, t, t_inf 484s pd = BinomialDistribution (5, 0.5); 484s t = truncate (pd, 2, 4); 484s t_inf = truncate (pd, 2, Inf); 484s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 484s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 484s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 484s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 484s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 484s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 484s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 484s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 484s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 484s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 484s ***** assert (iqr (pd), 1); 484s ***** assert (iqr (t), 1); 484s ***** assert (mean (pd), 2.5, 1e-10); 484s ***** assert (mean (t), 2.8, 1e-10); 484s ***** assert (mean (t_inf), 2.8846, 1e-4); 484s ***** assert (median (pd), 2.5); 484s ***** assert (median (t), 3); 484s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 484s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 484s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 484s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 484s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 484s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 484s ***** assert (any (random (t, 1000, 1) < 2), false); 484s ***** assert (any (random (t, 1000, 1) > 4), false); 484s ***** assert (std (pd), 1.1180, 1e-4); 484s ***** assert (std (t), 0.7483, 1e-4); 484s ***** assert (std (t_inf), 0.8470, 1e-4); 484s ***** assert (var (pd), 1.2500, 1e-4); 484s ***** assert (var (t), 0.5600, 1e-4); 484s ***** assert (var (t_inf), 0.7175, 1e-4); 484s ***** error ... 484s BinomialDistribution(Inf, 0.5) 484s ***** error ... 484s BinomialDistribution(i, 0.5) 484s ***** error ... 484s BinomialDistribution("a", 0.5) 484s ***** error ... 484s BinomialDistribution([1, 2], 0.5) 484s ***** error ... 484s BinomialDistribution(NaN, 0.5) 484s ***** error ... 484s BinomialDistribution(1, 1.01) 484s ***** error ... 484s BinomialDistribution(1, -0.01) 484s ***** error ... 484s BinomialDistribution(1, Inf) 484s ***** error ... 484s BinomialDistribution(1, i) 484s ***** error ... 484s BinomialDistribution(1, "a") 484s ***** error ... 484s BinomialDistribution(1, [1, 2]) 484s ***** error ... 484s BinomialDistribution(1, NaN) 484s ***** error ... 484s cdf (BinomialDistribution, 2, "uper") 484s ***** error ... 484s cdf (BinomialDistribution, 2, 3) 484s ***** shared x 484s rand ("seed", 2); 484s x = binornd (5, 0.5, [1, 100]); 484s ***** error ... 484s paramci (BinomialDistribution.fit (x, 6), "alpha") 484s ***** error ... 484s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 484s ***** error ... 484s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 484s ***** error ... 484s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 485s "alpha", {0.05}) 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), ... 485s "parameter", {"N", "p", "param"}) 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 485s "parameter", {"N", "p", "param"}) 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 485s "parameter", "param") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 485s "NAME", "value") 485s ***** error ... 485s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 485s "parameter", "p", "NAME", "value") 485s ***** error ... 485s plot (BinomialDistribution, "Parent") 485s ***** error ... 485s plot (BinomialDistribution, "PlotType", 12) 485s ***** error ... 485s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 485s ***** error ... 485s plot (BinomialDistribution, "PlotType", "pdfcdf") 485s ***** error ... 485s plot (BinomialDistribution, "Discrete", "pdfcdf") 485s ***** error ... 485s plot (BinomialDistribution, "Discrete", [1, 0]) 485s ***** error ... 485s plot (BinomialDistribution, "Discrete", {true}) 485s ***** error ... 485s plot (BinomialDistribution, "Parent", 12) 485s ***** error ... 485s plot (BinomialDistribution, "Parent", "hax") 485s ***** error ... 485s plot (BinomialDistribution, "invalidNAME", "pdf") 485s ***** error ... 485s plot (BinomialDistribution, "PlotType", "probability") 485s ***** error ... 485s proflik (BinomialDistribution, 2) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 3) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), {1}) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 485s ***** error ... 485s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 485s ***** error ... 485s truncate (BinomialDistribution) 485s ***** error ... 485s truncate (BinomialDistribution, 2) 485s ***** error ... 485s truncate (BinomialDistribution, 4, 2) 485s ***** shared pd 485s pd = BinomialDistribution(1, 0.5); 485s pd(2) = BinomialDistribution(1, 0.6); 485s ***** error cdf (pd, 1) 485s ***** error icdf (pd, 0.5) 485s ***** error iqr (pd) 485s ***** error mean (pd) 485s ***** error median (pd) 485s ***** error negloglik (pd) 485s ***** error paramci (pd) 485s ***** error pdf (pd, 1) 485s ***** error plot (pd) 485s ***** error proflik (pd, 2) 485s ***** error random (pd) 485s ***** error std (pd) 485s ***** error ... 485s truncate (pd, 2, 4) 485s ***** error var (pd) 485s 102 tests, 102 passed, 0 known failure, 0 skipped 485s [inst/dist_obj/GeneralizedParetoDistribution.m] 485s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/GeneralizedParetoDistribution.m 485s ***** shared pd, t 485s pd = GeneralizedParetoDistribution (1, 1, 1); 485s t = truncate (pd, 2, 4); 485s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 485s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 485s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 485s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 485s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 485s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 485s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 485s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 485s ***** assert (iqr (pd), 2.6667, 1e-4); 485s ***** assert (iqr (t), 0.9143, 1e-4); 485s ***** assert (mean (pd), Inf); 485s ***** assert (mean (t), 2.7726, 1e-4); 485s ***** assert (median (pd), 2); 485s ***** assert (median (t), 2.6667, 1e-4); 485s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 485s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 485s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 485s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 485s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 485s ***** assert (any (random (t, 1000, 1) < 2), false); 485s ***** assert (any (random (t, 1000, 1) > 4), false); 485s ***** assert (std (pd), Inf); 485s ***** assert (std (t), 0.5592, 1e-4); 485s ***** assert (var (pd), Inf); 485s ***** assert (var (t), 0.3128, 1e-4); 485s ***** error ... 485s GeneralizedParetoDistribution(Inf, 1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(i, 1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution("a", 1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution([1, 2], 1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(NaN, 1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, 0, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, -1, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, Inf, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, i, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, "a", 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, [1, 2], 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, NaN, 1) 485s ***** error ... 485s GeneralizedParetoDistribution(1, 1, Inf) 485s ***** error ... 485s GeneralizedParetoDistribution(1, 1, i) 485s ***** error ... 485s GeneralizedParetoDistribution(1, 1, "a") 485s ***** error ... 485s GeneralizedParetoDistribution(1, 1, [1, 2]) 485s ***** error ... 485s GeneralizedParetoDistribution(1, 1, NaN) 485s ***** error ... 485s cdf (GeneralizedParetoDistribution, 2, "uper") 485s ***** error ... 485s cdf (GeneralizedParetoDistribution, 2, 3) 485s ***** shared x 485s x = gprnd (1, 1, 1, [1, 100]); 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 485s "parameter", "sigma", "alpha", {0.05}) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 485s "parameter", {"k", "sigma", "param"}) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 485s "parameter", {"k", "sigma", "param"}) 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 485s "parameter", "param") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 485s "NAME", "value") 485s ***** error ... 485s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 485s "parameter", "sigma", "NAME", "value") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Parent") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "PlotType", 12) 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Discrete", {true}) 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Parent", 12) 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "Parent", "hax") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 485s ***** error ... 485s plot (GeneralizedParetoDistribution, "PlotType", "probability") 485s ***** error ... 485s proflik (GeneralizedParetoDistribution, 2) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 485s "Display", ["on"; "on"]) 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 485s ***** error ... 485s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 485s "Display", "on") 485s ***** error ... 485s truncate (GeneralizedParetoDistribution) 485s ***** error ... 485s truncate (GeneralizedParetoDistribution, 2) 485s ***** error ... 485s truncate (GeneralizedParetoDistribution, 4, 2) 485s ***** shared pd 485s pd = GeneralizedParetoDistribution(1, 1, 1); 485s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 485s ***** error cdf (pd, 1) 485s ***** error icdf (pd, 0.5) 485s ***** error iqr (pd) 485s ***** error mean (pd) 485s ***** error median (pd) 485s ***** error negloglik (pd) 485s ***** error paramci (pd) 485s ***** error pdf (pd, 1) 485s ***** error plot (pd) 485s ***** error proflik (pd, 2) 485s ***** error random (pd) 485s ***** error std (pd) 485s ***** error ... 485s truncate (pd, 2, 4) 485s ***** error var (pd) 485s 100 tests, 100 passed, 0 known failure, 0 skipped 485s [inst/dist_obj/BirnbaumSaundersDistribution.m] 485s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/BirnbaumSaundersDistribution.m 485s ***** demo 485s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 485s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 485s ## distribution to this data and plot a PDF of the fitted distribution 485s ## superimposed on a histogram of the data 485s 485s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 485s randg ("seed", 21); 485s data = random (pd, 5000, 1); 485s pd = fitdist (data, "BirnbaumSaunders") 485s plot (pd) 485s msg = "Fitted Birnbaum-Saunders distribution with a = %0.2f and b = %0.2f"; 485s title (sprintf (msg, pd.beta, pd.gamma)) 485s ***** demo 485s ## Plot the PDF of a Birnbaum-Saunders distribution, with parameters beta = 1 485s ## and gamma = 0.5, truncated at [0, 2] intervals. Generate 10000 random 485s ## samples from this truncated distribution and superimpose a histogram with 485s ## 100 bins scaled accordingly 485s 485s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 485s t = truncate (pd, 0, 2) 485s randg ("seed", 21); 485s data = random (t, 10000, 1); 485s plot (t) 485s title ("Birnbaum-Saunders distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 485s hold on 485s hist (data, 100, 50) 485s hold off 485s ***** demo 485s ## Generate a data set of 100 random samples from a Birnbaum-Saunders 485s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 485s ## distribution to this data and plot its CDF superimposed over an empirical 485s ## CDF of the data 485s 485s pd = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 485s randg ("seed", 21); 485s data = random (pd, 100, 1); 485s pd = fitdist (data, "BirnbaumSaunders") 485s plot (pd, "plottype", "cdf") 485s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 485s pd.beta, pd.gamma)) 485s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 485s ***** shared pd, t 485s pd = BirnbaumSaundersDistribution; 485s t = truncate (pd, 2, 4); 485s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 485s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 485s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 485s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 485s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 485s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 485s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 485s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 485s ***** assert (iqr (pd), 1.4236, 1e-4); 485s ***** assert (iqr (t), 0.8968, 1e-4); 485s ***** assert (mean (pd), 1.5, eps); 485s ***** assert (mean (t), 2.7723, 1e-4); 485s ***** assert (median (pd), 1, 1e-4); 485s ***** assert (median (t), 2.6711, 1e-4); 485s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 485s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 485s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 485s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 485s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 485s ***** assert (any (random (t, 1000, 1) < 2), false); 485s ***** assert (any (random (t, 1000, 1) > 4), false); 485s ***** assert (std (pd), 1.5, eps); 485s ***** assert (std (t), 0.5528, 1e-4); 485s ***** assert (var (pd), 2.25, eps); 485s ***** assert (var (t), 0.3056, 1e-4); 485s ***** error ... 485s BirnbaumSaundersDistribution(0, 1) 485s ***** error ... 485s BirnbaumSaundersDistribution(Inf, 1) 485s ***** error ... 485s BirnbaumSaundersDistribution(i, 1) 485s ***** error ... 485s BirnbaumSaundersDistribution("beta", 1) 485s ***** error ... 485s BirnbaumSaundersDistribution([1, 2], 1) 485s ***** error ... 485s BirnbaumSaundersDistribution(NaN, 1) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, 0) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, -1) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, Inf) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, i) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, "beta") 485s ***** error ... 485s BirnbaumSaundersDistribution(1, [1, 2]) 485s ***** error ... 485s BirnbaumSaundersDistribution(1, NaN) 485s ***** error ... 485s cdf (BirnbaumSaundersDistribution, 2, "uper") 485s ***** error ... 485s cdf (BirnbaumSaundersDistribution, 2, 3) 485s ***** shared x 485s rand ("seed", 5); 485s x = bisarnd (1, 1, [100, 1]); 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 485s "beta", "alpha", {0.05}) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), ... 485s "parameter", {"beta", "gamma", "param"}) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 485s "parameter", {"beta", "gamma", "param"}) 485s ***** error ... 485s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 486s ***** error ... 486s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 486s "parameter", "param") 486s ***** error ... 486s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 486s ***** error ... 486s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 486s "NAME", "value") 486s ***** error ... 486s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 486s "parameter", "beta", "NAME", "value") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Parent") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "PlotType", 12) 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Parent", 12) 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "Parent", "hax") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 486s ***** error ... 486s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution, 2) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 3) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 486s ***** error ... 486s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 486s ***** error ... 486s truncate (BirnbaumSaundersDistribution) 486s ***** error ... 486s truncate (BirnbaumSaundersDistribution, 2) 486s ***** error ... 486s truncate (BirnbaumSaundersDistribution, 4, 2) 486s ***** shared pd 486s pd = BirnbaumSaundersDistribution(1, 1); 486s pd(2) = BirnbaumSaundersDistribution(1, 3); 486s ***** error cdf (pd, 1) 486s ***** error icdf (pd, 0.5) 486s ***** error iqr (pd) 486s ***** error mean (pd) 486s ***** error median (pd) 486s ***** error negloglik (pd) 486s ***** error paramci (pd) 486s ***** error pdf (pd, 1) 486s ***** error plot (pd) 486s ***** error proflik (pd, 2) 486s ***** error random (pd) 486s ***** error std (pd) 486s ***** error ... 486s truncate (pd, 2, 4) 486s ***** error var (pd) 486s 96 tests, 96 passed, 0 known failure, 0 skipped 486s [inst/dist_obj/MultinomialDistribution.m] 486s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/MultinomialDistribution.m 486s ***** shared pd, t 486s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 486s t = truncate (pd, 2, 4); 486s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 486s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 486s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 486s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 486s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 486s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 486s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 486s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 486s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 486s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 486s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 486s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 486s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 486s ***** assert (iqr (pd), 2); 486s ***** assert (iqr (t), 2); 486s ***** assert (mean (pd), 3.3, 1e-14); 486s ***** assert (mean (t), 3, eps); 486s ***** assert (median (pd), 3); 486s ***** assert (median (t), 3); 486s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 486s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 486s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 486s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 486s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 486s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 486s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 486s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 486s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 486s ***** assert (std (pd), 1.4177, 1e-4); 486s ***** assert (std (t), 0.7559, 1e-4); 486s ***** assert (var (pd), 2.0100, 1e-4); 486s ***** assert (var (t), 0.5714, 1e-4); 486s ***** error ... 486s MultinomialDistribution(0) 486s ***** error ... 486s MultinomialDistribution(-1) 486s ***** error ... 486s MultinomialDistribution(Inf) 486s ***** error ... 486s MultinomialDistribution(i) 486s ***** error ... 486s MultinomialDistribution("a") 486s ***** error ... 486s MultinomialDistribution([1, 2]) 486s ***** error ... 486s MultinomialDistribution(NaN) 486s ***** error ... 486s cdf (MultinomialDistribution, 2, "uper") 486s ***** error ... 486s cdf (MultinomialDistribution, 2, 3) 486s ***** error ... 486s cdf (MultinomialDistribution, i) 486s ***** error ... 486s plot (MultinomialDistribution, "Parent") 486s ***** error ... 486s plot (MultinomialDistribution, "PlotType", 12) 486s ***** error ... 486s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 486s ***** error ... 486s plot (MultinomialDistribution, "PlotType", "pdfcdf") 486s ***** error ... 486s plot (MultinomialDistribution, "Discrete", "pdfcdf") 486s ***** error ... 486s plot (MultinomialDistribution, "Discrete", [1, 0]) 486s ***** error ... 486s plot (MultinomialDistribution, "Discrete", {true}) 486s ***** error ... 486s plot (MultinomialDistribution, "Parent", 12) 486s ***** error ... 486s plot (MultinomialDistribution, "Parent", "hax") 486s ***** error ... 486s plot (MultinomialDistribution, "invalidNAME", "pdf") 486s ***** error ... 486s plot (MultinomialDistribution, "PlotType", "probability") 486s ***** error ... 486s truncate (MultinomialDistribution) 486s ***** error ... 486s truncate (MultinomialDistribution, 2) 486s ***** error ... 486s truncate (MultinomialDistribution, 4, 2) 486s ***** shared pd 486s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 486s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 486s ***** error cdf (pd, 1) 486s ***** error icdf (pd, 0.5) 486s ***** error iqr (pd) 486s ***** error mean (pd) 486s ***** error median (pd) 486s ***** error pdf (pd, 1) 486s ***** error plot (pd) 486s ***** error random (pd) 486s ***** error std (pd) 486s ***** error ... 486s truncate (pd, 2, 4) 486s ***** error var (pd) 486s 64 tests, 64 passed, 0 known failure, 0 skipped 486s [inst/dist_obj/NakagamiDistribution.m] 486s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/NakagamiDistribution.m 486s ***** shared pd, t 486s pd = NakagamiDistribution; 486s t = truncate (pd, 2, 4); 486s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 486s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 486s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 486s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 486s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 486s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 486s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 486s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 486s ***** assert (iqr (pd), 0.6411, 1e-4); 486s ***** assert (iqr (t), 0.2502, 1e-4); 486s ***** assert (mean (pd), 0.8862, 1e-4); 486s ***** assert (mean (t), 2.2263, 1e-4); 486s ***** assert (median (pd), 0.8326, 1e-4); 486s ***** assert (median (t), 2.1664, 1e-4); 486s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 486s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 486s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 486s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 486s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 486s ***** assert (any (random (t, 1000, 1) < 2), false); 486s ***** assert (any (random (t, 1000, 1) > 4), false); 486s ***** assert (std (pd), 0.4633, 1e-4); 486s ***** assert (std (t), 0.2083, 1e-4); 486s ***** assert (var (pd), 0.2146, 1e-4); 486s ***** assert (var (t), 0.0434, 1e-4); 486s ***** error ... 486s NakagamiDistribution(Inf, 1) 486s ***** error ... 486s NakagamiDistribution(i, 1) 486s ***** error ... 486s NakagamiDistribution("a", 1) 486s ***** error ... 486s NakagamiDistribution([1, 2], 1) 486s ***** error ... 486s NakagamiDistribution(NaN, 1) 486s ***** error ... 486s NakagamiDistribution(1, 0) 486s ***** error ... 486s NakagamiDistribution(1, -1) 486s ***** error ... 486s NakagamiDistribution(1, Inf) 486s ***** error ... 486s NakagamiDistribution(1, i) 486s ***** error ... 486s NakagamiDistribution(1, "a") 486s ***** error ... 486s NakagamiDistribution(1, [1, 2]) 486s ***** error ... 486s NakagamiDistribution(1, NaN) 486s ***** error ... 486s cdf (NakagamiDistribution, 2, "uper") 486s ***** error ... 486s cdf (NakagamiDistribution, 2, 3) 486s ***** shared x 486s x = nakarnd (1, 0.5, [1, 100]); 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 0) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 1) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", "") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 486s "parameter", {"mu", "omega", "param"}) 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "parameter", "param") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "NAME", "value") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 486s ***** error ... 486s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 486s "NAME", "value") 486s ***** error ... 486s plot (NakagamiDistribution, "Parent") 486s ***** error ... 486s plot (NakagamiDistribution, "PlotType", 12) 486s ***** error ... 486s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 486s ***** error ... 486s plot (NakagamiDistribution, "PlotType", "pdfcdf") 486s ***** error ... 486s plot (NakagamiDistribution, "Discrete", "pdfcdf") 486s ***** error ... 486s plot (NakagamiDistribution, "Discrete", [1, 0]) 486s ***** error ... 486s plot (NakagamiDistribution, "Discrete", {true}) 486s ***** error ... 486s plot (NakagamiDistribution, "Parent", 12) 486s ***** error ... 486s plot (NakagamiDistribution, "Parent", "hax") 486s ***** error ... 486s plot (NakagamiDistribution, "invalidNAME", "pdf") 486s ***** error ... 486s plot (NakagamiDistribution, "PlotType", "probability") 486s ***** error ... 486s proflik (NakagamiDistribution, 2) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 3) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), [1, 2]) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), {1}) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display") 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 486s ***** error ... 486s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 487s ***** error ... 487s truncate (NakagamiDistribution) 487s ***** error ... 487s truncate (NakagamiDistribution, 2) 487s ***** error ... 487s truncate (NakagamiDistribution, 4, 2) 487s ***** shared pd 487s pd = NakagamiDistribution(1, 0.5); 487s pd(2) = NakagamiDistribution(1, 0.6); 487s ***** error cdf (pd, 1) 487s ***** error icdf (pd, 0.5) 487s ***** error iqr (pd) 487s ***** error mean (pd) 487s ***** error median (pd) 487s ***** error negloglik (pd) 487s ***** error paramci (pd) 487s ***** error pdf (pd, 1) 487s ***** error plot (pd) 487s ***** error proflik (pd, 2) 487s ***** error random (pd) 487s ***** error std (pd) 487s ***** error ... 487s truncate (pd, 2, 4) 487s ***** error var (pd) 487s 95 tests, 95 passed, 0 known failure, 0 skipped 487s [inst/dist_obj/LogisticDistribution.m] 487s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/LogisticDistribution.m 487s ***** shared pd, t 487s pd = LogisticDistribution (0, 1); 487s t = truncate (pd, 2, 4); 487s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 487s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 487s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 487s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 487s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 487s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 487s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 487s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 487s ***** assert (iqr (pd), 2.1972, 1e-4); 487s ***** assert (iqr (t), 0.8286, 1e-4); 487s ***** assert (mean (pd), 0, 1e-4); 487s ***** assert (mean (t), 2.7193, 1e-4); 487s ***** assert (median (pd), 0); 487s ***** assert (median (t), 2.6085, 1e-4); 487s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 487s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 487s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 487s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 487s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 487s ***** assert (any (random (t, 1000, 1) < 2), false); 487s ***** assert (any (random (t, 1000, 1) > 4), false); 487s ***** assert (std (pd), 1.8138, 1e-4); 487s ***** assert (std (t), 0.5320, 1e-4); 487s ***** assert (var (pd), 3.2899, 1e-4); 487s ***** assert (var (t), 0.2830, 1e-4); 487s ***** error ... 487s LogisticDistribution(Inf, 1) 487s ***** error ... 487s LogisticDistribution(i, 1) 487s ***** error ... 487s LogisticDistribution("a", 1) 487s ***** error ... 487s LogisticDistribution([1, 2], 1) 487s ***** error ... 487s LogisticDistribution(NaN, 1) 487s ***** error ... 487s LogisticDistribution(1, 0) 487s ***** error ... 487s LogisticDistribution(1, -1) 487s ***** error ... 487s LogisticDistribution(1, Inf) 487s ***** error ... 487s LogisticDistribution(1, i) 487s ***** error ... 487s LogisticDistribution(1, "a") 487s ***** error ... 487s LogisticDistribution(1, [1, 2]) 487s ***** error ... 487s LogisticDistribution(1, NaN) 487s ***** error ... 487s cdf (LogisticDistribution, 2, "uper") 487s ***** error ... 487s cdf (LogisticDistribution, 2, 3) 487s ***** shared x 487s x = logirnd (1, 1, [1, 100]); 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 0) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 1) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", "") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 487s "parameter", {"mu", "sigma", "param"}) 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "parameter", "param") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "NAME", "value") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 487s ***** error ... 487s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 487s "NAME", "value") 487s ***** error ... 487s plot (LogisticDistribution, "Parent") 487s ***** error ... 487s plot (LogisticDistribution, "PlotType", 12) 487s ***** error ... 487s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 487s ***** error ... 487s plot (LogisticDistribution, "PlotType", "pdfcdf") 487s ***** error ... 487s plot (LogisticDistribution, "Discrete", "pdfcdf") 487s ***** error ... 487s plot (LogisticDistribution, "Discrete", [1, 0]) 487s ***** error ... 487s plot (LogisticDistribution, "Discrete", {true}) 487s ***** error ... 487s plot (LogisticDistribution, "Parent", 12) 487s ***** error ... 487s plot (LogisticDistribution, "Parent", "hax") 487s ***** error ... 487s plot (LogisticDistribution, "invalidNAME", "pdf") 487s ***** error ... 487s plot (LogisticDistribution, "PlotType", "probability") 487s ***** error ... 487s proflik (LogisticDistribution, 2) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 3) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), [1, 2]) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), {1}) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, ones (2)) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display") 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 487s ***** error ... 487s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 487s ***** error ... 487s truncate (LogisticDistribution) 487s ***** error ... 487s truncate (LogisticDistribution, 2) 487s ***** error ... 487s truncate (LogisticDistribution, 4, 2) 487s ***** shared pd 487s pd = LogisticDistribution(1, 1); 487s pd(2) = LogisticDistribution(1, 3); 487s ***** error cdf (pd, 1) 487s ***** error icdf (pd, 0.5) 487s ***** error iqr (pd) 487s ***** error mean (pd) 487s ***** error median (pd) 487s ***** error negloglik (pd) 487s ***** error paramci (pd) 487s ***** error pdf (pd, 1) 487s ***** error plot (pd) 487s ***** error proflik (pd, 2) 487s ***** error random (pd) 487s ***** error std (pd) 487s ***** error ... 487s truncate (pd, 2, 4) 487s ***** error var (pd) 487s 95 tests, 95 passed, 0 known failure, 0 skipped 487s [inst/dist_obj/UniformDistribution.m] 487s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/UniformDistribution.m 487s ***** shared pd, t 487s pd = UniformDistribution (0, 5); 487s t = truncate (pd, 2, 4); 487s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 487s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 487s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 487s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 487s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 487s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 487s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 487s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 487s ***** assert (iqr (pd), 2.5, 1e-14); 487s ***** assert (iqr (t), 1, 1e-14); 487s ***** assert (mean (pd), 2.5, 1e-14); 487s ***** assert (mean (t), 3, 1e-14); 487s ***** assert (median (pd), 2.5, 1e-14); 487s ***** assert (median (t), 3, 1e-14); 487s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 487s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 487s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 487s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 487s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 487s ***** assert (any (random (t, 1000, 1) < 2), false); 487s ***** assert (any (random (t, 1000, 1) > 4), false); 487s ***** assert (std (pd), 1.4434, 1e-4); 487s ***** assert (std (t), 0.5774, 1e-4); 487s ***** assert (var (pd), 2.0833, 1e-4); 487s ***** assert (var (t), 0.3333, 1e-4); 487s ***** error ... 487s UniformDistribution (i, 1) 487s ***** error ... 487s UniformDistribution (Inf, 1) 487s ***** error ... 487s UniformDistribution ([1, 2], 1) 487s ***** error ... 487s UniformDistribution ("a", 1) 487s ***** error ... 487s UniformDistribution (NaN, 1) 487s ***** error ... 487s UniformDistribution (1, i) 487s ***** error ... 487s UniformDistribution (1, Inf) 487s ***** error ... 487s UniformDistribution (1, [1, 2]) 487s ***** error ... 487s UniformDistribution (1, "a") 487s ***** error ... 487s UniformDistribution (1, NaN) 487s ***** error ... 487s UniformDistribution (2, 1) 487s ***** error ... 487s cdf (UniformDistribution, 2, "uper") 487s ***** error ... 487s cdf (UniformDistribution, 2, 3) 487s ***** error ... 487s plot (UniformDistribution, "Parent") 487s ***** error ... 487s plot (UniformDistribution, "PlotType", 12) 487s ***** error ... 487s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 487s ***** error ... 487s plot (UniformDistribution, "PlotType", "pdfcdf") 487s ***** error ... 487s plot (UniformDistribution, "Discrete", "pdfcdf") 487s ***** error ... 487s plot (UniformDistribution, "Discrete", [1, 0]) 487s ***** error ... 487s plot (UniformDistribution, "Discrete", {true}) 487s ***** error ... 487s plot (UniformDistribution, "Parent", 12) 487s ***** error ... 487s plot (UniformDistribution, "Parent", "hax") 487s ***** error ... 487s plot (UniformDistribution, "invalidNAME", "pdf") 487s ***** error ... 487s plot (UniformDistribution, "PlotType", "probability") 487s ***** error ... 487s truncate (UniformDistribution) 487s ***** error ... 487s truncate (UniformDistribution, 2) 487s ***** error ... 487s truncate (UniformDistribution, 4, 2) 487s ***** shared pd 487s pd = UniformDistribution (0, 1); 487s pd(2) = UniformDistribution (0, 2); 487s ***** error cdf (pd, 1) 487s ***** error icdf (pd, 0.5) 487s ***** error iqr (pd) 487s ***** error mean (pd) 487s ***** error median (pd) 487s ***** error pdf (pd, 1) 487s ***** error plot (pd) 487s ***** error random (pd) 487s ***** error std (pd) 487s ***** error ... 487s truncate (pd, 2, 4) 487s ***** error var (pd) 487s 63 tests, 63 passed, 0 known failure, 0 skipped 487s [inst/dist_obj/BurrDistribution.m] 487s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/BurrDistribution.m 487s ***** demo 487s ## Generate a data set of 5000 random samples from a Burr type XII 487s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 487s ## XII distribution to this data and plot a PDF of the fitted distribution 487s ## superimposed on a histogram of the data 487s 487s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 487s rand ("seed", 21); 487s data = random (pd, 5000, 1); 487s pd = fitdist (data, "Burr") 487s plot (pd) 487s msg = strcat (["Fitted Burr type XII distribution with"], ... 487s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 487s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 487s ***** demo 487s ## Plot the PDF of a Burr type XII distribution, with parameters alpha = 1, 487s ## c = 2, and k = 1, truncated at [0, 2] intervals. Generate 10000 random 487s ## samples from this truncated distribution and superimpose a histogram with 487s ## 100 bins scaled accordingly 487s 487s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 487s t = truncate (pd, 0.5, 2.5) 487s rand ("seed", 21); 487s data = random (t, 10000, 1); 487s plot (t) 487s title ("Burr type XII distribution (alpha = 1, c = 2, k = 1) truncated at [0.5, 2.5]") 487s hold on 487s hist (data, 100, 50) 487s hold off 487s ***** demo 487s ## Generate a data set of 100 random samples from a Burr type XII 487s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 487s ## XII distribution to this data and plot its CDF superimposed over an 487s ## empirical CDF of the data 487s 487s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 487s rand ("seed", 21); 487s data = random (pd, 100, 1); 487s pd = fitdist (data, "Burr") 487s plot (pd, "plottype", "cdf") 487s msg = strcat (["Fitted Burr type XII distribution with"], ... 487s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 487s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 487s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 487s ***** shared pd, t 487s pd = BurrDistribution; 487s t = truncate (pd, 2, 4); 487s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 487s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 487s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 487s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 487s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 487s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 487s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 487s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 487s ***** assert (iqr (pd), 2.6667, 1e-4); 487s ***** assert (iqr (t), 0.9524, 1e-4); 487s ***** assert (mean (pd), Inf); 487s ***** assert (mean (t), 2.8312, 1e-4); 488s ***** assert (median (pd), 1, 1e-4); 488s ***** assert (median (t), 2.75, 1e-4); 488s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 488s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 488s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 488s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 488s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 488s ***** assert (any (random (t, 1000, 1) < 2), false); 488s ***** assert (any (random (t, 1000, 1) > 4), false); 488s ***** assert (std (pd), Inf); 488s ***** assert (std (t), 0.5674, 1e-4); 488s ***** assert (var (pd), Inf); 488s ***** assert (var (t), 0.3220, 1e-4); 488s ***** error ... 488s BurrDistribution(0, 1, 1) 488s ***** error ... 488s BurrDistribution(-1, 1, 1) 488s ***** error ... 488s BurrDistribution(Inf, 1, 1) 488s ***** error ... 488s BurrDistribution(i, 1, 1) 488s ***** error ... 488s BurrDistribution("a", 1, 1) 488s ***** error ... 488s BurrDistribution([1, 2], 1, 1) 488s ***** error ... 488s BurrDistribution(NaN, 1, 1) 488s ***** error ... 488s BurrDistribution(1, 0, 1) 488s ***** error ... 488s BurrDistribution(1, -1, 1) 488s ***** error ... 488s BurrDistribution(1, Inf, 1) 488s ***** error ... 488s BurrDistribution(1, i, 1) 488s ***** error ... 488s BurrDistribution(1, "a", 1) 488s ***** error ... 488s BurrDistribution(1, [1, 2], 1) 488s ***** error ... 488s BurrDistribution(1, NaN, 1) 488s ***** error ... 488s BurrDistribution(1, 1, 0) 488s ***** error ... 488s BurrDistribution(1, 1, -1) 488s ***** error ... 488s BurrDistribution(1, 1, Inf) 488s ***** error ... 488s BurrDistribution(1, 1, i) 488s ***** error ... 488s BurrDistribution(1, 1, "a") 488s ***** error ... 488s BurrDistribution(1, 1, [1, 2]) 488s ***** error ... 488s BurrDistribution(1, 1, NaN) 488s ***** error ... 488s cdf (BurrDistribution, 2, "uper") 488s ***** error ... 488s cdf (BurrDistribution, 2, 3) 488s ***** shared x 488s rand ("seed", 4); 488s x = burrrnd (1, 1, 1, [1, 100]); 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 0) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 1) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", "") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 488s "parameter", {"alpha", "c", "k", "param"}) 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "parameter", "param") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "NAME", "value") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 488s ***** error ... 488s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 488s "NAME", "value") 488s ***** error ... 488s plot (BurrDistribution, "Parent") 488s ***** error ... 488s plot (BurrDistribution, "PlotType", 12) 488s ***** error ... 488s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 488s ***** error ... 488s plot (BurrDistribution, "PlotType", "pdfcdf") 488s ***** error ... 488s plot (BurrDistribution, "Discrete", "pdfcdf") 488s ***** error ... 488s plot (BurrDistribution, "Discrete", [1, 0]) 488s ***** error ... 488s plot (BurrDistribution, "Discrete", {true}) 488s ***** error ... 488s plot (BurrDistribution, "Parent", 12) 488s ***** error ... 488s plot (BurrDistribution, "Parent", "hax") 488s ***** error ... 488s plot (BurrDistribution, "invalidNAME", "pdf") 488s ***** error ... 488s plot (BurrDistribution, "PlotType", "probability") 488s ***** error ... 488s proflik (BurrDistribution, 2) 488s ***** error ... 488s proflik (BurrDistribution.fit (x), 4) 488s ***** error ... 488s proflik (BurrDistribution.fit (x), [1, 2]) 488s ***** error ... 488s proflik (BurrDistribution.fit (x), {1}) 488s ***** error ... 488s proflik (BurrDistribution.fit (x), 1, ones (2)) 488s ***** error ... 488s proflik (BurrDistribution.fit (x), 1, "Display") 488s ***** error ... 488s proflik (BurrDistribution.fit (x), 1, "Display", 1) 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 489s ***** error ... 489s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 489s ***** error ... 489s truncate (BurrDistribution) 489s ***** error ... 489s truncate (BurrDistribution, 2) 489s ***** error ... 489s truncate (BurrDistribution, 4, 2) 489s ***** shared pd 489s pd = BurrDistribution(1, 1, 1); 489s pd(2) = BurrDistribution(1, 3, 1); 489s ***** error cdf (pd, 1) 489s ***** error icdf (pd, 0.5) 489s ***** error iqr (pd) 489s ***** error mean (pd) 489s ***** error median (pd) 489s ***** error negloglik (pd) 489s ***** error paramci (pd) 489s ***** error pdf (pd, 1) 489s ***** error plot (pd) 489s ***** error proflik (pd, 2) 489s ***** error random (pd) 489s ***** error std (pd) 489s ***** error ... 489s truncate (pd, 2, 4) 489s ***** error var (pd) 489s 104 tests, 104 passed, 0 known failure, 0 skipped 489s [inst/dist_obj/TriangularDistribution.m] 489s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/TriangularDistribution.m 489s ***** shared pd, t 489s pd = TriangularDistribution (0, 3, 5); 489s t = truncate (pd, 2, 4); 489s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 489s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 489s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 489s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 489s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 489s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 489s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 489s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 489s ***** assert (iqr (pd), 1.4824, 1e-4); 489s ***** assert (iqr (t), 0.8678, 1e-4); 489s ***** assert (mean (pd), 2.6667, 1e-4); 489s ***** assert (mean (t), 2.9649, 1e-4); 489s ***** assert (median (pd), 2.7386, 1e-4); 489s ***** assert (median (t), 2.9580, 1e-4); 489s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 489s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 489s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 489s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 489s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 489s ***** assert (any (random (t, 1000, 1) < 2), false); 489s ***** assert (any (random (t, 1000, 1) > 4), false); 489s ***** assert (std (pd), 1.0274, 1e-4); 489s ***** assert (std (t), 0.5369, 1e-4); 489s ***** assert (var (pd), 1.0556, 1e-4); 489s ***** assert (var (t), 0.2882, 1e-4); 489s ***** error ... 489s TriangularDistribution (i, 1, 2) 489s ***** error ... 489s TriangularDistribution (Inf, 1, 2) 489s ***** error ... 489s TriangularDistribution ([1, 2], 1, 2) 489s ***** error ... 489s TriangularDistribution ("a", 1, 2) 489s ***** error ... 489s TriangularDistribution (NaN, 1, 2) 489s ***** error ... 489s TriangularDistribution (1, i, 2) 489s ***** error ... 489s TriangularDistribution (1, Inf, 2) 489s ***** error ... 489s TriangularDistribution (1, [1, 2], 2) 489s ***** error ... 489s TriangularDistribution (1, "a", 2) 489s ***** error ... 489s TriangularDistribution (1, NaN, 2) 489s ***** error ... 489s TriangularDistribution (1, 2, i) 489s ***** error ... 489s TriangularDistribution (1, 2, Inf) 489s ***** error ... 489s TriangularDistribution (1, 2, [1, 2]) 489s ***** error ... 489s TriangularDistribution (1, 2, "a") 489s ***** error ... 489s TriangularDistribution (1, 2, NaN) 489s ***** error ... 489s TriangularDistribution (1, 1, 1) 489s ***** error ... 489s TriangularDistribution (1, 0.5, 2) 489s ***** error ... 489s cdf (TriangularDistribution, 2, "uper") 489s ***** error ... 489s cdf (TriangularDistribution, 2, 3) 489s ***** error ... 489s plot (TriangularDistribution, "Parent") 489s ***** error ... 489s plot (TriangularDistribution, "PlotType", 12) 489s ***** error ... 489s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 489s ***** error ... 489s plot (TriangularDistribution, "PlotType", "pdfcdf") 489s ***** error ... 489s plot (TriangularDistribution, "Discrete", "pdfcdf") 489s ***** error ... 489s plot (TriangularDistribution, "Discrete", [1, 0]) 489s ***** error ... 489s plot (TriangularDistribution, "Discrete", {true}) 489s ***** error ... 489s plot (TriangularDistribution, "Parent", 12) 489s ***** error ... 489s plot (TriangularDistribution, "Parent", "hax") 489s ***** error ... 489s plot (TriangularDistribution, "invalidNAME", "pdf") 489s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 489s plot (TriangularDistribution, "PlotType", "probability") 489s ***** error ... 489s truncate (TriangularDistribution) 489s ***** error ... 489s truncate (TriangularDistribution, 2) 489s ***** error ... 489s truncate (TriangularDistribution, 4, 2) 489s ***** shared pd 489s pd = TriangularDistribution (0, 1, 2); 489s pd(2) = TriangularDistribution (0, 1, 2); 489s ***** error cdf (pd, 1) 489s ***** error icdf (pd, 0.5) 489s ***** error iqr (pd) 489s ***** error mean (pd) 489s ***** error median (pd) 489s ***** error pdf (pd, 1) 489s ***** error plot (pd) 489s ***** error random (pd) 489s ***** error std (pd) 489s ***** error ... 489s truncate (pd, 2, 4) 489s ***** error var (pd) 489s 69 tests, 69 passed, 0 known failure, 0 skipped 489s [inst/dist_obj/PiecewiseLinearDistribution.m] 489s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/PiecewiseLinearDistribution.m 489s ***** shared pd, t 489s load patients 489s [f, x] = ecdf (Weight); 489s f = f(1:5:end); 489s x = x(1:5:end); 489s pd = PiecewiseLinearDistribution (x, f); 489s t = truncate (pd, 130, 180); 489s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 489s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 489s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 489s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 489s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 489s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 489s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 489s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 489s ***** assert (iqr (pd), 50.0833, 1e-4); 489s ***** assert (iqr (t), 36.8077, 1e-4); 489s ***** assert (mean (pd), 153.61, 1e-10); 489s ***** assert (mean (t), 152.311, 1e-3); 491s ***** assert (median (pd), 142, 1e-10); 491s ***** assert (median (t), 141.9462, 1e-4); 491s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0046], 1e-4); 491s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 491s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 491s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 491s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 492s ***** assert (any (random (t, 1000, 1) < 130), false); 492s ***** assert (any (random (t, 1000, 1) > 180), false); 492s ***** assert (std (pd), 26.5196, 1e-4); 492s ***** assert (std (t), 18.2941, 1e-4); 496s ***** assert (var (pd), 703.2879, 1e-4); 496s ***** assert (var (t), 334.6757, 1e-4); 502s ***** error ... 502s PiecewiseLinearDistribution ([0, i], [0, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 1], [0, i]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0], [1]) 502s ***** error ... 502s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 502s ***** error ... 502s cdf (PiecewiseLinearDistribution, 2, "uper") 502s ***** error ... 502s cdf (PiecewiseLinearDistribution, 2, 3) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Parent") 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "PlotType", 12) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Discrete", {true}) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Parent", 12) 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "Parent", "hax") 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 502s ***** error ... 502s plot (PiecewiseLinearDistribution, "PlotType", "probability") 502s ***** error ... 502s truncate (PiecewiseLinearDistribution) 502s ***** error ... 502s truncate (PiecewiseLinearDistribution, 2) 502s ***** error ... 502s truncate (PiecewiseLinearDistribution, 4, 2) 502s ***** shared pd 502s pd = PiecewiseLinearDistribution (); 502s pd(2) = PiecewiseLinearDistribution (); 502s ***** error cdf (pd, 1) 502s ***** error icdf (pd, 0.5) 502s ***** error iqr (pd) 502s ***** error mean (pd) 502s ***** error median (pd) 502s ***** error pdf (pd, 1) 502s ***** error plot (pd) 502s ***** error random (pd) 502s ***** error std (pd) 502s ***** error ... 502s truncate (pd, 2, 4) 502s ***** error var (pd) 502s 63 tests, 63 passed, 0 known failure, 0 skipped 502s [inst/dist_obj/NegativeBinomialDistribution.m] 502s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/NegativeBinomialDistribution.m 502s ***** shared pd, t, t_inf 502s pd = NegativeBinomialDistribution (5, 0.5); 502s t = truncate (pd, 2, 4); 502s t_inf = truncate (pd, 2, Inf); 502s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 502s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 502s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 502s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 502s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 502s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 502s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 502s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 502s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 502s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 502s ***** assert (iqr (pd), 4); 502s ***** assert (iqr (t), 2); 502s ***** assert (mean (pd), 5); 502s ***** assert (mean (t), 3.0500, 1e-4); 502s ***** assert (mean (t_inf), 5.5263, 1e-4); 502s ***** assert (median (pd), 4); 502s ***** assert (median (t), 3); 502s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 502s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 502s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 502s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 502s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 502s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 502s ***** assert (any (random (t, 1000, 1) < 2), false); 502s ***** assert (any (random (t, 1000, 1) > 4), false); 502s ***** assert (std (pd), 3.1623, 1e-4); 502s ***** assert (std (t), 0.8047, 1e-4); 502s ***** assert (std (t_inf), 2.9445, 1e-4); 502s ***** assert (var (pd), 10); 502s ***** assert (var (t), 0.6475, 1e-4); 502s ***** assert (var (t_inf), 8.6704, 1e-4); 502s ***** error ... 502s NegativeBinomialDistribution(Inf, 1) 502s ***** error ... 502s NegativeBinomialDistribution(i, 1) 502s ***** error ... 502s NegativeBinomialDistribution("a", 1) 502s ***** error ... 502s NegativeBinomialDistribution([1, 2], 1) 502s ***** error ... 502s NegativeBinomialDistribution(NaN, 1) 502s ***** error ... 502s NegativeBinomialDistribution(1, 0) 502s ***** error ... 502s NegativeBinomialDistribution(1, -1) 502s ***** error ... 502s NegativeBinomialDistribution(1, Inf) 502s ***** error ... 502s NegativeBinomialDistribution(1, i) 502s ***** error ... 502s NegativeBinomialDistribution(1, "a") 502s ***** error ... 502s NegativeBinomialDistribution(1, [1, 2]) 502s ***** error ... 502s NegativeBinomialDistribution(1, NaN) 502s ***** error ... 502s NegativeBinomialDistribution(1, 1.2) 502s ***** error ... 502s cdf (NegativeBinomialDistribution, 2, "uper") 502s ***** error ... 502s cdf (NegativeBinomialDistribution, 2, 3) 502s ***** shared x 502s x = nbinrnd (1, 0.5, [1, 100]); 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 502s "alpha", {0.05}) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), ... 502s "parameter", {"R", "P", "param"}) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 502s "parameter", {"R", "P", "param"}) 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 502s "parameter", "param") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 502s "NAME", "value") 502s ***** error ... 502s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 502s "parameter", "R", "NAME", "value") 502s ***** error ... 502s plot (NegativeBinomialDistribution, "Parent") 502s ***** error ... 502s plot (NegativeBinomialDistribution, "PlotType", 12) 502s ***** error ... 502s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 502s ***** error ... 502s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 502s ***** error ... 502s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 502s ***** error ... 502s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 502s ***** error ... 502s plot (NegativeBinomialDistribution, "Discrete", {true}) 503s ***** error ... 503s plot (NegativeBinomialDistribution, "Parent", 12) 503s ***** error ... 503s plot (NegativeBinomialDistribution, "Parent", "hax") 503s ***** error ... 503s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 503s ***** error ... 503s plot (NegativeBinomialDistribution, "PlotType", "probability") 503s ***** error ... 503s proflik (NegativeBinomialDistribution, 2) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 3) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), {1}) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 503s ***** error ... 503s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 503s ***** error ... 503s truncate (NegativeBinomialDistribution) 503s ***** error ... 503s truncate (NegativeBinomialDistribution, 2) 503s ***** error ... 503s truncate (NegativeBinomialDistribution, 4, 2) 503s ***** shared pd 503s pd = NegativeBinomialDistribution(1, 0.5); 503s pd(2) = NegativeBinomialDistribution(1, 0.6); 503s ***** error cdf (pd, 1) 503s ***** error icdf (pd, 0.5) 503s ***** error iqr (pd) 503s ***** error mean (pd) 503s ***** error median (pd) 503s ***** error negloglik (pd) 503s ***** error paramci (pd) 503s ***** error pdf (pd, 1) 503s ***** error plot (pd) 503s ***** error proflik (pd, 2) 503s ***** error random (pd) 503s ***** error std (pd) 503s ***** error ... 503s truncate (pd, 2, 4) 503s ***** error var (pd) 503s 102 tests, 102 passed, 0 known failure, 0 skipped 503s [inst/dist_obj/LognormalDistribution.m] 503s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/LognormalDistribution.m 503s ***** shared pd, t 503s pd = LognormalDistribution; 503s t = truncate (pd, 2, 4); 503s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 503s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 503s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 503s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 503s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 503s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 503s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 503s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 503s ***** assert (iqr (pd), 1.4536, 1e-4); 503s ***** assert (iqr (t), 0.8989, 1e-4); 503s ***** assert (mean (pd), 1.6487, 1e-4); 503s ***** assert (mean (t), 2.7692, 1e-4); 503s ***** assert (median (pd), 1, 1e-4); 503s ***** assert (median (t), 2.6653, 1e-4); 503s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 503s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 503s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 503s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 503s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 503s ***** assert (any (random (t, 1000, 1) < 2), false); 503s ***** assert (any (random (t, 1000, 1) > 4), false); 503s ***** assert (std (pd), 2.1612, 1e-4); 503s ***** assert (std (t), 0.5540, 1e-4); 503s ***** assert (var (pd), 4.6708, 1e-4); 503s ***** assert (var (t), 0.3069, 1e-4); 503s ***** error ... 503s LognormalDistribution(Inf, 1) 503s ***** error ... 503s LognormalDistribution(i, 1) 503s ***** error ... 503s LognormalDistribution("a", 1) 503s ***** error ... 503s LognormalDistribution([1, 2], 1) 503s ***** error ... 503s LognormalDistribution(NaN, 1) 503s ***** error ... 503s LognormalDistribution(1, 0) 503s ***** error ... 503s LognormalDistribution(1, -1) 503s ***** error ... 503s LognormalDistribution(1, Inf) 503s ***** error ... 503s LognormalDistribution(1, i) 503s ***** error ... 503s LognormalDistribution(1, "a") 503s ***** error ... 503s LognormalDistribution(1, [1, 2]) 503s ***** error ... 503s LognormalDistribution(1, NaN) 503s ***** error ... 503s cdf (LognormalDistribution, 2, "uper") 503s ***** error ... 503s cdf (LognormalDistribution, 2, 3) 503s ***** shared x 503s randn ("seed", 1); 503s x = lognrnd (1, 1, [1, 100]); 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 0) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 1) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", "") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 503s "parameter", {"mu", "sigma", "param"}) 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "parameter", "param") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "NAME", "value") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 503s ***** error ... 503s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 503s "NAME", "value") 503s ***** error ... 503s plot (LognormalDistribution, "Parent") 503s ***** error ... 503s plot (LognormalDistribution, "PlotType", 12) 503s ***** error ... 503s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 503s ***** error ... 503s plot (LognormalDistribution, "PlotType", "pdfcdf") 503s ***** error ... 503s plot (LognormalDistribution, "Discrete", "pdfcdf") 503s ***** error ... 503s plot (LognormalDistribution, "Discrete", [1, 0]) 503s ***** error ... 503s plot (LognormalDistribution, "Discrete", {true}) 503s ***** error ... 503s plot (LognormalDistribution, "Parent", 12) 503s ***** error ... 503s plot (LognormalDistribution, "Parent", "hax") 503s ***** error ... 503s plot (LognormalDistribution, "invalidNAME", "pdf") 503s ***** error ... 503s plot (LognormalDistribution, "PlotType", "probability") 503s ***** error ... 503s proflik (LognormalDistribution, 2) 503s ***** error ... 503s proflik (LognormalDistribution.fit (x), 3) 503s ***** error ... 503s proflik (LognormalDistribution.fit (x), [1, 2]) 503s ***** error ... 503s proflik (LognormalDistribution.fit (x), {1}) 503s ***** error ... 503s proflik (LognormalDistribution.fit (x), 1, ones (2)) 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display") 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 504s ***** error ... 504s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 504s ***** error ... 504s truncate (LognormalDistribution) 504s ***** error ... 504s truncate (LognormalDistribution, 2) 504s ***** error ... 504s truncate (LognormalDistribution, 4, 2) 504s ***** shared pd 504s pd = LognormalDistribution(1, 1); 504s pd(2) = LognormalDistribution(1, 3); 504s ***** error cdf (pd, 1) 504s ***** error icdf (pd, 0.5) 504s ***** error iqr (pd) 504s ***** error mean (pd) 504s ***** error median (pd) 504s ***** error negloglik (pd) 504s ***** error paramci (pd) 504s ***** error pdf (pd, 1) 504s ***** error plot (pd) 504s ***** error proflik (pd, 2) 504s ***** error random (pd) 504s ***** error std (pd) 504s ***** error ... 504s truncate (pd, 2, 4) 504s ***** error var (pd) 504s 95 tests, 95 passed, 0 known failure, 0 skipped 504s [inst/dist_obj/NormalDistribution.m] 504s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/NormalDistribution.m 504s ***** shared pd, t 504s pd = NormalDistribution; 504s t = truncate (pd, -2, 2); 504s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 504s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 504s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 504s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 504s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 504s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 504s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 504s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 504s ***** assert (iqr (pd), 1.3490, 1e-4); 504s ***** assert (iqr (t), 1.2782, 1e-4); 504s ***** assert (mean (pd), 0); 504s ***** assert (mean (t), 0, 3e-16); 504s ***** assert (median (pd), 0); 504s ***** assert (median (t), 0, 3e-16); 504s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 504s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 504s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 504s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 504s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 504s ***** assert (any (random (t, 1000, 1) < -2), false); 504s ***** assert (any (random (t, 1000, 1) > 2), false); 504s ***** assert (std (pd), 1); 504s ***** assert (std (t), 0.8796, 1e-4); 504s ***** assert (var (pd), 1); 504s ***** assert (var (t), 0.7737, 1e-4); 504s ***** error ... 504s NormalDistribution(Inf, 1) 504s ***** error ... 504s NormalDistribution(i, 1) 504s ***** error ... 504s NormalDistribution("a", 1) 504s ***** error ... 504s NormalDistribution([1, 2], 1) 504s ***** error ... 504s NormalDistribution(NaN, 1) 504s ***** error ... 504s NormalDistribution(1, 0) 504s ***** error ... 504s NormalDistribution(1, -1) 504s ***** error ... 504s NormalDistribution(1, Inf) 504s ***** error ... 504s NormalDistribution(1, i) 504s ***** error ... 504s NormalDistribution(1, "a") 504s ***** error ... 504s NormalDistribution(1, [1, 2]) 504s ***** error ... 504s NormalDistribution(1, NaN) 504s ***** error ... 504s cdf (NormalDistribution, 2, "uper") 504s ***** error ... 504s cdf (NormalDistribution, 2, 3) 504s ***** shared x 504s x = normrnd (1, 1, [1, 100]); 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha") 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", 0) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", 1) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", "") 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 504s "parameter", {"mu", "sigma", "param"}) 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "parameter", "param") 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 504s ***** error ... 504s paramci (NormalDistribution.fit (x), "NAME", "value") 505s ***** error ... 505s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 505s ***** error ... 505s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 505s "NAME", "value") 505s ***** error ... 505s plot (NormalDistribution, "Parent") 505s ***** error ... 505s plot (NormalDistribution, "PlotType", 12) 505s ***** error ... 505s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 505s ***** error ... 505s plot (NormalDistribution, "PlotType", "pdfcdf") 505s ***** error ... 505s plot (NormalDistribution, "Discrete", "pdfcdf") 505s ***** error ... 505s plot (NormalDistribution, "Discrete", [1, 0]) 505s ***** error ... 505s plot (NormalDistribution, "Discrete", {true}) 505s ***** error ... 505s plot (NormalDistribution, "Parent", 12) 505s ***** error ... 505s plot (NormalDistribution, "Parent", "hax") 505s ***** error ... 505s plot (NormalDistribution, "invalidNAME", "pdf") 505s ***** error ... 505s plot (NormalDistribution, "PlotType", "probability") 505s ***** error ... 505s proflik (NormalDistribution, 2) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 3) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), [1, 2]) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), {1}) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, ones (2)) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display") 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display", 1) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 505s ***** error ... 505s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 505s ***** error ... 505s truncate (NormalDistribution) 505s ***** error ... 505s truncate (NormalDistribution, 2) 505s ***** error ... 505s truncate (NormalDistribution, 4, 2) 505s ***** shared pd 505s pd = NormalDistribution(1, 1); 505s pd(2) = NormalDistribution(1, 3); 505s ***** error cdf (pd, 1) 505s ***** error icdf (pd, 0.5) 505s ***** error iqr (pd) 505s ***** error mean (pd) 505s ***** error median (pd) 505s ***** error negloglik (pd) 505s ***** error paramci (pd) 505s ***** error pdf (pd, 1) 505s ***** error plot (pd) 505s ***** error proflik (pd, 2) 505s ***** error random (pd) 505s ***** error std (pd) 505s ***** error ... 505s truncate (pd, 2, 4) 505s ***** error var (pd) 505s 95 tests, 95 passed, 0 known failure, 0 skipped 505s [inst/dist_obj/LoglogisticDistribution.m] 505s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/LoglogisticDistribution.m 505s ***** shared pd, t 505s pd = LoglogisticDistribution; 505s t = truncate (pd, 2, 4); 505s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 505s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 505s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 505s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 505s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 505s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 505s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 505s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 505s ***** assert (iqr (pd), 2.6667, 1e-4); 505s ***** assert (iqr (t), 0.9524, 1e-4); 505s ***** assert (mean (pd), Inf); 505s ***** assert (mean (t), 2.8312, 1e-4); 505s ***** assert (median (pd), 1, 1e-4); 505s ***** assert (median (t), 2.75, 1e-4); 505s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 505s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 505s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 505s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 505s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 505s ***** assert (any (random (t, 1000, 1) < 2), false); 505s ***** assert (any (random (t, 1000, 1) > 4), false); 505s ***** assert (std (pd), Inf); 505s ***** assert (std (t), 0.5674, 1e-4); 505s ***** assert (var (pd), Inf); 505s ***** assert (var (t), 0.3220, 1e-4); 505s ***** error ... 505s LoglogisticDistribution(Inf, 1) 505s ***** error ... 505s LoglogisticDistribution(i, 1) 505s ***** error ... 505s LoglogisticDistribution("a", 1) 505s ***** error ... 505s LoglogisticDistribution([1, 2], 1) 505s ***** error ... 505s LoglogisticDistribution(NaN, 1) 505s ***** error ... 505s LoglogisticDistribution(1, 0) 505s ***** error ... 505s LoglogisticDistribution(1, -1) 505s ***** error ... 505s LoglogisticDistribution(1, Inf) 505s ***** error ... 505s LoglogisticDistribution(1, i) 505s ***** error ... 505s LoglogisticDistribution(1, "a") 505s ***** error ... 505s LoglogisticDistribution(1, [1, 2]) 505s ***** error ... 505s LoglogisticDistribution(1, NaN) 505s ***** error ... 505s cdf (LoglogisticDistribution, 2, "uper") 505s ***** error ... 505s cdf (LoglogisticDistribution, 2, 3) 505s ***** shared x 505s x = loglrnd (1, 1, [1, 100]); 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha") 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", "") 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 505s "parameter", {"mu", "sigma", "param"}) 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 505s ***** error ... 505s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 506s ***** error ... 506s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 506s ***** error ... 506s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 506s "parameter", "mu", "NAME", "value") 506s ***** error ... 506s plot (LoglogisticDistribution, "Parent") 506s ***** error ... 506s plot (LoglogisticDistribution, "PlotType", 12) 506s ***** error ... 506s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 506s ***** error ... 506s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 506s ***** error ... 506s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 506s ***** error ... 506s plot (LoglogisticDistribution, "Discrete", [1, 0]) 506s ***** error ... 506s plot (LoglogisticDistribution, "Discrete", {true}) 506s ***** error ... 506s plot (LoglogisticDistribution, "Parent", 12) 506s ***** error ... 506s plot (LoglogisticDistribution, "Parent", "hax") 506s ***** error ... 506s plot (LoglogisticDistribution, "invalidNAME", "pdf") 506s ***** error ... 506s plot (LoglogisticDistribution, "PlotType", "probability") 506s ***** error ... 506s proflik (LoglogisticDistribution, 2) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 3) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), [1, 2]) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), {1}) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display") 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 506s ***** error ... 506s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 506s ***** error ... 506s truncate (LoglogisticDistribution) 506s ***** error ... 506s truncate (LoglogisticDistribution, 2) 506s ***** error ... 506s truncate (LoglogisticDistribution, 4, 2) 506s ***** shared pd 506s pd = LoglogisticDistribution(1, 1); 506s pd(2) = LoglogisticDistribution(1, 3); 506s ***** error cdf (pd, 1) 506s ***** error icdf (pd, 0.5) 506s ***** error iqr (pd) 506s ***** error mean (pd) 506s ***** error median (pd) 506s ***** error negloglik (pd) 506s ***** error paramci (pd) 506s ***** error pdf (pd, 1) 506s ***** error plot (pd) 506s ***** error proflik (pd, 2) 506s ***** error random (pd) 506s ***** error std (pd) 506s ***** error ... 506s truncate (pd, 2, 4) 506s ***** error var (pd) 506s 95 tests, 95 passed, 0 known failure, 0 skipped 506s [inst/dist_obj/tLocationScaleDistribution.m] 506s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/tLocationScaleDistribution.m 506s ***** shared pd, t 506s pd = tLocationScaleDistribution; 506s t = truncate (pd, 2, 4); 506s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 506s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 506s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 506s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 506s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 506s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 506s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 506s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 506s ***** assert (iqr (pd), 1.4534, 1e-4); 506s ***** assert (iqr (t), 0.7139, 1e-4); 506s ***** assert (mean (pd), 0, eps); 506s ***** assert (mean (t), 2.6099, 1e-4); 506s ***** assert (median (pd), 0, eps); 506s ***** assert (median (t), 2.4758, 1e-4); 506s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 506s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 506s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 506s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 506s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 506s ***** assert (any (random (t, 1000, 1) < 2), false); 506s ***** assert (any (random (t, 1000, 1) > 4), false); 506s ***** assert (std (pd), 1.2910, 1e-4); 506s ***** assert (std (t), 0.4989, 1e-4); 506s ***** assert (var (pd), 1.6667, 1e-4); 506s ***** assert (var (t), 0.2489, 1e-4); 506s ***** error ... 506s tLocationScaleDistribution(i, 1, 1) 506s ***** error ... 506s tLocationScaleDistribution(Inf, 1, 1) 506s ***** error ... 506s tLocationScaleDistribution([1, 2], 1, 1) 506s ***** error ... 506s tLocationScaleDistribution("a", 1, 1) 506s ***** error ... 506s tLocationScaleDistribution(NaN, 1, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, 0, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, -1, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, Inf, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, i, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, "a", 1) 506s ***** error ... 506s tLocationScaleDistribution(0, [1, 2], 1) 506s ***** error ... 506s tLocationScaleDistribution(0, NaN, 1) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, 0) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, -1) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, Inf) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, i) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, "a") 506s ***** error ... 506s tLocationScaleDistribution(0, 1, [1, 2]) 506s ***** error ... 506s tLocationScaleDistribution(0, 1, NaN) 506s ***** error ... 506s cdf (tLocationScaleDistribution, 2, "uper") 506s ***** error ... 506s cdf (tLocationScaleDistribution, 2, 3) 506s ***** shared x 506s x = tlsrnd (0, 1, 1, [1, 100]); 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha") 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 506s "alpha", {0.05}) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), ... 506s "parameter", {"mu", "sigma", "nu", "param"}) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 506s "parameter", {"mu", "sigma", "nu", "param"}) 506s ***** error ... 506s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 507s ***** error ... 507s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 507s "parameter", "param") 507s ***** error ... 507s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 507s ***** error ... 507s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 507s ***** error ... 507s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 507s "parameter", "mu", "NAME", "value") 507s ***** error ... 507s plot (tLocationScaleDistribution, "Parent") 507s ***** error ... 507s plot (tLocationScaleDistribution, "PlotType", 12) 507s ***** error ... 507s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 507s ***** error ... 507s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 507s ***** error ... 507s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 507s ***** error ... 507s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 507s ***** error ... 507s plot (tLocationScaleDistribution, "Discrete", {true}) 507s ***** error ... 507s plot (tLocationScaleDistribution, "Parent", 12) 507s ***** error ... 507s plot (tLocationScaleDistribution, "Parent", "hax") 507s ***** error ... 507s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 507s ***** error ... 507s plot (tLocationScaleDistribution, "PlotType", "probability") 507s ***** error ... 507s proflik (tLocationScaleDistribution, 2) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 4) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), {1}) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 507s ***** error ... 507s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 507s ***** error ... 507s truncate (tLocationScaleDistribution) 507s ***** error ... 507s truncate (tLocationScaleDistribution, 2) 507s ***** error ... 507s truncate (tLocationScaleDistribution, 4, 2) 507s ***** shared pd 507s pd = tLocationScaleDistribution (0, 1, 1); 507s pd(2) = tLocationScaleDistribution (0, 1, 3); 507s ***** error cdf (pd, 1) 507s ***** error icdf (pd, 0.5) 507s ***** error iqr (pd) 507s ***** error mean (pd) 507s ***** error median (pd) 507s ***** error negloglik (pd) 507s ***** error paramci (pd) 507s ***** error pdf (pd, 1) 507s ***** error plot (pd) 507s ***** error proflik (pd, 2) 507s ***** error random (pd) 507s ***** error std (pd) 507s ***** error ... 507s truncate (pd, 2, 4) 507s ***** error var (pd) 507s 102 tests, 102 passed, 0 known failure, 0 skipped 507s [inst/dist_obj/LoguniformDistribution.m] 507s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/LoguniformDistribution.m 507s ***** shared pd, t 507s pd = LoguniformDistribution (1, 4); 507s t = truncate (pd, 2, 4); 507s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 507s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 507s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 507s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 507s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 507s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 507s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 507s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 507s ***** assert (iqr (pd), 1.4142, 1e-4); 507s ***** assert (iqr (t), 0.9852, 1e-4); 507s ***** assert (mean (pd), 2.1640, 1e-4); 507s ***** assert (mean (t), 2.8854, 1e-4); 507s ***** assert (median (pd), 2); 507s ***** assert (median (t), 2.8284, 1e-4); 507s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 507s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 507s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 507s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 507s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 507s ***** assert (any (random (pd, 1000, 1) < 1), false); 507s ***** assert (any (random (pd, 1000, 1) > 4), false); 507s ***** assert (any (random (t, 1000, 1) < 2), false); 507s ***** assert (any (random (t, 1000, 1) > 4), false); 507s ***** assert (std (pd), 0.8527, 1e-4); 507s ***** assert (std (t), 0.5751, 1e-4); 507s ***** assert (var (pd), 0.7270, 1e-4); 507s ***** assert (var (t), 0.3307, 1e-4); 507s ***** error ... 507s LoguniformDistribution (i, 1) 507s ***** error ... 507s LoguniformDistribution (Inf, 1) 507s ***** error ... 507s LoguniformDistribution ([1, 2], 1) 507s ***** error ... 507s LoguniformDistribution ("a", 1) 507s ***** error ... 507s LoguniformDistribution (NaN, 1) 507s ***** error ... 507s LoguniformDistribution (1, i) 507s ***** error ... 507s LoguniformDistribution (1, Inf) 507s ***** error ... 507s LoguniformDistribution (1, [1, 2]) 507s ***** error ... 507s LoguniformDistribution (1, "a") 507s ***** error ... 507s LoguniformDistribution (1, NaN) 507s ***** error ... 507s LoguniformDistribution (2, 1) 507s ***** error ... 507s cdf (LoguniformDistribution, 2, "uper") 507s ***** error ... 507s cdf (LoguniformDistribution, 2, 3) 507s ***** error ... 507s plot (LoguniformDistribution, "Parent") 507s ***** error ... 507s plot (LoguniformDistribution, "PlotType", 12) 507s ***** error ... 507s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 507s ***** error ... 507s plot (LoguniformDistribution, "PlotType", "pdfcdf") 507s ***** error ... 507s plot (LoguniformDistribution, "Discrete", "pdfcdf") 507s ***** error ... 507s plot (LoguniformDistribution, "Discrete", [1, 0]) 507s ***** error ... 507s plot (LoguniformDistribution, "Discrete", {true}) 507s ***** error ... 507s plot (LoguniformDistribution, "Parent", 12) 507s ***** error ... 507s plot (LoguniformDistribution, "Parent", "hax") 507s ***** error ... 507s plot (LoguniformDistribution, "invalidNAME", "pdf") 507s ***** error ... 507s plot (LoguniformDistribution, "PlotType", "probability") 507s ***** error ... 507s truncate (LoguniformDistribution) 507s ***** error ... 507s truncate (LoguniformDistribution, 2) 507s ***** error ... 507s truncate (LoguniformDistribution, 4, 2) 507s ***** shared pd 507s pd = LoguniformDistribution(1, 4); 507s pd(2) = LoguniformDistribution(2, 5); 507s ***** error cdf (pd, 1) 507s ***** error icdf (pd, 0.5) 507s ***** error iqr (pd) 507s ***** error mean (pd) 507s ***** error median (pd) 507s ***** error pdf (pd, 1) 507s ***** error plot (pd) 507s ***** error random (pd) 507s ***** error std (pd) 507s ***** error ... 507s truncate (pd, 2, 4) 507s ***** error var (pd) 507s 65 tests, 65 passed, 0 known failure, 0 skipped 507s [inst/dist_obj/HalfNormalDistribution.m] 508s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/HalfNormalDistribution.m 508s ***** shared pd, t 508s pd = HalfNormalDistribution (0, 1); 508s t = truncate (pd, 2, 4); 508s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 508s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 508s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 508s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 508s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 508s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 508s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 508s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 508s ***** assert (iqr (pd), 0.8317, 1e-4); 508s ***** assert (iqr (t), 0.4111, 1e-4); 508s ***** assert (mean (pd), 0.7979, 1e-4); 508s ***** assert (mean (t), 2.3706, 1e-4); 508s ***** assert (median (pd), 0.6745, 1e-4); 508s ***** assert (median (t), 2.2771, 1e-4); 508s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 508s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 508s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 508s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 508s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 508s ***** assert (any (random (t, 1000, 1) < 2), false); 508s ***** assert (any (random (t, 1000, 1) > 4), false); 508s ***** assert (std (pd), 0.6028, 1e-4); 508s ***** assert (std (t), 0.3310, 1e-4); 508s ***** assert (var (pd), 0.3634, 1e-4); 508s ***** assert (var (t), 0.1096, 1e-4); 508s ***** error ... 508s HalfNormalDistribution(Inf, 1) 508s ***** error ... 508s HalfNormalDistribution(i, 1) 508s ***** error ... 508s HalfNormalDistribution("a", 1) 508s ***** error ... 508s HalfNormalDistribution([1, 2], 1) 508s ***** error ... 508s HalfNormalDistribution(NaN, 1) 508s ***** error ... 508s HalfNormalDistribution(1, 0) 508s ***** error ... 508s HalfNormalDistribution(1, -1) 508s ***** error ... 508s HalfNormalDistribution(1, Inf) 508s ***** error ... 508s HalfNormalDistribution(1, i) 508s ***** error ... 508s HalfNormalDistribution(1, "a") 508s ***** error ... 508s HalfNormalDistribution(1, [1, 2]) 508s ***** error ... 508s HalfNormalDistribution(1, NaN) 508s ***** error ... 508s cdf (HalfNormalDistribution, 2, "uper") 508s ***** error ... 508s cdf (HalfNormalDistribution, 2, 3) 508s ***** shared x 508s x = hnrnd (1, 1, [1, 100]); 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 508s "alpha", {0.05}) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), ... 508s "parameter", {"mu", "sigma", "param"}) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 508s "parameter", {"mu", "sigma", "param"}) 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 508s "parameter", "param") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 508s "NAME", "value") 508s ***** error ... 508s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 508s "parameter", "sigma", "NAME", "value") 508s ***** error ... 508s plot (HalfNormalDistribution, "Parent") 508s ***** error ... 508s plot (HalfNormalDistribution, "PlotType", 12) 508s ***** error ... 508s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 508s ***** error ... 508s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 508s ***** error ... 508s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 508s ***** error ... 508s plot (HalfNormalDistribution, "Discrete", [1, 0]) 508s ***** error ... 508s plot (HalfNormalDistribution, "Discrete", {true}) 508s ***** error ... 508s plot (HalfNormalDistribution, "Parent", 12) 508s ***** error ... 508s plot (HalfNormalDistribution, "Parent", "hax") 508s ***** error ... 508s plot (HalfNormalDistribution, "invalidNAME", "pdf") 508s ***** error ... 508s plot (HalfNormalDistribution, "PlotType", "probability") 508s ***** error ... 508s proflik (HalfNormalDistribution, 2) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 3) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), {1}) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 1) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 508s ***** error ... 508s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 508s "Display", "on") 508s ***** error ... 508s truncate (HalfNormalDistribution) 508s ***** error ... 508s truncate (HalfNormalDistribution, 2) 508s ***** error ... 508s truncate (HalfNormalDistribution, 4, 2) 508s ***** shared pd 508s pd = HalfNormalDistribution(1, 1); 508s pd(2) = HalfNormalDistribution(1, 3); 508s ***** error cdf (pd, 1) 508s ***** error icdf (pd, 0.5) 508s ***** error iqr (pd) 508s ***** error mean (pd) 508s ***** error median (pd) 508s ***** error negloglik (pd) 508s ***** error paramci (pd) 508s ***** error pdf (pd, 1) 508s ***** error plot (pd) 508s ***** error proflik (pd, 2) 508s ***** error random (pd) 508s ***** error std (pd) 508s ***** error ... 508s truncate (pd, 2, 4) 508s ***** error var (pd) 508s 96 tests, 96 passed, 0 known failure, 0 skipped 508s [inst/dist_obj/ExponentialDistribution.m] 508s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/ExponentialDistribution.m 508s ***** shared pd, t 508s pd = ExponentialDistribution (1); 508s t = truncate (pd, 2, 4); 508s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 508s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 508s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 509s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 509s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 509s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 509s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 509s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 509s ***** assert (iqr (pd), 1.0986, 1e-4); 509s ***** assert (iqr (t), 0.8020, 1e-4); 509s ***** assert (mean (pd), 1); 509s ***** assert (mean (t), 2.6870, 1e-4); 509s ***** assert (median (pd), 0.6931, 1e-4); 509s ***** assert (median (t), 2.5662, 1e-4); 509s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 509s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 509s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 509s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 509s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 509s ***** assert (any (random (t, 1000, 1) < 2), false); 509s ***** assert (any (random (t, 1000, 1) > 4), false); 509s ***** assert (std (pd), 1); 509s ***** assert (std (t), 0.5253, 1e-4); 509s ***** assert (var (pd), 1); 509s ***** assert (var (t), 0.2759, 1e-4); 509s ***** error ... 509s ExponentialDistribution(0) 509s ***** error ... 509s ExponentialDistribution(-1) 509s ***** error ... 509s ExponentialDistribution(Inf) 509s ***** error ... 509s ExponentialDistribution(i) 509s ***** error ... 509s ExponentialDistribution("a") 509s ***** error ... 509s ExponentialDistribution([1, 2]) 509s ***** error ... 509s ExponentialDistribution(NaN) 509s ***** error ... 509s cdf (ExponentialDistribution, 2, "uper") 509s ***** error ... 509s cdf (ExponentialDistribution, 2, 3) 509s ***** shared x 509s x = exprnd (1, [100, 1]); 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 0) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 1) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", "") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 509s "alpha", {0.05}) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", {"mu", "param"}) 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "parameter", "param") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "NAME", "value") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 509s ***** error ... 509s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", "mu", "NAME", "value") 509s ***** error ... 509s plot (ExponentialDistribution, "Parent") 509s ***** error ... 509s plot (ExponentialDistribution, "PlotType", 12) 509s ***** error ... 509s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 509s ***** error ... 509s plot (ExponentialDistribution, "PlotType", "pdfcdf") 509s ***** error ... 509s plot (ExponentialDistribution, "Discrete", "pdfcdf") 509s ***** error ... 509s plot (ExponentialDistribution, "Discrete", [1, 0]) 509s ***** error ... 509s plot (ExponentialDistribution, "Discrete", {true}) 509s ***** error ... 509s plot (ExponentialDistribution, "Parent", 12) 509s ***** error ... 509s plot (ExponentialDistribution, "Parent", "hax") 509s ***** error ... 509s plot (ExponentialDistribution, "invalidNAME", "pdf") 509s ***** error ... 509s plot (ExponentialDistribution, "PlotType", "probability") 509s ***** error ... 509s proflik (ExponentialDistribution, 2) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 3) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), [1, 2]) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), {1}) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display") 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 509s ***** error ... 509s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 509s ***** error ... 509s truncate (ExponentialDistribution) 509s ***** error ... 509s truncate (ExponentialDistribution, 2) 509s ***** error ... 509s truncate (ExponentialDistribution, 4, 2) 509s ***** shared pd 509s pd = ExponentialDistribution(1); 509s pd(2) = ExponentialDistribution(3); 509s ***** error cdf (pd, 1) 509s ***** error icdf (pd, 0.5) 509s ***** error iqr (pd) 509s ***** error mean (pd) 509s ***** error median (pd) 509s ***** error negloglik (pd) 509s ***** error paramci (pd) 509s ***** error pdf (pd, 1) 509s ***** error plot (pd) 509s ***** error proflik (pd, 2) 509s ***** error random (pd) 509s ***** error std (pd) 509s ***** error ... 509s truncate (pd, 2, 4) 509s ***** error var (pd) 509s 90 tests, 90 passed, 0 known failure, 0 skipped 509s [inst/dist_obj/PoissonDistribution.m] 509s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/PoissonDistribution.m 509s ***** shared pd, t, t_inf 509s pd = PoissonDistribution; 509s t = truncate (pd, 2, 4); 509s t_inf = truncate (pd, 2, Inf); 509s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 509s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 509s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 509s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 509s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 509s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 509s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 509s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 509s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 509s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 509s ***** assert (iqr (pd), 2); 509s ***** assert (iqr (t), 1); 509s ***** assert (mean (pd), 1); 509s ***** assert (mean (t), 2.3529, 1e-4); 509s ***** assert (mean (t_inf), 2.3922, 1e-4); 509s ***** assert (median (pd), 1); 509s ***** assert (median (t), 2); 509s ***** assert (median (t_inf), 2); 509s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 509s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 509s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 509s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 509s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 509s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 509s ***** assert (any (random (t, 1000, 1) < 2), false); 509s ***** assert (any (random (t, 1000, 1) > 4), false); 509s ***** assert (std (pd), 1); 509s ***** assert (std (t), 0.5882, 1e-4); 509s ***** assert (std (t_inf), 0.6738, 1e-4); 509s ***** assert (var (pd), 1); 509s ***** assert (var (t), 0.3460, 1e-4); 509s ***** assert (var (t_inf), 0.4540, 1e-4); 509s ***** error ... 509s PoissonDistribution(0) 509s ***** error ... 509s PoissonDistribution(-1) 509s ***** error ... 509s PoissonDistribution(Inf) 509s ***** error ... 509s PoissonDistribution(i) 509s ***** error ... 509s PoissonDistribution("a") 509s ***** error ... 509s PoissonDistribution([1, 2]) 509s ***** error ... 509s PoissonDistribution(NaN) 509s ***** error ... 509s cdf (PoissonDistribution, 2, "uper") 509s ***** error ... 509s cdf (PoissonDistribution, 2, 3) 509s ***** shared x 509s x = poissrnd (1, [1, 100]); 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 0) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 1) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", "") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", {"lambda", "param"}) 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "parameter", "param") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "NAME", "value") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 509s ***** error ... 509s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", "lambda", "NAME", "value") 509s ***** error ... 509s plot (PoissonDistribution, "Parent") 509s ***** error ... 509s plot (PoissonDistribution, "PlotType", 12) 509s ***** error ... 509s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 509s ***** error ... 509s plot (PoissonDistribution, "PlotType", "pdfcdf") 509s ***** error ... 509s plot (PoissonDistribution, "Discrete", "pdfcdf") 509s ***** error ... 509s plot (PoissonDistribution, "Discrete", [1, 0]) 509s ***** error ... 509s plot (PoissonDistribution, "Discrete", {true}) 509s ***** error ... 509s plot (PoissonDistribution, "Parent", 12) 509s ***** error ... 509s plot (PoissonDistribution, "Parent", "hax") 509s ***** error ... 509s plot (PoissonDistribution, "invalidNAME", "pdf") 509s ***** error ... 509s plot (PoissonDistribution, "PlotType", "probability") 509s ***** error ... 509s proflik (PoissonDistribution, 2) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 3) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), [1, 2]) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), {1}) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, ones (2)) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display") 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 509s ***** error ... 509s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 509s ***** error ... 509s truncate (PoissonDistribution) 509s ***** error ... 509s truncate (PoissonDistribution, 2) 509s ***** error ... 509s truncate (PoissonDistribution, 4, 2) 509s ***** shared pd 509s pd = PoissonDistribution(1); 509s pd(2) = PoissonDistribution(3); 509s ***** error cdf (pd, 1) 509s ***** error icdf (pd, 0.5) 509s ***** error iqr (pd) 509s ***** error mean (pd) 509s ***** error median (pd) 509s ***** error negloglik (pd) 509s ***** error paramci (pd) 509s ***** error pdf (pd, 1) 509s ***** error plot (pd) 509s ***** error proflik (pd, 2) 509s ***** error random (pd) 509s ***** error std (pd) 509s ***** error ... 509s truncate (pd, 2, 4) 509s ***** error var (pd) 509s 97 tests, 97 passed, 0 known failure, 0 skipped 509s [inst/dist_obj/InverseGaussianDistribution.m] 509s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/InverseGaussianDistribution.m 509s ***** shared pd, t 509s pd = InverseGaussianDistribution (1, 1); 509s t = truncate (pd, 2, 4); 509s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 509s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 509s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 509s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 509s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 509s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 509s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 509s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 509s ***** assert (iqr (pd), 0.8643, 1e-4); 509s ***** assert (iqr (t), 0.8222, 1e-4); 509s ***** assert (mean (pd), 1); 509s ***** assert (mean (t), 2.6953, 1e-4); 509s ***** assert (median (pd), 0.6758, 1e-4); 509s ***** assert (median (t), 2.5716, 1e-4); 509s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 509s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 509s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 509s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 509s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 509s ***** assert (any (random (t, 1000, 1) < 2), false); 509s ***** assert (any (random (t, 1000, 1) > 4), false); 509s ***** assert (std (pd), 1); 509s ***** assert (std (t), 0.5332, 1e-4); 509s ***** assert (var (pd), 1); 509s ***** assert (var (t), 0.2843, 1e-4); 509s ***** error ... 509s InverseGaussianDistribution(0, 1) 509s ***** error ... 509s InverseGaussianDistribution(Inf, 1) 509s ***** error ... 509s InverseGaussianDistribution(i, 1) 509s ***** error ... 509s InverseGaussianDistribution("a", 1) 509s ***** error ... 509s InverseGaussianDistribution([1, 2], 1) 509s ***** error ... 509s InverseGaussianDistribution(NaN, 1) 509s ***** error ... 509s InverseGaussianDistribution(1, 0) 509s ***** error ... 509s InverseGaussianDistribution(1, -1) 509s ***** error ... 509s InverseGaussianDistribution(1, Inf) 509s ***** error ... 509s InverseGaussianDistribution(1, i) 509s ***** error ... 509s InverseGaussianDistribution(1, "a") 509s ***** error ... 509s InverseGaussianDistribution(1, [1, 2]) 509s ***** error ... 509s InverseGaussianDistribution(1, NaN) 509s ***** error ... 509s cdf (InverseGaussianDistribution, 2, "uper") 509s ***** error ... 509s cdf (InverseGaussianDistribution, 2, 3) 509s ***** shared x 509s x = invgrnd (1, 1, [1, 100]); 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 509s "alpha", {0.05}) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), ... 509s "parameter", {"mu", "lambda", "param"}) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", {"mu", "lambda", "param"}) 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", "param") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 509s ***** error ... 509s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 509s "parameter", "mu", "NAME", "value") 509s ***** error ... 509s plot (InverseGaussianDistribution, "Parent") 509s ***** error ... 509s plot (InverseGaussianDistribution, "PlotType", 12) 509s ***** error ... 509s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 509s ***** error ... 509s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 509s ***** error ... 509s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 509s ***** error ... 509s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 509s ***** error ... 509s plot (InverseGaussianDistribution, "Discrete", {true}) 509s ***** error ... 509s plot (InverseGaussianDistribution, "Parent", 12) 509s ***** error ... 509s plot (InverseGaussianDistribution, "Parent", "hax") 509s ***** error ... 509s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 509s ***** error ... 509s plot (InverseGaussianDistribution, "PlotType", "probability") 509s ***** error ... 509s proflik (InverseGaussianDistribution, 2) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 3) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), {1}) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 509s ***** error ... 509s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 509s ***** error ... 509s truncate (InverseGaussianDistribution) 509s ***** error ... 509s truncate (InverseGaussianDistribution, 2) 509s ***** error ... 509s truncate (InverseGaussianDistribution, 4, 2) 509s ***** shared pd 509s pd = InverseGaussianDistribution(1, 1); 509s pd(2) = InverseGaussianDistribution(1, 3); 509s ***** error cdf (pd, 1) 509s ***** error icdf (pd, 0.5) 509s ***** error iqr (pd) 509s ***** error mean (pd) 509s ***** error median (pd) 509s ***** error negloglik (pd) 509s ***** error paramci (pd) 509s ***** error pdf (pd, 1) 509s ***** error plot (pd) 509s ***** error proflik (pd, 2) 509s ***** error random (pd) 509s ***** error std (pd) 509s ***** error ... 509s truncate (pd, 2, 4) 509s ***** error var (pd) 509s 96 tests, 96 passed, 0 known failure, 0 skipped 509s [inst/dist_obj/ExtremeValueDistribution.m] 509s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/ExtremeValueDistribution.m 509s ***** shared pd, t 509s pd = ExtremeValueDistribution (0, 1); 509s t = truncate (pd, 2, 4); 509s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 509s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 509s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 509s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 510s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 510s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 510s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 510s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 510s ***** assert (iqr (pd), 1.5725, 1e-4); 510s ***** assert (iqr (t), 0.1338, 1e-4); 510s ***** assert (mean (pd), -0.5772, 1e-4); 510s ***** assert (mean (t), 2.1206, 1e-4); 510s ***** assert (median (pd), -0.3665, 1e-4); 510s ***** assert (median (t), 2.0897, 1e-4); 510s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 510s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 510s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 510s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 510s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 510s ***** assert (any (random (t, 1000, 1) < 2), false); 510s ***** assert (any (random (t, 1000, 1) > 4), false); 510s ***** assert (std (pd), 1.2825, 1e-4); 510s ***** assert (std (t), 0.1091, 1e-4); 510s ***** assert (var (pd), 1.6449, 1e-4); 510s ***** assert (var (t), 0.0119, 1e-4); 510s ***** error ... 510s ExtremeValueDistribution(Inf, 1) 510s ***** error ... 510s ExtremeValueDistribution(i, 1) 510s ***** error ... 510s ExtremeValueDistribution("a", 1) 510s ***** error ... 510s ExtremeValueDistribution([1, 2], 1) 510s ***** error ... 510s ExtremeValueDistribution(NaN, 1) 510s ***** error ... 510s ExtremeValueDistribution(1, 0) 510s ***** error ... 510s ExtremeValueDistribution(1, -1) 510s ***** error ... 510s ExtremeValueDistribution(1, Inf) 510s ***** error ... 510s ExtremeValueDistribution(1, i) 510s ***** error ... 510s ExtremeValueDistribution(1, "a") 510s ***** error ... 510s ExtremeValueDistribution(1, [1, 2]) 510s ***** error ... 510s ExtremeValueDistribution(1, NaN) 510s ***** error ... 510s cdf (ExtremeValueDistribution, 2, "uper") 510s ***** error ... 510s cdf (ExtremeValueDistribution, 2, 3) 510s ***** shared x 510s rand ("seed", 1); 510s x = evrnd (1, 1, [1000, 1]); 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), ... 510s "parameter", "mu", "alpha", {0.05}) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), ... 510s "parameter", {"mu", "sigma", "param"}) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 510s "parameter", {"mu", "sigma", "param"}) 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 510s "parameter", "param") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 510s ***** error ... 510s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 510s "parameter", "mu", "NAME", "value") 510s ***** error ... 510s plot (ExtremeValueDistribution, "Parent") 510s ***** error ... 510s plot (ExtremeValueDistribution, "PlotType", 12) 510s ***** error ... 510s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 510s ***** error ... 510s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 510s ***** error ... 510s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 510s ***** error ... 510s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 510s ***** error ... 510s plot (ExtremeValueDistribution, "Discrete", {true}) 510s ***** error ... 510s plot (ExtremeValueDistribution, "Parent", 12) 510s ***** error ... 510s plot (ExtremeValueDistribution, "Parent", "hax") 510s ***** error ... 510s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 510s ***** error ... 510s plot (ExtremeValueDistribution, "PlotType", "probability") 510s ***** error ... 510s proflik (ExtremeValueDistribution, 2) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 3) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), {1}) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 510s ***** error ... 510s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 510s ***** error ... 510s truncate (ExtremeValueDistribution) 510s ***** error ... 510s truncate (ExtremeValueDistribution, 2) 510s ***** error ... 510s truncate (ExtremeValueDistribution, 4, 2) 510s ***** shared pd 510s pd = ExtremeValueDistribution(1, 1); 510s pd(2) = ExtremeValueDistribution(1, 3); 510s ***** error cdf (pd, 1) 510s ***** error icdf (pd, 0.5) 510s ***** error iqr (pd) 510s ***** error mean (pd) 510s ***** error median (pd) 510s ***** error negloglik (pd) 510s ***** error paramci (pd) 510s ***** error pdf (pd, 1) 510s ***** error plot (pd) 510s ***** error proflik (pd, 2) 510s ***** error random (pd) 510s ***** error std (pd) 510s ***** error ... 510s truncate (pd, 2, 4) 510s ***** error var (pd) 510s 95 tests, 95 passed, 0 known failure, 0 skipped 510s [inst/dist_obj/BetaDistribution.m] 510s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_obj/BetaDistribution.m 510s ***** demo 510s ## Generate a data set of 5000 random samples from a Beta distribution with 510s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 510s ## a PDF of the fitted distribution superimposed on a histogram of the data 510s 510s pd = makedist ("Beta", "a", 2, "b", 4) 510s randg ("seed", 21); 510s data = random (pd, 5000, 1); 510s pd = fitdist (data, "Beta") 510s plot (pd) 510s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 510s pd.a, pd.b)) 510s ***** demo 510s ## Plot the PDF of a Beta distribution, with parameters a = 2 and b = 4, 510s ## truncated at [0.1, 0.8] intervals. Generate 10000 random samples from 510s ## this truncated distribution and superimpose a histogram with 100 bins 510s ## scaled accordingly 510s 510s pd = makedist ("Beta", "a", 2, "b", 4) 510s t = truncate (pd, 0.1, 0.8) 510s randg ("seed", 21); 510s data = random (t, 10000, 1); 510s plot (t) 510s title ("Beta distribution (a = 2, b = 4) truncated at [0.1, 0.8]") 510s hold on 510s hist (data, 100, 140) 510s hold off 510s ***** demo 510s ## Generate a data set of 100 random samples from a Beta distribution with 510s ## parameters a = 2 and b = 4. Fit a Beta distribution to this data and plot 510s ## its CDF superimposed over an empirical CDF of the data 510s 510s pd = makedist ("Beta", "a", 2, "b", 4) 510s randg ("seed", 21); 510s data = random (pd, 100, 1); 510s pd = fitdist (data, "Beta") 510s plot (pd, "plottype", "cdf") 510s title (sprintf ("Fitted Beta distribution with a = %0.2f and b = %0.2f", ... 510s pd.a, pd.b)) 510s legend ({"empirical CDF", "fitted CDF"}, "location", "east") 510s ***** demo 510s ## Generate a data set of 200 random samples from a Beta distribution with 510s ## parameters a = 2 and b = 4. Display a probability plot for the Beta 510s ## distribution fit to the data. 510s 510s pd = makedist ("Beta", "a", 2, "b", 4) 510s randg ("seed", 21); 510s data = random (pd, 200, 1); 510s pd = fitdist (data, "Beta") 510s plot (pd, "plottype", "probability") 510s title (sprintf ("Probability plot of a fitted Beta distribution with a = %0.2f and b = %0.2f", ... 510s pd.a, pd.b)) 510s legend ({"empirical CDF", "fitted CDF"}, "location", "southeast") 510s ***** shared pd, t 510s pd = BetaDistribution; 510s t = truncate (pd, 0.2, 0.8); 510s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 510s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 510s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 510s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 510s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 510s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 510s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 510s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 510s ***** assert (iqr (pd), 0.5, 1e-4); 510s ***** assert (iqr (t), 0.3, 1e-4); 510s ***** assert (mean (pd), 0.5); 510s ***** assert (mean (t), 0.5, 1e-6); 510s ***** assert (median (pd), 0.5); 510s ***** assert (median (t), 0.5, 1e-6); 510s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 510s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 510s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 510s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 510s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 510s ***** assert (any (random (t, 1000, 1) < 0.2), false); 510s ***** assert (any (random (t, 1000, 1) > 0.8), false); 510s ***** assert (std (pd), 0.2887, 1e-4); 510s ***** assert (std (t), 0.1732, 1e-4); 510s ***** assert (var (pd), 0.0833, 1e-4); 510s ***** assert (var (t), 0.0300, 1e-4); 510s ***** error ... 510s BetaDistribution(0, 1) 510s ***** error ... 510s BetaDistribution(Inf, 1) 510s ***** error ... 510s BetaDistribution(i, 1) 510s ***** error ... 510s BetaDistribution("a", 1) 510s ***** error ... 510s BetaDistribution([1, 2], 1) 511s ***** error ... 511s BetaDistribution(NaN, 1) 511s ***** error ... 511s BetaDistribution(1, 0) 511s ***** error ... 511s BetaDistribution(1, -1) 511s ***** error ... 511s BetaDistribution(1, Inf) 511s ***** error ... 511s BetaDistribution(1, i) 511s ***** error ... 511s BetaDistribution(1, "a") 511s ***** error ... 511s BetaDistribution(1, [1, 2]) 511s ***** error ... 511s BetaDistribution(1, NaN) 511s ***** error ... 511s cdf (BetaDistribution, 2, "uper") 511s ***** error ... 511s cdf (BetaDistribution, 2, 3) 511s ***** shared x 511s randg ("seed", 1); 511s x = betarnd (1, 1, [100, 1]); 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 0) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 1) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", "") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 511s "parameter", {"a", "b", "param"}) 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "parameter", "param") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "NAME", "value") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 511s ***** error ... 511s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 511s "NAME", "value") 511s ***** error ... 511s plot (BetaDistribution, "Parent") 511s ***** error ... 511s plot (BetaDistribution, "PlotType", 12) 511s ***** error ... 511s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 511s ***** error ... 511s plot (BetaDistribution, "PlotType", "pdfcdf") 511s ***** error ... 511s plot (BetaDistribution, "Discrete", "pdfcdf") 511s ***** error ... 511s plot (BetaDistribution, "Discrete", [1, 0]) 511s ***** error ... 511s plot (BetaDistribution, "Discrete", {true}) 511s ***** error ... 511s plot (BetaDistribution, "Parent", 12) 511s ***** error ... 511s plot (BetaDistribution, "Parent", "hax") 511s ***** error ... 511s plot (BetaDistribution, "invalidNAME", "pdf") 511s ***** error ... 511s plot (BetaDistribution, "PlotType", "probability") 511s ***** error ... 511s proflik (BetaDistribution, 2) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 3) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), [1, 2]) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), {1}) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, ones (2)) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display") 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display", 1) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 511s ***** error ... 511s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 511s ***** error ... 511s truncate (BetaDistribution) 511s ***** error ... 511s truncate (BetaDistribution, 2) 511s ***** error ... 511s truncate (BetaDistribution, 4, 2) 511s ***** shared pd 511s pd = BetaDistribution(1, 1); 511s pd(2) = BetaDistribution(1, 3); 511s ***** error cdf (pd, 1) 511s ***** error icdf (pd, 0.5) 511s ***** error iqr (pd) 511s ***** error mean (pd) 511s ***** error median (pd) 511s ***** error negloglik (pd) 511s ***** error paramci (pd) 511s ***** error pdf (pd, 1) 511s ***** error plot (pd) 511s ***** error proflik (pd, 2) 511s ***** error random (pd) 511s ***** error std (pd) 511s ***** error ... 511s truncate (pd, 2, 4) 511s ***** error var (pd) 511s 96 tests, 96 passed, 0 known failure, 0 skipped 511s [inst/einstein.m] 511s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/einstein.m 511s ***** demo 511s einstein (0.4, 0.6) 511s ***** demo 511s einstein (0.2, 0.5) 511s ***** demo 511s einstein (0.6, 0.1) 511s ***** test 511s hf = figure ("visible", "off"); 511s unwind_protect 511s tiles = einstein (0.4, 0.6); 511s assert (isstruct (tiles), true); 511s unwind_protect_cleanup 511s close (hf); 511s end_unwind_protect 511s ***** error einstein 511s ***** error einstein (0.5) 511s ***** error einstein (0, 0.9) 511s ***** error einstein (0.4, 1) 511s ***** error einstein (-0.4, 1) 511s 6 tests, 6 passed, 0 known failure, 0 skipped 511s [inst/geomean.m] 511s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/geomean.m 511s ***** test 511s x = [0:10]; 511s y = [x;x+5;x+10]; 511s assert (geomean (x), 0); 511s m = [0 9.462942809849169 14.65658770861967]; 511s assert (geomean (y, 2), m', 4e-14); 511s assert (geomean (y, "all"), 0); 511s y(2,4) = NaN; 511s m(2) = 9.623207231679554; 511s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 511s assert (geomean (y', "omitnan"), m, 4e-14); 511s z = y + 20; 511s assert (geomean (z, "all"), NaN); 511s assert (geomean (z, "all", "includenan"), NaN); 511s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 511s m = [24.79790781765634 NaN 34.85638839503932]; 511s assert (geomean (z'), m, 4e-14); 511s assert (geomean (z', "includenan"), m, 4e-14); 511s m(2) = 30.02181156156319; 511s assert (geomean (z', "omitnan"), m, 4e-14); 511s assert (geomean (z, 2, "omitnan"), m', 4e-14); 511s ***** test 511s x = repmat ([1:20;6:25], [5 2 6 3]); 511s assert (size (geomean (x, [3 2])), [10 1 1 3]); 511s assert (size (geomean (x, [1 2])), [1 1 6 3]); 511s assert (size (geomean (x, [1 2 4])), [1 1 6]); 511s assert (size (geomean (x, [1 4 3])), [1 40]); 511s assert (size (geomean (x, [1 2 3 4])), [1 1]); 511s ***** test 511s x = repmat ([1:20;6:25], [5 2 6 3]); 511s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 511s assert (geomean (x, [3 2]), m, 4e-13); 511s x(2,5,6,3) = NaN; 511s m(2,3) = NaN; 511s assert (geomean (x, [3 2]), m, 4e-13); 511s m(2,3) = 14.3292729579901; 511s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 511s ***** error geomean ("char") 511s ***** error geomean ([1 -1 3]) 511s ***** error ... 511s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 511s ***** error ... 511s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 511s ***** error ... 511s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 511s 8 tests, 8 passed, 0 known failure, 0 skipped 511s [inst/regress_gp.m] 511s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/regress_gp.m 511s ***** demo 511s ## Linear fitting of 1D Data 511s rand ("seed", 125); 511s X = 2 * rand (5, 1) - 1; 511s randn ("seed", 25); 511s Y = 2 * X - 1 + 0.3 * randn (5, 1); 511s 511s ## Points for interpolation/extrapolation 511s Xfit = linspace (-2, 2, 10)'; 511s 511s ## Fit regression model 511s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 511s 511s ## Plot fitted data 511s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 511s title ("Gaussian process regression with linear kernel"); 511s ***** demo 511s ## Linear fitting of 2D Data 511s rand ("seed", 135); 511s X = 2 * rand (4, 2) - 1; 511s randn ("seed", 35); 511s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 511s 511s ## Mesh for interpolation/extrapolation 511s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 511s Xfit = [x1(:), x2(:)]; 511s 511s ## Fit regression model 511s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 511s Ypred = reshape (Ypred, 10, 10); 511s YintU = reshape (Yint(:,1), 10, 10); 511s YintL = reshape (Yint(:,2), 10, 10); 511s 511s ## Plot fitted data 511s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 511s hold on; 511s h = mesh (x1, x2, Ypred, zeros (10, 10)); 511s set (h, "facecolor", "none", "edgecolor", "yellow"); 511s h = mesh (x1, x2, YintU, ones (10, 10)); 511s set (h, "facecolor", "none", "edgecolor", "cyan"); 511s h = mesh (x1, x2, YintL, ones (10, 10)); 511s set (h, "facecolor", "none", "edgecolor", "cyan"); 511s hold off 511s axis tight 511s view (75, 25) 511s title ("Gaussian process regression with linear kernel"); 511s ***** demo 511s ## Projection over basis function with linear kernel 511s pp = [2, 2, 0.3, 1]; 511s n = 10; 511s rand ("seed", 145); 511s X = 2 * rand (n, 1) - 1; 511s randn ("seed", 45); 511s Y = polyval (pp, X) + 0.3 * randn (n, 1); 511s 511s ## Powers 511s px = [sqrt(abs(X)), X, X.^2, X.^3]; 511s 511s ## Points for interpolation/extrapolation 511s Xfit = linspace (-1, 1, 100)'; 511s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 511s 511s ## Define a prior covariance assuming that the sqrt component is not present 511s Sp = 100 * eye (size (px, 2) + 1); 511s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 511s 511s ## Fit regression model 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 511s 511s ## Plot fitted data 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("Linear kernel over basis function with prior covariance"); 511s ***** demo 511s ## Projection over basis function with linear kernel 511s pp = [2, 2, 0.3, 1]; 511s n = 10; 511s rand ("seed", 145); 511s X = 2 * rand (n, 1) - 1; 511s randn ("seed", 45); 511s Y = polyval (pp, X) + 0.3 * randn (n, 1); 511s 511s ## Powers 511s px = [sqrt(abs(X)), X, X.^2, X.^3]; 511s 511s ## Points for interpolation/extrapolation 511s Xfit = linspace (-1, 1, 100)'; 511s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 511s 511s ## Fit regression model without any assumption on prior covariance 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 511s 511s ## Plot fitted data 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("Linear kernel over basis function without prior covariance"); 511s ***** demo 511s ## Projection over basis function with rbf kernel 511s pp = [2, 2, 0.3, 1]; 511s n = 10; 511s rand ("seed", 145); 511s X = 2 * rand (n, 1) - 1; 511s randn ("seed", 45); 511s Y = polyval (pp, X) + 0.3 * randn (n, 1); 511s 511s ## Powers 511s px = [sqrt(abs(X)), X, X.^2, X.^3]; 511s 511s ## Points for interpolation/extrapolation 511s Xfit = linspace (-1, 1, 100)'; 511s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 511s 511s ## Fit regression model with RBF kernel (standard parameters) 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 511s 511s ## Plot fitted data 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("RBF kernel over basis function with standard parameters"); 511s text (-0.5, 4, "theta = 5\n g = 0.01"); 511s ***** demo 511s ## Projection over basis function with rbf kernel 511s pp = [2, 2, 0.3, 1]; 511s n = 10; 511s rand ("seed", 145); 511s X = 2 * rand (n, 1) - 1; 511s randn ("seed", 45); 511s Y = polyval (pp, X) + 0.3 * randn (n, 1); 511s 511s ## Powers 511s px = [sqrt(abs(X)), X, X.^2, X.^3]; 511s 511s ## Points for interpolation/extrapolation 511s Xfit = linspace (-1, 1, 100)'; 511s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 511s 511s ## Fit regression model with RBF kernel with different parameters 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 511s 511s ## Plot fitted data 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("GP regression with RBF kernel and non default parameters"); 511s text (-0.5, 4, "theta = 10\n g = 0.01"); 511s 511s ## Fit regression model with RBF kernel with different parameters 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 511s 511s ## Plot fitted data 511s figure 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("GP regression with RBF kernel and non default parameters"); 511s text (-0.5, 4, "theta = 50\n g = 0.01"); 511s 511s ## Fit regression model with RBF kernel with different parameters 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 511s 511s ## Plot fitted data 511s figure 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("GP regression with RBF kernel and non default parameters"); 511s text (-0.5, 4, "theta = 50\n g = 0.001"); 511s 511s ## Fit regression model with RBF kernel with different parameters 511s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 511s 511s ## Plot fitted data 511s figure 511s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 511s Xfit, polyval (pp, Xfit), "g-;True;"); 511s axis tight 511s axis manual 511s hold on 511s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 511s hold off 511s title ("GP regression with RBF kernel and non default parameters"); 511s text (-0.5, 4, "theta = 50\n g = 0.05"); 511s ***** demo 511s ## RBF fitting on noiseless 1D Data 511s x = [0:2*pi/7:2*pi]'; 511s y = 5 * sin (x); 511s 511s ## Predictive grid of 500 equally spaced locations 511s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 511s 511s ## Fit regression model with RBF kernel 511s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 511s 511s ## Plot fitted data 511s r = mvnrnd (Yfit, diag (Ysd)', 50); 511s plot (xi, r', "c-"); 511s hold on 511s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 511s plot (x, y, ".k;Predictor points;", "markersize", 20) 511s plot (xi, 5 * sin (xi), "-y;True Function;"); 511s xlim ([-0.5,2*pi+0.5]); 511s ylim ([-10,10]); 511s hold off 511s title ("GP regression with RBF kernel on noiseless 1D data"); 511s text (0, -7, "theta = 5\n g = 0.01"); 511s ***** demo 511s ## RBF fitting on noisy 1D Data 511s x = [0:2*pi/7:2*pi]'; 511s x = [x; x]; 511s y = 5 * sin (x) + randn (size (x)); 511s 511s ## Predictive grid of 500 equally spaced locations 511s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 511s 511s ## Fit regression model with RBF kernel 511s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 511s 511s ## Plot fitted data 511s r = mvnrnd (Yfit, diag (Ysd)', 50); 511s plot (xi, r', "c-"); 511s hold on 511s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 511s plot (x, y, ".k;Predictor points;", "markersize", 20) 511s plot (xi, 5 * sin (xi), "-y;True Function;"); 511s xlim ([-0.5,2*pi+0.5]); 511s ylim ([-10,10]); 511s hold off 511s title ("GP regression with RBF kernel on noisy 1D data"); 511s text (0, -7, "theta = 5\n g = 0.01"); 511s ***** error regress_gp (ones (20, 2)) 511s ***** error regress_gp (ones (20, 2), ones (20, 1)) 512s ***** error ... 512s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 512s ***** error ... 512s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 512s 22 tests, 22 passed, 0 known failure, 0 skipped 512s [inst/ecdf.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ecdf.m 512s ***** demo 512s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 512s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 512s t = min (y, d); ## we observe the minimum of these times 512s censored = (y > d); ## we also observe whether the subject failed 512s 512s ## Calculate and plot the empirical cdf and confidence bounds 512s [f, x, flo, fup] = ecdf (t, "censoring", censored); 512s stairs (x, f); 512s hold on; 512s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 512s 512s ## Superimpose a plot of the known true cdf 512s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 512s hold off; 512s ***** demo 512s R = wblrnd (100, 2, 100, 1); 512s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 512s hold on 512s x = 1:1:250; 512s wblsurv = 1 - cdf ("weibull", x, 100, 2); 512s plot (x, wblsurv, "g-", "LineWidth", 2) 512s legend ("Empirical survivor function", "Lower confidence bound", ... 512s "Upper confidence bound", "Weibull survivor function", ... 512s "Location", "northeast"); 512s hold off 512s ***** error ecdf (); 512s ***** error ecdf (randi (15,2)); 512s ***** error ecdf ([3,2,4,3+2i,5]); 512s ***** error kstest ([2,3,4,5,6],"tail"); 512s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 512s ***** error kstest ([2,3,4,5,6],"function", ""); 512s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 512s ***** error kstest ([2,3,4,5,6],"tail", 0); 512s ***** error kstest ([2,3,4,5,6],"alpha", 0); 512s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 512s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 512s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 512s ***** test 512s hf = figure ("visible", "off"); 512s unwind_protect 512s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 512s [F, x, Flo, Fup] = ecdf (x); 512s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 512s assert (F, F_out, ones (10,1) * 1e-4); 512s x_out = [0 0 2 3 4 5 6 7 8 9]'; 512s assert (x, x_out); 512s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 512s assert (Flo, Flo_out, ones (10,1) * 1e-4); 512s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 512s assert (Fup, Fup_out, ones (10,1) * 1e-4); 512s unwind_protect_cleanup 512s close (hf); 512s end_unwind_protect 512s ***** test 512s hf = figure ("visible", "off"); 512s unwind_protect 512s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 512s ecdf (x); 512s unwind_protect_cleanup 512s close (hf); 512s end_unwind_protect 512s 14 tests, 14 passed, 0 known failure, 0 skipped 512s [inst/trimmean.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/trimmean.m 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s out = trimmean (x, 10, [1, 2]); 512s assert (out(1,1,1), 10.3889, 1e-4); 512s assert (out(1,1,2), 29.6111, 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s out = trimmean (x, 10, 1); 512s assert (out(:,:,1), [-17.6, 8, 13, 18]); 512s assert (out(:,:,2), [23, 28, 33, 10.6]); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, 1); 512s assert (out(:,:,1), [-23, 8, 13, 18]); 512s assert (out(:,:,2), [23, 28, 33, 3.75]); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s out = trimmean (x, 10, 2); 512s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 512s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, 2); 512s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 512s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s out = trimmean (x, 10, [1, 2, 3]); 512s assert (out, trimmean (x, 10, "all")); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, [1, 2]); 512s assert (out(1,1,1), 10.7647, 1e-4); 512s assert (out(1,1,2), 29.1176, 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, [1, 3]); 512s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, [2, 3]); 512s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, [1, 2, 3]); 512s assert (out, trimmean (x, 10, "all")); 512s ***** test 512s x = reshape (1:40, [5, 4, 2]); 512s x([3, 37]) = -100; 512s x([4, 38]) = NaN; 512s out = trimmean (x, 10, [2, 3, 5]); 512s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 512s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 512s ***** assert (trimmean ([], 10), NaN) 512s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 512s ***** error trimmean (1) 512s ***** error trimmean (1,2,3,4,5) 512s ***** error trimmean ([1 2 3 4], -10) 512s ***** error trimmean ([1 2 3 4], 100) 512s ***** error trimmean ([1 2 3 4], 10, "flag") 512s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 512s ***** error ... 512s trimmean ([1 2 3 4], 10, -1) 512s ***** error ... 512s trimmean ([1 2 3 4], 10, "floor", -1) 512s ***** error ... 512s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 512s ***** error ... 512s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 512s 26 tests, 26 passed, 0 known failure, 0 skipped 512s [inst/gmdistribution.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/gmdistribution.m 512s ***** test 512s mu = eye(2); 512s Sigma = eye(2); 512s GM = gmdistribution (mu, Sigma); 512s density = GM.pdf ([0 0; 1 1]); 512s assert (density(1) - density(2), 0, 1e-6); 512s 512s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 512s assert (idx, [1; 2]); 512s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 512s assert (nlogl - nlogl2, 0, 1e-6); 512s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 512s assert (P - P3, zeros (2), 1e-6); 512s [idx4,nlogl4] = cluster (GM, eye(2)); 512s assert (size (nlogl4), [1 1]); 512s idx5 = cluster (GM, eye(2)); 512s assert (idx - idx5, zeros (2,1)); 512s 512s D = GM.mahal ([1;0]); 512s assert (D - M(1,:), zeros (1,2), 1e-6); 512s 512s P = GM.posterior ([0 1]); 512s assert (P - P2(2,:), zeros (1,2), 1e-6); 512s 512s R = GM.random(20); 512s assert (size(R), [20, 2]); 512s 512s R = GM.random(); 512s assert (size(R), [1, 2]); 512s 1 test, 1 passed, 0 known failure, 0 skipped 512s [inst/hmmestimate.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hmmestimate.m 512s ***** test 512s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 512s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 512s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 512s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 512s [transprobest, outprobest] = hmmestimate (sequence, states); 512s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 512s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 512s assert (transprobest, expectedtransprob, 0.001); 512s assert (outprobest, expectedoutprob, 0.001); 512s ***** test 512s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 512s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 512s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 512s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 512s "Two", "One", "One", "One", "One", "One", "One"}; 512s symbols = {"A", "B", "C"}; 512s statenames = {"One", "Two"}; 512s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 512s symbols, "statenames", statenames); 512s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 512s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 512s assert (transprobest, expectedtransprob, 0.001); 512s assert (outprobest, expectedoutprob, 0.001); 512s ***** test 512s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 512s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 512s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 512s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 512s pseudotransitions = [8, 2; 4, 6]; 512s pseudoemissions = [2, 4, 4; 7, 2, 1]; 512s [transprobest, outprobest] = hmmestimate (sequence, states, ... 512s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 512s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 512s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 512s 0.823529, 0.117647, 0.058824]; 512s assert (transprobest, expectedtransprob, 0.001); 512s assert (outprobest, expectedoutprob, 0.001); 512s 3 tests, 3 passed, 0 known failure, 0 skipped 512s [inst/kstest2.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/kstest2.m 512s ***** error kstest2 ([1,2,3,4,5,5]) 512s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 512s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 512s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 512s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 512s ***** test 512s load examgrades 512s [h, p] = kstest2 (grades(:,1), grades(:,2)); 512s assert (h, false); 512s assert (p, 0.1222791870137312, 1e-14); 512s ***** test 512s load examgrades 512s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 512s assert (h, false); 512s assert (p, 0.1844421391011258, 1e-14); 512s ***** test 512s load examgrades 512s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 512s assert (h, false); 512s assert (p, 0.06115357930171663, 1e-14); 512s ***** test 512s load examgrades 512s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 512s assert (h, true); 512s assert (p, 0.06115357930171663, 1e-14); 512s 14 tests, 14 passed, 0 known failure, 0 skipped 512s [inst/shadow9/var.m] 512s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/shadow9/var.m 512s ***** assert (var (13), 0) 512s ***** assert (var (single (13)), single (0)) 512s ***** assert (var ([1,2,3]), 1) 512s ***** assert (var ([1,2,3], 1), 2/3, eps) 512s ***** assert (var ([1,2,3], [], 1), [0,0,0]) 512s ***** assert (var ([1,2,3], [], 3), [0,0,0]) 512s ***** assert (var (5, 99), 0) 512s ***** assert (var (5, 99, 1), 0) 512s ***** assert (var (5, 99, 2), 0) 512s ***** assert (var ([5 3], [99 99], 2), 1) 512s ***** assert (var ([1:7], [1:7]), 3) 512s ***** assert (var ([eye(3)], [1:3]), [5/36, 2/9, 1/4], eps) 512s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 512s ***** assert (var ([1 2; 3 4], 0, 'all'), var ([1:4])) 512s ***** assert (var (reshape ([1:8], 2, 2, 2), 0, [1 3]), [17/3 17/3], eps) 512s ***** assert (var ([1 2 3;1 2 3], [], [1 2]), 0.8, eps) 512s ***** test 512s x = [-10:10]; 512s y = [x;x+5;x-5]; 512s assert (var (x), 38.5); 512s assert (var (y, [], 2), [38.5; 38.5; 38.5]); 512s assert (var (y, 0, 2), [38.5; 38.5; 38.5]); 512s assert (var (y, 1, 2), ones (3,1) * 36.66666666666666, 1e-14); 512s assert (var (y, "all"), 54.19354838709678, 1e-14); 512s y(2,4) = NaN; 512s assert (var (y, "all"), NaN); 512s assert (var (y, "all", "includenan"), NaN); 512s assert (var (y, "all", "omitnan"), 55.01533580116342, 1e-14); 512s assert (var (y, 0, 2, "includenan"), [38.5; NaN; 38.5]); 512s assert (var (y, [], 2), [38.5; NaN; 38.5]); 512s assert (var (y, [], 2, "omitnan"), [38.5; 37.81842105263158; 38.5], 1e-14); 512s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan"), 0.75, eps) 512s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan"), 0.75, eps) 512s ***** assert (var (magic(3), [1 NaN 3], "omitnan"), [3 12 3], eps) 512s ***** assert (var ([1 NaN 3], [1 2 3], "omitnan", "all"), 0.75, eps) 512s ***** assert (var ([1 NaN 3], [1 2 3], "all", "omitnan"), 0.75, eps) 512s ***** assert (var ([1 2 3], [1 NaN 3], "omitnan", "all"), 0.75, eps) 512s ***** assert (var ([1 NaN 3], [1 2 3], 2, "omitnan"), 0.75, eps) 512s ***** assert (var ([1 2 3], [1 NaN 3], 2, "omitnan"), 0.75, eps) 512s ***** assert (var (magic(3), [1 NaN 3], 1, "omitnan"), [3 12 3], eps) 512s ***** assert (var (magic(3), [1 NaN 3], 2, "omitnan"), [0.75;3;0.75], eps) 512s ***** assert (var ([4 4; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 512s ***** assert (var ([4 NaN; 4 6; 6 6], [1 2 3], 1, 'omitnan'), [1 0]) 512s ***** assert (var ([4 NaN; 4 6; 6 6], [1 3], 2, 'omitnan'), [0;0.75;0], eps) 512s ***** assert (var (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ones(1,3,2)*5) 512s ***** assert (var (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), 5*ones(3,1,2)) 512s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 512s 60 * ones(1,1,2)) 512s ***** assert (var (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 512s 6 * ones(1,3,2)) 512s ***** assert (var (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), 969) 512s ***** test 512s x = reshape(1:18, [3 3 2]); 512s x([2, 14]) = NaN; 512s w = ones (3,3,2); 512s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 512s ***** test 512s x = reshape(1:18, [3 3 2]); 512s w = ones (3,3,2); 512s w([2, 14]) = NaN; 512s assert (var (16*x, w, [1:3], 'omitnan'), 6519); 512s ***** assert (var ([1 2 3], "aLl"), 1); 512s ***** assert (var ([1 2 3], "OmitNan"), 1); 512s ***** assert (var ([1 2 3], "IncludeNan"), 1); 512s ***** test 512s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 512s assert (size (var (x, 0, [3 2])), [10, 1, 1, 3]); 512s assert (size (var (x, 1, [1 2])), [1, 1, 6, 3]); 512s assert (size (var (x, [], [1 2 4])), [1, 1, 6]); 512s assert (size (var (x, 0, [1 4 3])), [1, 40]); 512s assert (size (var (x, [], [1 2 3 4])), [1, 1]); 512s ***** assert (var (3*magic(3)), [63 144 63]) 512s ***** assert (var (3*magic(3), 'omitnan'), [63 144 63]) 512s ***** assert (var (3*magic(3), 1), [42 96 42]) 512s ***** assert (var (3*magic(3), 1, 'omitnan'), [42 96 42]) 512s ***** assert (var (3*magic(3), ones(1,3), 1), [42 96 42]) 512s ***** assert (var (3*magic(3), ones(1,3), 1, 'omitnan'), [42 96 42]) 512s ***** assert (var (2*magic(3), [1 1 NaN], 1, 'omitnan'), [25 16 1]) 512s ***** assert (var (3*magic(3), ones(3,3)), [42 96 42]) 512s ***** assert (var (3*magic(3), ones(3,3), 'omitnan'), [42 96 42]) 512s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), [42 36 42]) 512s ***** assert (var (3*magic(3), ones(3,3), 1), [42 96 42]) 512s ***** assert (var (3*magic(3), ones(3,3), 1, 'omitnan'), [42 96 42]) 512s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), [42 36 42]) 512s ***** assert (var (3*magic(3), ones(3,3), [1 4]), [42 96 42]) 512s ***** assert (var (3*magic(3), ones(3,3), [1 4], 'omitnan'), [42 96 42]) 512s ***** assert (var (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), [42 36 42]) 512s ***** test 512s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 512s v = repmat (33.38912133891213, [10, 1, 1, 3]); 512s assert (var (x, 0, [3, 2]), v, 1e-14); 512s v = repmat (33.250, [10, 1, 1, 3]); 512s assert (var (x, 1, [3, 2]), v, 1e-14); 512s x(2,5,6,3) = NaN; 512s v(2,1,1,3) = NaN; 512s assert (var (x, 1, [3, 2]), v, 4e-14); 512s v = repmat (33.38912133891213, [10 1 1 3]); 512s v(2,1,1,3) = NaN; 512s assert (var (x, [], [3, 2]), v, 4e-14); 512s v(2,1,1,3) = 33.40177912169048; 512s assert (var (x, [], [3, 2], "omitnan"), v, 4e-14); 512s ***** assert (var (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 512s ***** assert (var (magic (3), [1:9], "all"), 6.666666666666667, 1e-14) 512s ***** assert (var (ones (2,2), [], 3), zeros (2,2)) 512s ***** assert (var (ones (2,2,2), [], 99), zeros (2,2,2)) 512s ***** assert (var (magic (3), [], 3), zeros (3,3)) 512s ***** assert (var (magic (3), [], 1), [7, 16, 7]) 512s ***** assert (var (magic (3), [], [1 3]), [7, 16, 7]) 512s ***** assert (var (magic (3), [], [1 99]), [7, 16, 7]) 512s ***** assert (var ([]), NaN) 512s ***** assert (class (var (single ([]))), "single") 512s ***** assert (var ([],[],1), NaN(1,0)) 512s ***** assert (var ([],[],2), NaN(0,1)) 512s ***** assert (var ([],[],3), []) 512s ***** assert (class (var (single ([]), [], 1)), "single") 512s ***** assert (var (ones (1,0)), NaN) 512s ***** assert (var (ones (1,0), [], 1), NaN(1,0)) 512s ***** assert (var (ones (1,0), [], 2), NaN) 512s ***** assert (var (ones (1,0), [], 3), NaN(1,0)) 512s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 512s ***** assert (var (ones (0,1)), NaN) 512s ***** assert (var (ones (0,1), [], 1), NaN) 512s ***** assert (var (ones (0,1), [], 2), NaN(0,1)) 512s ***** assert (var (ones (0,1), [], 3), NaN(0,1)) 512s ***** assert (var (ones (1,3,0,2)), NaN(1,1,0,2)) 512s ***** assert (var (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 512s ***** assert (var (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 512s ***** assert (var (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 512s ***** assert (var (ones (1,3,0,2), [], 4), NaN(1,3,0)) 512s ***** test 512s [~, m] = var ([]); 512s assert (m, NaN); 512s ***** test <*62395> 512s [~, m] = var (13); 512s assert (m, 13); 512s [~, m] = var (single(13)); 512s assert (m, single(13)); 512s [~, m] = var ([1, 2, 3; 3 2 1], []); 512s assert (m, [2 2 2]); 512s [~, m] = var ([1, 2, 3; 3 2 1], [], 1); 512s assert (m, [2 2 2]); 512s [~, m] = var ([1, 2, 3; 3 2 1], [], 2); 512s assert (m, [2 2]'); 512s [~, m] = var ([1, 2, 3; 3 2 1], [], 3); 512s assert (m, [1 2 3; 3 2 1]); 512s ***** test <*62395> 512s [~, m] = var (5,99); 512s assert (m, 5); 512s [~, m] = var ([1:7], [1:7]); 512s assert (m, 5); 512s [~, m] = var ([eye(3)], [1:3]); 512s assert (m, [1/6, 1/3, 0.5], eps); 512s [~, m] = var (ones (2,2,2), [1:2], 3); 512s assert (m, ones (2,2)); 512s [~, m] = var ([1 2; 3 4], 0, 'all'); 512s assert (m, 2.5, eps); 512s [~, m] = var (reshape ([1:8], 2, 2, 2), 0, [1 3]); 512s assert (m, [3.5, 5.5], eps); 512s ***** test 512s [v, m] = var (4 * eye (2), [1, 3]); 512s assert (v, [3, 3]); 512s assert (m, [1, 3]); 512s ***** test <*62395> 512s [~, m] = var ([]); 512s assert (m, NaN); 512s ***** test <*62395> 512s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 512s [~, m] = var (x, 0, [3 2]); 512s assert (m, mean (x, [3 2])); 512s [~, m] = var (x, 0, [1 2]); 512s assert (m, mean (x, [1 2])); 512s [~, m] = var (x, 0, [1 3 4]); 512s assert (m, mean (x, [1 3 4])); 512s ***** test 512s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 512s x(2,5,6,3) = NaN; 512s [~, m] = var (x, 0, [3 2], "omitnan"); 512s assert (m, mean (x, [3 2], "omitnan")); 512s ***** test <*63203> 512s [v, m] = var (Inf); 512s assert (v, NaN); 512s assert (m, Inf); 512s ***** test <*63203> 512s [v, m] = var (NaN); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3]); 512s assert (v, NaN); 512s assert (m, Inf); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3]'); 512s assert (v, NaN); 512s assert (m, Inf); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3]); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3]'); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3], [], 1); 512s assert (v, [0, NaN, 0]); 512s assert (m, [1, Inf, 3]); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3], [], 2); 512s assert (v, NaN); 512s assert (m, Inf); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3], [], 3); 512s assert (v, [0, NaN, 0]); 512s assert (m, [1, Inf, 3]); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3], [], 1); 512s assert (v, [0, NaN, 0]); 512s assert (m, [1, NaN, 3]); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3], [], 2); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3], [], 3); 512s assert (v, [0, NaN, 0]); 512s assert (m, [1, NaN, 3]); 512s ***** test <*63203> 512s [v, m] = var ([1, 2, 3; 3, Inf, 5]); 512s assert (v, [2, NaN, 2]); 512s assert (m, [2, Inf, 4]); 512s ***** test <*63203> 512s [v, m] = var ([1, Inf, 3; 3, Inf, 5]); 512s assert (v, [2, NaN, 2]); 512s assert (m, [2, Inf, 4]); 512s ***** test <*63203> 512s [v, m] = var ([1, 2, 3; 3, NaN, 5]); 512s assert (v, [2, NaN, 2]); 512s assert (m, [2, NaN, 4]); 512s ***** test <*63203> 512s [v, m] = var ([1, NaN, 3; 3, NaN, 5]); 512s assert (v, [2, NaN, 2]); 512s assert (m, [2, NaN, 4]); 512s ***** test <*63203> 512s [v, m] = var ([Inf, 2, NaN]); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([Inf, 2, NaN]'); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([NaN, 2, Inf]); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([NaN, 2, Inf]'); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([Inf, 2, NaN], [], 1); 512s assert (v, [NaN, 0, NaN]); 512s assert (m, [Inf, 2, NaN]); 512s ***** test <*63203> 512s [v, m] = var ([Inf, 2, NaN], [], 2); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([NaN, 2, Inf], [], 1); 512s assert (v, [NaN, 0, NaN]); 512s assert (m, [NaN, 2, Inf]); 512s ***** test <*63203> 512s [v, m] = var ([NaN, 2, Inf], [], 2); 512s assert (v, NaN); 512s assert (m, NaN); 512s ***** test <*63203> 512s [v, m] = var ([1, 3, NaN; 3, 5, Inf]); 512s assert (v, [2, 2, NaN]); 512s assert (m, [2, 4, NaN]); 512s ***** test <*63203> 512s [v, m] = var ([1, 3, Inf; 3, 5, NaN]); 512s assert (v, [2, 2, NaN]); 512s assert (m, [2, 4, NaN]); 512s ***** test <*63291> 512s [v, m] = var (2 * eye (2)); 512s assert (v, [2, 2]); 512s assert (m, [1, 1]); 512s ***** test <*63291> 512s [v, m] = var (4 * eye (2), [1, 3]); 512s assert (v, [3, 3]); 512s assert (m, [1, 3]); 512s ***** test <*63291> 512s [v, m] = var (sparse (2 * eye (2))); 512s assert (full (v), [2, 2]); 512s assert (full (m), [1, 1]); 512s ***** test <*63291> 512s [v, m] = var (sparse (4 * eye (2)), [1, 3]); 512s assert (full (v), [3, 3]); 512s assert (full (m), [1, 3]); 512s ***** test<*63291> 512s [v, m] = var (sparse (eye (2))); 512s assert (issparse (v)); 512s assert (issparse (m)); 512s ***** test<*63291> 512s [v, m] = var (sparse (eye (2)), [1, 3]); 512s assert (issparse (v)); 512s assert (issparse (m)); 512s ***** error var () 513s ***** error var (1, 2, "omitnan", 3) 513s ***** error var (1, 2, 3, 4) 513s ***** error var (1, 2, 3, 4, 5) 513s ***** error var (1, "foo") 513s ***** error var (1, [], "foo") 514s ***** error var ([1 2 3], 2) 514s ***** error var ([1 2], 2, "all") 514s ***** error var ([1 2],0.5, "all") 514s ***** error var (1, -1) 514s ***** error var (1, [1 -1]) 514s ***** error ... 514s var ([1 2 3], [1 -1 0]) 514s ***** error var ({1:5}) 514s ***** error var ("char") 514s ***** error var (['A'; 'B']) 514s ***** error var (1, [], ones (2,2)) 514s ***** error var (1, 0, 1.5) 514s ***** error var (1, [], 0) 514s ***** error var (1, [], 1.5) 514s ***** error var ([1 2 3], [], [-1 1]) 514s ***** error ... 514s var (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 514s ***** error ... 514s var ([1 2], eye (2)) 514s ***** error ... 514s var ([1 2 3 4], [1 2; 3 4]) 514s ***** error ... 514s var ([1 2 3 4], [1 2; 3 4], 1) 514s ***** error ... 514s var ([1 2 3 4], [1 2; 3 4], [2 3]) 514s ***** error ... 514s var (ones (2, 2), [1 2], [1 2]) 514s ***** error ... 514s var ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 514s ***** error ... 514s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 514s ***** error var ([1 2 3; 2 3 4], [1 3 4]) 514s ***** error var ([1 2], [1 2 3]) 514s ***** error var (1, [1 2]) 514s ***** error var ([1 2 3; 2 3 4], [1 3 4], 1) 514s ***** error var ([1 2 3; 2 3 4], [1 3], 2) 514s ***** error var ([1 2], [1 2], 1) 514s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 514s var (1, [], 1, "all") 514s ***** error ... 514s var ([1 2 3; 2 3 4], [1 3], "all") 514s ***** error ... 514s var (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 514s 162 tests, 162 passed, 0 known failure, 0 skipped 514s [inst/shadow9/mean.m] 514s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/shadow9/mean.m 514s ***** test 514s x = -10:10; 514s y = x'; 514s z = [y, y+10]; 514s assert (mean (x), 0); 514s assert (mean (y), 0); 514s assert (mean (z), [0, 10]); 514s ***** assert (mean (magic (3), 1), [5, 5, 5]) 514s ***** assert (mean (magic (3), 2), [5; 5; 5]) 514s ***** assert (mean (logical ([1 0 1 1])), 0.75) 514s ***** assert (mean (single ([1 0 1 1])), single (0.75)) 514s ***** assert (mean ([1 2], 3), [1 2]) 514s ***** test 514s in = [1 2 3]; 514s out = 2; 514s assert (mean (in, "default"), mean (in)); 514s assert (mean (in, "default"), out); 514s assert (mean (in, "double"), out); 514s assert (mean (in, "native"), out); 514s ***** test 514s in = single ([1 2 3]); 514s out = 2; 514s assert (mean (in, "default"), mean (in)); 514s assert (mean (in, "default"), single (out)); 514s assert (mean (in, "double"), out); 514s assert (mean (in, "native"), single (out)); 514s ***** test 514s in = logical ([1 0 1]); 514s out = 2/3; 514s assert (mean (in, "default"), mean (in), eps); 514s assert (mean (in, "default"), out, eps); 514s assert (mean (in, "double"), out, eps); 514s assert (mean (in, "native"), out, eps); 514s ***** test 514s in = char ("ab"); 514s out = 97.5; 514s assert (mean (in, "default"), mean (in), eps); 514s assert (mean (in, "default"), out, eps); 514s assert (mean (in, "double"), out, eps); 514s ***** test 514s in = uint8 ([1 2 3]); 514s out = 2; 514s assert (mean (in, "default"), mean (in)); 514s assert (mean (in, "default"), out); 514s assert (mean (in, "double"), out); 514s assert (mean (in, "native"), uint8 (out)); 514s ***** test 514s in = uint8 ([0 1 2 3]); 514s out = 1.5; 514s out_u8 = 2; 514s assert (mean (in, "default"), mean (in), eps); 514s assert (mean (in, "default"), out, eps); 514s assert (mean (in, "double"), out, eps); 514s assert (mean (in, "native"), uint8 (out_u8)); 514s assert (class (mean (in, "native")), "uint8"); 514s ***** test # internal sum exceeding intmax 514s in = uint8 ([3 141 141 255]); 514s out = 135; 514s assert (mean (in, "default"), mean (in)); 514s assert (mean (in, "default"), out); 514s assert (mean (in, "double"), out); 514s assert (mean (in, "native"), uint8 (out)); 514s assert (class (mean (in, "native")), "uint8"); 514s ***** test # fractional answer with internal sum exceeding intmax 514s in = uint8 ([1 141 141 255]); 514s out = 134.5; 514s out_u8 = 135; 514s assert (mean (in, "default"), mean (in)); 514s assert (mean (in, "default"), out); 514s assert (mean (in, "double"), out); 514s assert (mean (in, "native"), uint8 (out_u8)); 514s assert (class (mean (in, "native")), "uint8"); 514s ***** test <54567> # large int64 sum exceeding intmax and double precision limit 514s in_same = uint64 ([intmax("uint64") intmax("uint64")-2]); 514s out_same = intmax ("uint64")-1; 514s in_opp = int64 ([intmin("int64"), intmax("int64")-1]); 514s out_opp = -1; 514s in_neg = int64 ([intmin("int64") intmin("int64")+2]); 514s out_neg = intmin ("int64")+1; 514s 514s ## both positive 514s assert (mean (in_same, "default"), mean (in_same)); 514s assert (mean (in_same, "default"), double (out_same)); 514s assert (mean (in_same, "double"), double (out_same)); 514s assert (mean (in_same, "native"), uint64 (out_same)); 514s assert (class (mean (in_same, "native")), "uint64"); 514s 514s ## opposite signs 514s assert (mean (in_opp, "default"), mean (in_opp)); 514s assert (mean (in_opp, "default"), double (out_opp)); 514s assert (mean (in_opp, "double"), double (out_opp)); 514s assert (mean (in_opp, "native"), int64 (out_opp)); 514s assert (class (mean (in_opp, "native")), "int64"); 514s 514s ## both negative 514s assert (mean (in_neg, "default"), mean (in_neg)); 514s assert (mean (in_neg, "default"), double(out_neg)); 514s assert (mean (in_neg, "double"), double(out_neg)); 514s assert (mean (in_neg, "native"), int64(out_neg)); 514s assert (class (mean (in_neg, "native")), "int64"); 514s ***** test <54567> 514s in = [(intmin('int64')+5), (intmax('int64'))-5]; 514s assert (mean (in, "native"), int64(-1)); 514s assert (class (mean (in, "native")), "int64"); 514s assert (mean (double(in)), double(0) ); 514s assert (mean (in), double(-0.5) ); 514s assert (mean (in, "default"), double(-0.5) ); 514s assert (mean (in, "double"), double(-0.5) ); 514s assert (mean (in, "all", "native"), int64(-1)); 514s assert (mean (in, 2, "native"), int64(-1)); 514s assert (mean (in, [1 2], "native"), int64(-1)); 514s assert (mean (in, [2 3], "native"), int64(-1)); 514s assert (mean ([intmin("int64"), in, intmax("int64")]), double(-0.5)) 514s assert (mean ([in; int64([1 3])], 2, "native"), int64([-1; 2])); 514s ***** test 514s x = [-10:10]; 514s y = [x;x+5;x-5]; 514s assert (mean (x), 0); 514s assert (mean (y, 2), [0, 5, -5]'); 514s assert (mean (y, "all"), 0); 514s y(2,4) = NaN; 514s assert (mean (y', "omitnan"), [0 5.35 -5]); 514s z = y + 20; 514s assert (mean (z, "all"), NaN); 514s assert (mean (z, "all", "includenan"), NaN); 514s assert (mean (z, "all", "omitnan"), 20.03225806451613, 4e-14); 514s m = [20 NaN 15]; 514s assert (mean (z'), m); 514s assert (mean (z', "includenan"), m); 514s m = [20 25.35 15]; 514s assert (mean (z', "omitnan"), m); 514s assert (mean (z, 2, "omitnan"), m'); 514s assert (mean (z, 2, "native", "omitnan"), m'); 514s assert (mean (z, 2, "omitnan", "native"), m'); 514s ***** test 514s assert (mean (true, "all"), 1); 514s assert (mean (false), 0); 514s assert (mean ([true false true]), 2/3, 4e-14); 514s assert (mean ([true false true], 1), [1 0 1]); 514s assert (mean ([true false NaN], 1), [1 0 NaN]); 514s assert (mean ([true false NaN], 2), NaN); 514s assert (mean ([true false NaN], 2, "omitnan"), 0.5); 514s assert (mean ([true false NaN], 2, "omitnan", "native"), 0.5); 514s ***** assert (mean ("abc"), double (98)) 514s ***** assert (mean ("ab"), double (97.5), eps) 514s ***** assert (mean ("abc", "double"), double (98)) 514s ***** assert (mean ("abc", "default"), double (98)) 514s ***** test 514s x = magic (4); 514s x([2, 9:12]) = NaN; 514s assert (mean (x), [NaN 8.5, NaN, 8.5], eps); 514s assert (mean (x,1), [NaN 8.5, NaN, 8.5], eps); 514s assert (mean (x,2), NaN(4,1), eps); 514s assert (mean (x,3), x, eps); 514s assert (mean (x, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 514s assert (mean (x, 1, 'omitnan'), [29/3, 8.5, NaN, 8.5], eps); 514s assert (mean (x, 2, 'omitnan'), [31/3; 9.5; 28/3; 19/3], eps); 514s assert (mean (x, 3, 'omitnan'), x, eps); 514s ***** assert (mean ([]), NaN(1,1)) 514s ***** assert (mean (single([])), NaN(1,1,"single")) 514s ***** assert (mean ([], 1), NaN(1,0)) 514s ***** assert (mean ([], 2), NaN(0,1)) 514s ***** assert (mean ([], 3), NaN(0,0)) 514s ***** assert (mean (ones(1,0)), NaN(1,1)) 514s ***** assert (mean (ones(1,0), 1), NaN(1,0)) 514s ***** assert (mean (ones(1,0), 2), NaN(1,1)) 514s ***** assert (mean (ones(1,0), 3), NaN(1,0)) 514s ***** assert (mean (ones(0,1)), NaN(1,1)) 514s ***** assert (mean (ones(0,1), 1), NaN(1,1)) 514s ***** assert (mean (ones(0,1), 2), NaN(0,1)) 514s ***** assert (mean (ones(0,1), 3), NaN(0,1)) 514s ***** assert (mean (ones(0,1,0)), NaN(1,1,0)) 514s ***** assert (mean (ones(0,1,0), 1), NaN(1,1,0)) 514s ***** assert (mean (ones(0,1,0), 2), NaN(0,1,0)) 514s ***** assert (mean (ones(0,1,0), 3), NaN(0,1,1)) 514s ***** assert (mean (ones(0,0,1,0)), NaN(1,0,1,0)) 514s ***** assert (mean (ones(0,0,1,0), 1), NaN(1,0,1,0)) 514s ***** assert (mean (ones(0,0,1,0), 2), NaN(0,1,1,0)) 514s ***** assert (mean (ones(0,0,1,0), 3), NaN(0,0,1,0)) 514s ***** test 514s x = repmat ([1:20;6:25], [5 2 6 3]); 514s assert (size (mean (x, [3 2])), [10 1 1 3]); 514s assert (size (mean (x, [1 2])), [1 1 6 3]); 514s assert (size (mean (x, [1 2 4])), [1 1 6]); 514s assert (size (mean (x, [1 4 3])), [1 40]); 514s assert (size (mean (x, [1 2 3 4])), [1 1]); 514s ***** assert (mean (ones (2,2), 3), ones (2,2)) 514s ***** assert (mean (ones (2,2,2), 99), ones (2,2,2)) 514s ***** assert (mean (magic (3), 3), magic (3)) 514s ***** assert (mean (magic (3), [1 3]), [5, 5, 5]) 514s ***** assert (mean (magic (3), [1 99]), [5, 5, 5]) 514s ***** test 514s x = repmat ([1:20;6:25], [5 2 6 3]); 514s m = repmat ([10.5;15.5], [5 1 1 3]); 514s assert (mean (x, [3 2]), m, 4e-14); 514s x(2,5,6,3) = NaN; 514s m(2,1,1,3) = NaN; 514s assert (mean (x, [3 2]), m, 4e-14); 514s m(2,1,1,3) = 15.52301255230125; 514s assert (mean (x, [3 2], "omitnan"), m, 4e-14); 514s ***** assert (mean ([1 2 3], "aLL"), 2) 514s ***** assert (mean ([1 2 3], "OmitNan"), 2) 514s ***** assert (mean ([1 2 3], "DOUBle"), 2) 514s ***** assert <*63848> (mean (ones (80e6, 1, "single")), 1, eps) 514s ***** assert <*63848> (mean (ones (80e6, 1, "single"), "all"), 1, eps) 515s ***** assert <*63848> (mean (ones (80e6, 1, "single"), 1), 1, eps) 515s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 2]), 1, eps) 515s ***** assert <*63848> (mean (ones (80e6, 1, "single"), [1 3]), 1, eps) 516s ***** assert <63848> (mean ([flintmax("double"), ones(1, 2^8-1, "double")]), ... 516s 35184372088833-1/(2^8), eps(35184372088833)) 516s !!!!! known bug: https://octave.org/testfailure/?63848 516s ASSERT errors for: assert (mean ([flintmax("double"), ones(1, 2 ^ 8 - 1, "double")]),35184372088833 - 1 / (2 ^ 8),eps (35184372088833)) 516s 516s Location | Observed | Expected | Reason 516s () 35184372088832 35184372088833 Abs err 1 exceeds tol 0.0078125 by 1 516s ***** error mean () 516s ***** error mean (1, 2, 3) 516s ***** error mean (1, 2, 3, 4) 516s ***** error mean (1, "all", 3) 517s ***** error mean (1, "b") 517s ***** error mean (1, 1, "foo") 517s ***** error mean ("abc", "native") 517s ***** error mean ({1:5}) 517s ***** error mean (1, ones (2,2)) 517s ***** error mean (1, 1.5) 517s ***** error mean (1, 0) 517s ***** error mean (1, []) 517s ***** error mean (1, -1) 517s ***** error mean (1, -1.5) 517s ***** error mean (1, NaN) 517s ***** error mean (1, Inf) 517s ***** error mean (repmat ([1:20;6:25], [5 2]), -1) 517s ***** error mean (repmat ([1:5;5:9], [5 2]), [1 -1]) 517s ***** error mean (1, ones(1,0)) 517s ***** error mean (1, [2 2]) 517s 80 tests, 79 passed, 0 known failure, 1 skipped 517s [inst/shadow9/median.m] 517s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/shadow9/median.m 517s ***** assert (median (1), 1) 517s ***** assert (median ([1,2,3]), 2) 517s ***** assert (median ([1,2,3]'), 2) 517s ***** assert (median (cat(3,3,1,2)), 2) 517s ***** assert (median ([3,1,2]), 2) 517s ***** assert (median ([2,4,6,8]), 5) 517s ***** assert (median ([8,2,6,4]), 5) 517s ***** assert (median (single ([1,2,3])), single (2)) 517s ***** assert (median ([1,2], 3), [1,2]) 517s ***** test 517s x = [1, 2, 3, 4, 5, 6]; 517s x2 = x'; 517s y = [1, 2, 3, 4, 5, 6, 7]; 517s y2 = y'; 517s 517s assert (median (x) == median (x2) && median (x) == 3.5); 517s assert (median (y) == median (y2) && median (y) == 4); 517s assert (median ([x2, 2 * x2]), [3.5, 7]); 517s assert (median ([y2, 3 * y2]), [4, 12]); 517s ***** test 517s in = [1 2 3]; 517s out = 2; 517s assert (median (in, "default"), median (in)); 517s assert (median (in, "default"), out); 517s ***** test 517s in = single ([1 2 3]); 517s out = 2; 517s assert (median (in, "default"), single (median (in))); 517s assert (median (in, "default"), single (out)); 517s assert (median (in, "double"), double (out)); 517s assert (median (in, "native"), single (out)); 517s ***** test 517s in = uint8 ([1 2 3]); 517s out = 2; 517s assert (median (in, "default"), double (median (in))); 517s assert (median (in, "default"), double (out)); 517s assert (median (in, "double"), out); 517s assert (median (in, "native"), uint8 (out)); 517s ***** test 517s in = logical ([1 0 1]); 517s out = 1; 517s assert (median (in, "default"), double (median (in))); 517s assert (median (in, "default"), double (out)); 517s assert (median (in, "double"), double (out)); 517s assert (median (in, "native"), double (out)); 517s ***** test 517s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 517s y = repmat ([2 1.1 2 NaN NaN], [1, 1, 4]); 517s assert (median (x), y); 517s assert (median (x, 1), y); 517s y = repmat ([2 1.1 2 3.5 4], [1, 1, 4]); 517s assert (median (x, "omitnan"), y); 517s assert (median (x, 1, "omitnan"), y); 517s y = repmat ([2.05; 2.5; 1.4], [1, 1, 4]); 517s assert (median (x, 2, "omitnan"), y); 517s y = repmat ([NaN; NaN; 1.4], [1, 1, 4]); 517s assert (median (x, 2), y); 517s assert (median (x, "all"), NaN); 517s assert (median (x, "all", "omitnan"), 2); 517s ***** assert (median (cat (3, 3, 1, NaN, 2), "omitnan"), 2) 517s ***** assert (median (cat (3, 3, 1, NaN, 2), 3, "omitnan"), 2) 517s ***** test 517s assert (median (true, "all"), logical (1)); 517s assert (median (false), logical (0)); 517s assert (median ([true false true]), true); 517s assert (median ([true false true], 2), true); 517s assert (median ([true false true], 1), logical ([1 0 1])); 517s assert (median ([true false NaN], 1), [1 0 NaN]); 517s assert (median ([true false NaN], 2), NaN); 517s assert (median ([true false NaN], 2, "omitnan"), 0.5); 517s assert (median ([true false NaN], 2, "omitnan", "native"), double(0.5)); 517s ***** test 517s x = repmat ([1:20;6:25], [5 2 6 3]); 517s assert (size (median (x, [3 2])), [10 1 1 3]); 517s assert (size (median (x, [1 2])), [1 1 6 3]); 517s assert (size (median (x, [1 2 4])), [1 1 6]); 517s assert (size (median (x, [1 4 3])), [1 40]); 517s assert (size (median (x, [1 2 3 4])), [1 1]); 517s ***** assert (median (ones (2,2), 3), ones (2,2)) 517s ***** assert (median (ones (2,2,2), 99), ones (2,2,2)) 517s ***** assert (median (magic (3), 3), magic (3)) 517s ***** assert (median (magic (3), [1 3]), [4, 5, 6]) 517s ***** assert (median (magic (3), [1 99]), [4, 5, 6]) 517s ***** test 517s x = repmat ([2 2.1 2.2 2 NaN; 3 1 2 NaN 5; 1 1.1 1.4 5 3], [1, 1, 4]); 517s assert (median (x, [3 2]), [NaN NaN 1.4]'); 517s assert (median (x, [3 2], "omitnan"), [2.05 2.5 1.4]'); 517s assert (median (x, [1 3]), [2 1.1 2 NaN NaN]); 517s assert (median (x, [1 3], "omitnan"), [2 1.1 2 3.5 4]); 517s ***** assert (median (NaN), NaN) 517s ***** assert (median (NaN, "omitnan"), NaN) 517s ***** assert (median (NaN (2)), [NaN NaN]) 517s ***** assert (median (NaN (2), "omitnan"), [NaN NaN]) 517s ***** assert (median ([1 NaN 3]), NaN) 517s ***** assert (median ([1 NaN 3], 1), [1 NaN 3]) 517s ***** assert (median ([1 NaN 3], 2), NaN) 517s ***** assert (median ([1 NaN 3]'), NaN) 517s ***** assert (median ([1 NaN 3]', 1), NaN) 517s ***** assert (median ([1 NaN 3]', 2), [1; NaN; 3]) 517s ***** assert (median ([1 NaN 3], "omitnan"), 2) 517s ***** assert (median ([1 NaN 3]', "omitnan"), 2) 517s ***** assert (median ([1 NaN 3], 1, "omitnan"), [1 NaN 3]) 517s ***** assert (median ([1 NaN 3], 2, "omitnan"), 2) 517s ***** assert (median ([1 NaN 3]', 1, "omitnan"), 2) 517s ***** assert (median ([1 NaN 3]', 2, "omitnan"), [1; NaN; 3]) 517s ***** assert (median ([1 2 NaN 3]), NaN) 517s ***** assert (median ([1 2 NaN 3], "omitnan"), 2) 517s ***** assert (median ([1,2,NaN;4,5,6;NaN,8,9]), [NaN, 5, NaN]) 517s ***** assert <*64011> (median ([1,2,NaN;4,5,6;NaN,8,9], "omitnan"), [2.5, 5, 7.5], eps) 517s ***** assert (median ([1 2 ; NaN 4]), [NaN 3]) 517s ***** assert (median ([1 2 ; NaN 4], "omitnan"), [1 3]) 517s ***** assert (median ([1 2 ; NaN 4], 1, "omitnan"), [1 3]) 517s ***** assert (median ([1 2 ; NaN 4], 2, "omitnan"), [1.5; 4], eps) 517s ***** assert (median ([1 2 ; NaN 4], 3, "omitnan"), [1 2 ; NaN 4]) 517s ***** assert (median ([NaN 2 ; NaN 4]), [NaN 3]) 517s ***** assert (median ([NaN 2 ; NaN 4], "omitnan"), [NaN 3]) 517s ***** assert (median (ones (1, 0, 3)), NaN (1, 1, 3)) 517s ***** assert <*65405> (median ([NaN NaN], 1, "omitnan"), [NaN NaN]) 517s ***** assert <*65405> (median ([NaN NaN], 2, "omitnan"), NaN) 517s ***** assert <*65405> (median ([NaN NaN]', 1, "omitnan"), NaN) 517s ***** assert <*65405> (median ([NaN NaN]', 2, "omitnan"), [NaN; NaN]) 517s ***** assert <*65405> (median ([NaN NaN], "omitnan"), NaN) 517s ***** assert <*65405> (median ([NaN NaN]', "omitnan"), NaN) 517s ***** assert <*65405> (median (NaN(1,9), 1, "omitnan"), NaN(1,9)) 517s ***** assert <*65405> (median (NaN(1,9), 2, "omitnan"), NaN) 517s ***** assert <*65405> (median (NaN(1,9), 3, "omitnan"), NaN(1,9)) 517s ***** assert <*65405> (median (NaN(9,1), 1, "omitnan"), NaN) 517s ***** assert <*65405> (median (NaN(9,1), 2, "omitnan"), NaN(9,1)) 517s ***** assert <*65405> (median (NaN(9,1), 3, "omitnan"), NaN(9,1)) 517s ***** assert <*65405> (median (NaN(9,2), 1, "omitnan"), NaN(1,2)) 517s ***** assert <*65405> (median (NaN(9,2), 2, "omitnan"), NaN(9,1)) 517s ***** assert <*65405> (median (NaN(9,2), "omitnan"), NaN(1,2)) 517s ***** assert (median (NaN("single")), NaN("single")) 517s ***** assert (median (NaN("single"), "omitnan"), NaN("single")) 517s ***** assert (median (NaN("single"), "double"), NaN("double")) 517s ***** assert (median (single([1 2 ; NaN 4])), single([NaN 3])) 517s ***** assert (median (single([1 2 ; NaN 4]), "double"), double([NaN 3])) 517s ***** assert (median (single([1 2 ; NaN 4]), "omitnan"), single([1 3])) 517s ***** assert (median (single([1 2 ; NaN 4]), "omitnan", "double"), double([1 3])) 517s ***** assert (median (single([NaN 2 ; NaN 4]), "double"), double([NaN 3])) 517s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan"), single([NaN 3])) 517s ***** assert (median (single([NaN 2 ; NaN 4]), "omitnan", "double"), double([NaN 3])) 517s ***** test <*64011> 517s x = [magic(3), magic(3)]; 517s x([3, 7, 11, 12, 16, 17]) = NaN; 517s ynan = [NaN, 5, NaN, NaN, 5, NaN]; 517s yomitnan = [5.5, 5, 4.5, 8, 5, 2]; 517s assert (median (x), ynan); 517s assert (median (x, "omitnan"), yomitnan, eps); 517s assert (median (cat (3, x, x)), cat (3, ynan, ynan)); 517s assert (median (cat (3, x, x), "omitnan"), cat (3, yomitnan, yomitnan), eps); 517s ***** assert (median (Inf), Inf) 517s ***** assert (median (-Inf), -Inf) 517s ***** assert (median ([-Inf Inf]), NaN) 517s ***** assert (median ([3 Inf]), Inf) 517s ***** assert (median ([3 4 Inf]), 4) 517s ***** assert (median ([Inf 3 4]), 4) 517s ***** assert (median ([Inf 3 Inf]), Inf) 517s ***** assert (median ([1, 2, Inf]), 2) 517s ***** assert (median ([1, 2, Inf, Inf]), Inf) 517s ***** assert (median ([1, -Inf, Inf, Inf]), Inf) 517s ***** assert (median ([-Inf, -Inf, Inf, Inf]), NaN) 517s ***** assert (median([-Inf, Inf, Inf, Inf]), Inf) 517s ***** assert (median([-Inf, -Inf, -Inf, Inf]), -Inf) 517s ***** assert (median([-Inf, -Inf, -Inf, 2]), -Inf) 517s ***** assert (median([-Inf, -Inf, 1, 2]), -Inf) 517s ***** assert (median ([]), NaN) 517s ***** assert (median (ones(1,0)), NaN) 517s ***** assert (median (ones(0,1)), NaN) 517s ***** assert (median ([], 1), NaN(1,0)) 517s ***** assert (median ([], 2), NaN(0,1)) 517s ***** assert (median ([], 3), NaN(0,0)) 517s ***** assert (median (ones(1,0), 1), NaN(1,0)) 517s ***** assert (median (ones(1,0), 2), NaN(1,1)) 517s ***** assert (median (ones(1,0), 3), NaN(1,0)) 517s ***** assert (median (ones(0,1), 1), NaN(1,1)) 517s ***** assert (median (ones(0,1), 2), NaN(0,1)) 517s ***** assert (median (ones(0,1), 3), NaN(0,1)) 517s ***** assert (median (ones(0,1,0,1), 1), NaN(1,1,0)) 517s ***** assert (median (ones(0,1,0,1), 2), NaN(0,1,0)) 517s ***** assert (median (ones(0,1,0,1), 3), NaN(0,1,1)) 517s ***** assert (median (ones(0,1,0,1), 4), NaN(0,1,0)) 517s ***** assert (median([1 3 3i 2 1i]), 2) 517s ***** assert (median([1 2 4i; 3 2i 4]), [2, 1+1i, 2+2i]) 517s ***** shared a, b, x, y 517s old_state = rand ("state"); 517s restore_state = onCleanup (@() rand ("state", old_state)); 517s rand ("state", 2); 517s a = rand (2,3,4,5); 517s b = rand (3,4,6,5); 517s x = sort (a, 4); 517s y = sort (b, 3); 517s ***** assert <*35679> (median (a, 4), x(:, :, :, 3)) 517s ***** assert <*35679> (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) 517s ***** shared ## Clear shared to prevent variable echo for any later test failures 517s ***** test 517s x = ones(15,1,4); 517s x([13,15],1,:) = NaN; 517s assert (median (x, 1, "omitnan"), ones (1,1,4)) 517s ***** assert (median ([true, false]), true) 517s ***** assert (median (logical ([])), false) 517s ***** assert (median (uint8 ([1, 3])), uint8 (2)) 517s ***** assert (median (uint8 ([])), uint8 (NaN)) 517s ***** assert (median (uint8 ([NaN 10])), uint8 (5)) 517s ***** assert (median (int8 ([1, 3, 4])), int8 (3)) 517s ***** assert (median (int8 ([])), int8 (NaN)) 517s ***** assert (median (single ([1, 3, 4])), single (3)) 517s ***** assert (median (single ([1, 3, NaN])), single (NaN)) 517s ***** assert <54567> (median (uint8 ([253, 255])), uint8 (254)) 517s ***** assert <54567> (median (uint8 ([253, 254])), uint8 (254)) 517s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9])), ... 517s int8 ([64 65 65 67])) 517s ***** assert <54567> (median (int8 ([127, 126, 125, 124; 1 3 5 9]), 2), ... 517s int8 ([126; 4])) 517s ***** assert <54567> (median (int64 ([intmax("int64"), intmax("int64")-2])), ... 517s intmax ("int64") - 1) 517s ***** assert <54567> (median ( ... 517s int64 ([intmax("int64"), intmax("int64")-2; 1 2]), 2), ... 517s int64([intmax("int64") - 1; 2])) 517s ***** assert <54567> (median (uint64 ([intmax("uint64"), intmax("uint64")-2])), ... 517s intmax ("uint64") - 1) 517s ***** assert <54567> (median ( ... 517s uint64 ([intmax("uint64"), intmax("uint64")-2; 1 2]), 2), ... 517s uint64([intmax("uint64") - 1; 2])) 517s ***** assert <54567> (median (... 517s [intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')]), ... 517s int8(-1)) 517s ***** assert <54567> (median ([int8([1 2 3 4]); ... 517s intmin('int8') intmin('int8')+5 intmax('int8')-5 intmax('int8')], 2), ... 517s int8([3;-1])) 517s ***** assert <54567> (median (... 517s [intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')]), ... 517s int64(-1)) 517s ***** assert <54567> (median ([int64([1 2 3 4]); ... 517s intmin('int64') intmin('int64')+5 intmax('int64')-5 intmax('int64')], 2), ... 517s int64([3;-1])) 517s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2]), ... 517s intmax("uint64")-1) 517s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "default"), ... 517s double(intmax("uint64")-1)) 517s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "double"), ... 517s double(intmax("uint64")-1)) 517s ***** assert <54567> (median ([intmax("uint64"), intmax("uint64")-2], "native"), ... 517s intmax("uint64")-1) 517s ***** assert (median ([1 2 3], "aLL"), 2) 517s ***** assert (median ([1 2 3], "OmitNan"), 2) 517s ***** assert (median ([1 2 3], "DOUBle"), 2) 517s ***** error median () 517s ***** error median (1, 2, 3) 517s ***** error median (1, 2, 3, 4) 517s ***** error median (1, "all", 3) 518s ***** error median (1, "b") 518s ***** error median (1, 1, "foo") 518s ***** error <'all' cannot be used with> median (1, 3, "all") 518s ***** error <'all' cannot be used with> median (1, [2 3], "all") 518s ***** error median ({1:5}) 518s ***** error median ("char") 518s ***** error median(1, "double", "native") 518s ***** error median (1, ones (2,2)) 518s ***** error median (1, 1.5) 518s ***** error median (1, 0) 518s ***** error median ([1 2 3], [-1 1]) 518s ***** error median(1, [1 2 2]) 518s 159 tests, 159 passed, 0 known failure, 0 skipped 518s [inst/shadow9/std.m] 518s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/shadow9/std.m 518s ***** assert (std (13), 0) 518s ***** assert (std (single (13)), single (0)) 518s ***** assert (std ([1,2,3]), 1) 518s ***** assert (std ([1,2,3], 1), sqrt (2/3), eps) 518s ***** assert (std ([1,2,3], [], 1), [0,0,0]) 518s ***** assert (std ([1,2,3], [], 3), [0,0,0]) 518s ***** assert (std (5, 99), 0) 518s ***** assert (std (5, 99, 1), 0) 518s ***** assert (std (5, 99, 2), 0) 518s ***** assert (std ([5 3], [99 99], 2), 1) 518s ***** assert (std ([1:7], [1:7]), sqrt (3)) 518s ***** assert (std ([eye(3)], [1:3]), sqrt ([5/36, 2/9, 1/4]), eps) 518s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2,2))]) 518s ***** assert (std ([1 2; 3 4], 0, 'all'), std ([1:4])) 518s ***** assert (std (reshape ([1:8], 2, 2, 2), 0, [1 3]), sqrt ([17/3 17/3]), eps) 518s ***** assert (std ([1 2 3;1 2 3], [], [1 2]), sqrt (0.8), eps) 518s ***** test 518s x = [-10:10]; 518s y = [x;x+5;x-5]; 518s assert (std (x), sqrt (38.5), 1e-14); 518s assert (std (y, [], 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 518s assert (std (y, 0, 2), sqrt ([38.5; 38.5; 38.5]), 1e-14); 518s assert (std (y, 1, 2), ones (3,1) * sqrt (36.66666666666666), 1e-14); 518s assert (std (y, "all"), sqrt (54.19354838709678), 1e-14); 518s y(2,4) = NaN; 518s assert (std (y, "all"), NaN); 518s assert (std (y, "all", "includenan"), NaN); 518s assert (std (y, "all", "omitnan"), sqrt (55.01533580116342), 1e-14); 518s assert (std (y, 0, 2, "includenan"), sqrt ([38.5; NaN; 38.5]), 1e-14); 518s assert (std (y, [], 2), sqrt ([38.5; NaN; 38.5]), 1e-14); 518s assert (std (y, [], 2, "omitnan"), ... 518s sqrt ([38.5; 37.81842105263158; 38.5]), 1e-14); 518s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan"), 1, eps) 518s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan"), 1, eps) 518s ***** assert (std (magic(3), [1 NaN 3], "omitnan"), sqrt(3)*[1 2 1], eps) 518s ***** assert (std ([4 NaN 6], [1 2 1], "omitnan", "all"), 1, eps) 518s ***** assert (std ([4 NaN 6], [1 2 1], "all", "omitnan"), 1, eps) 518s ***** assert (std ([4 5 6], [1 NaN 1], "omitnan", "all"), 1, eps) 518s ***** assert (std ([4 NaN 6], [1 2 1], 2, "omitnan"), 1, eps) 518s ***** assert (std ([4 5 6], [1 NaN 1], 2, "omitnan"), 1, eps) 518s ***** assert (std (magic(3), [1 NaN 3], 1, "omitnan"), sqrt(3)*[1 2 1], eps) 518s ***** assert (std (magic(3), [1 NaN 3], 2, "omitnan"), sqrt(3)*[0.5;1;0.5], eps) 518s ***** assert (std (4*[4 5; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[1;1;1], eps) 518s ***** assert (std ([4 NaN; 6 7; 8 9], [1 1 3], 1, 'omitnan'), [1.6 sqrt(3)/2], eps) 518s ***** assert (std (4*[4 NaN; 6 7; 8 9], [1 3], 2, 'omitnan'), sqrt(3)*[0;1;1], eps) 518s ***** assert (std (3*reshape(1:18, [3 3 2]), [1 2 3], 1, 'omitnan'), ... 518s sqrt(5)*ones(1,3,2), eps) 518s ***** assert (std (reshape(1:18, [3 3 2]), [1 2 3], 2, 'omitnan'), ... 518s sqrt(5)*ones(3,1,2), eps) 518s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 2], 'omitnan'), ... 518s sqrt(60)*ones(1,1,2),eps) 518s ***** assert (std (3*reshape(1:18, [3 3 2]), ones (3,3,2), [1 4], 'omitnan'), ... 518s sqrt(6)*ones(1,3,2),eps) 518s ***** assert (std (6*reshape(1:18, [3 3 2]), ones (3,3,2), [1:3], 'omitnan'), ... 518s sqrt(969),eps) 518s ***** test 518s x = reshape(1:18, [3 3 2]); 518s x([2, 14]) = NaN; 518s w = ones (3,3,2); 518s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 518s ***** test 518s x = reshape(1:18, [3 3 2]); 518s w = ones (3,3,2); 518s w([2, 14]) = NaN; 518s assert (std (16*x, w, [1:3], 'omitnan'), sqrt(6519), eps); 518s ***** assert (std ([1 2 3], "aLl"), 1); 518s ***** assert (std ([1 2 3], "OmitNan"), 1); 518s ***** assert (std ([1 2 3], "IncludeNan"), 1); 518s ***** test 518s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 518s assert (size (std (x, 0, [3 2])), [10, 1, 1, 3]); 518s assert (size (std (x, 1, [1 2])), [1, 1, 6, 3]); 518s assert (size (std (x, [], [1 2 4])), [1, 1, 6]); 518s assert (size (std (x, 0, [1 4 3])), [1, 40]); 518s assert (size (std (x, [], [1 2 3 4])), [1, 1]); 518s ***** assert (std (3*magic(3)), sqrt([63 144 63]), eps) 518s ***** assert (std (3*magic(3), 'omitnan'), sqrt([63 144 63]), eps) 518s ***** assert (std (3*magic(3), 1), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), 1, 'omitnan'), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), ones(1,3), 1), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), ones(1,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 518s ***** assert (std (2*magic(3), [1 1 NaN], 1, 'omitnan'), [5 4 1], eps) 518s ***** assert (std (3*magic(3), ones(3,3)), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), ones(3,3), 'omitnan'), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 'omitnan'), ... 518s sqrt([42 36 42]), eps) 518s ***** assert (std (3*magic(3), ones(3,3), 1), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), ones(3,3), 1, 'omitnan'), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1], 1, 'omitnan'), ... 518s sqrt([42 36 42]), eps) 518s ***** assert (std (3*magic(3), ones(3,3), [1 4]), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), ones(3,3), [1 4], 'omitnan'), sqrt([42 96 42]), eps) 518s ***** assert (std (3*magic(3), [1 1 1; 1 1 1; 1 NaN 1],[1 4],'omitnan'), ... 518s sqrt([42 36 42]), eps) 518s ***** test 518s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 518s v = repmat (sqrt (33.38912133891213), [10, 1, 1, 3]); 518s assert (std (x, 0, [3, 2]), v, 1e-14); 518s v = repmat (sqrt (33.250), [10, 1, 1, 3]); 518s assert (std (x, 1, [3, 2]), v, 1e-14); 518s x(2,5,6,3) = NaN; 518s v(2,1,1,3) = NaN; 518s assert (std (x, 1, [3, 2]), v, 1e-14); 518s v = repmat (sqrt (33.38912133891213), [10 1 1 3]); 518s v(2,1,1,3) = NaN; 518s assert (std (x, [], [3, 2]), v, 1e-14); 518s v(2,1,1,3) = sqrt (33.40177912169048); 518s assert (std (x, [], [3, 2], "omitnan"), v, 1e-14); 518s ***** assert (std (ones (2,2,2), [1:2], 3), [(zeros (2, 2))]) 518s ***** assert (std (magic (3), [1:9], "all"), 2.581988897471611, 1e-14) 518s ***** assert (std (ones (2,2), [], 3), zeros (2,2)) 518s ***** assert (std (ones (2,2,2), [], 99), zeros (2,2,2)) 518s ***** assert (std (magic (3), [], 3), zeros (3,3)) 518s ***** assert (std (magic (3), [], 1), sqrt ([7, 16, 7])) 518s ***** assert (std (magic (3), [], [1 3]), sqrt ([7, 16, 7])) 518s ***** assert (std (magic (3), [], [1 99]), sqrt ([7, 16, 7])) 518s ***** assert (std ([]), NaN) 518s ***** assert (class (var (single ([]))), "single") 518s ***** assert (std ([],[],1), NaN(1,0)) 518s ***** assert (std ([],[],2), NaN(0,1)) 518s ***** assert (std ([],[],3), []) 518s ***** assert (class (var (single ([]), [], 1)), "single") 518s ***** assert (std (ones (1,0)), NaN) 518s ***** assert (std (ones (1,0), [], 1), NaN(1,0)) 518s ***** assert (std (ones (1,0), [], 2), NaN) 518s ***** assert (std (ones (1,0), [], 3), NaN(1,0)) 518s ***** assert (class (var (ones (1, 0, "single"), [], 1)), "single") 518s ***** assert (std (ones (0,1)), NaN) 518s ***** assert (std (ones (0,1), [], 1), NaN) 518s ***** assert (std (ones (0,1), [], 2), NaN(0,1)) 518s ***** assert (std (ones (0,1), [], 3), NaN(0,1)) 518s ***** assert (std (ones (1,3,0,2)), NaN(1,1,0,2)) 518s ***** assert (std (ones (1,3,0,2), [], 1), NaN(1,3,0,2)) 518s ***** assert (std (ones (1,3,0,2), [], 2), NaN(1,1,0,2)) 518s ***** assert (std (ones (1,3,0,2), [], 3), NaN(1,3,1,2)) 518s ***** assert (std (ones (1,3,0,2), [], 4), NaN(1,3,0)) 518s ***** test 518s [~, m] = std ([]); 518s assert (m, NaN); 518s ***** test <*62395> 518s [~, m] = std (13); 518s assert (m, 13); 518s [~, m] = std (single(13)); 518s assert (m, single(13)); 518s [~, m] = std ([1, 2, 3; 3 2 1], []); 518s assert (m, [2 2 2]); 518s [~, m] = std ([1, 2, 3; 3 2 1], [], 1); 518s assert (m, [2 2 2]); 518s [~, m] = std ([1, 2, 3; 3 2 1], [], 2); 518s assert (m, [2 2]'); 518s [~, m] = std ([1, 2, 3; 3 2 1], [], 3); 518s assert (m, [1 2 3; 3 2 1]); 518s ***** test <*62395> 518s [~, m] = std (5,99); 518s assert (m, 5); 518s [~, m] = std ([1:7], [1:7]); 518s assert (m, 5); 518s [~, m] = std ([eye(3)], [1:3]); 518s assert (m, [1/6, 1/3, 0.5], eps); 518s [~, m] = std (ones (2,2,2), [1:2], 3); 518s assert (m, ones (2,2)); 518s [~, m] = std ([1 2; 3 4], 0, 'all'); 518s assert (m, 2.5, eps); 518s [~, m] = std (reshape ([1:8], 2, 2, 2), 0, [1 3]); 518s assert (m, [3.5, 5.5], eps); 518s ***** test 518s [v, m] = std (4 * eye (2), [1, 3]); 518s assert (v, sqrt ([3, 3]), 1e-14); 518s assert (m, [1, 3]); 518s ***** test <*62395> 518s [~, m] = std ([]); 518s assert (m, NaN); 518s ***** test 518s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 518s [~, m] = std (x, 0, [3 2]); 518s assert (m, mean (x, [3 2])); 518s [~, m] = std (x, 0, [1 2]); 518s assert (m, mean (x, [1 2])); 518s [~, m] = std (x, 0, [1 3 4]); 518s assert (m, mean (x, [1 3 4])); 518s ***** test 518s x = repmat ([1:20;6:25], [5, 2, 6, 3]); 518s x(2,5,6,3) = NaN; 518s [~, m] = std (x, 0, [3 2], "omitnan"); 518s assert (m, mean (x, [3 2], "omitnan")); 518s ***** test <*63203> 518s [v, m] = std (Inf); 518s assert (v, NaN); 518s assert (m, Inf); 518s ***** test <*63203> 518s [v, m] = std (NaN); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3]); 518s assert (v, NaN); 518s assert (m, Inf); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3]'); 518s assert (v, NaN); 518s assert (m, Inf); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3]); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3]'); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3], [], 1); 518s assert (v, [0, NaN, 0]); 518s assert (m, [1, Inf, 3]); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3], [], 2); 518s assert (v, NaN); 518s assert (m, Inf); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3], [], 3); 518s assert (v, [0, NaN, 0]); 518s assert (m, [1, Inf, 3]); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3], [], 1); 518s assert (v, [0, NaN, 0]); 518s assert (m, [1, NaN, 3]); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3], [], 2); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3], [], 3); 518s assert (v, [0, NaN, 0]); 518s assert (m, [1, NaN, 3]); 518s ***** test <*63203> 518s [v, m] = std ([1, 2, 3; 3, Inf, 5]); 518s assert (v, sqrt ([2, NaN, 2])); 518s assert (m, [2, Inf, 4]); 518s ***** test <*63203> 518s [v, m] = std ([1, Inf, 3; 3, Inf, 5]); 518s assert (v, sqrt ([2, NaN, 2])); 518s assert (m, [2, Inf, 4]); 518s ***** test <*63203> 518s [v, m] = std ([1, 2, 3; 3, NaN, 5]); 518s assert (v, sqrt ([2, NaN, 2])); 518s assert (m, [2, NaN, 4]); 518s ***** test <*63203> 518s [v, m] = std ([1, NaN, 3; 3, NaN, 5]); 518s assert (v, sqrt ([2, NaN, 2])); 518s assert (m, [2, NaN, 4]); 518s ***** test <*63203> 518s [v, m] = std ([Inf, 2, NaN]); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([Inf, 2, NaN]'); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([NaN, 2, Inf]); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([NaN, 2, Inf]'); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([Inf, 2, NaN], [], 1); 518s assert (v, [NaN, 0, NaN]); 518s assert (m, [Inf, 2, NaN]); 518s ***** test <*63203> 518s [v, m] = std ([Inf, 2, NaN], [], 2); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([NaN, 2, Inf], [], 1); 518s assert (v, [NaN, 0, NaN]); 518s assert (m, [NaN, 2, Inf]); 518s ***** test <*63203> 518s [v, m] = std ([NaN, 2, Inf], [], 2); 518s assert (v, NaN); 518s assert (m, NaN); 518s ***** test <*63203> 518s [v, m] = std ([1, 3, NaN; 3, 5, Inf]); 518s assert (v, sqrt ([2, 2, NaN])); 518s assert (m, [2, 4, NaN]); 518s ***** test <*63203> 518s [v, m] = std ([1, 3, Inf; 3, 5, NaN]); 518s assert (v, sqrt ([2, 2, NaN])); 518s assert (m, [2, 4, NaN]); 518s ***** test <*63291> 518s [v, m] = std (2 * eye (2)); 518s assert (v, sqrt ([2, 2])); 518s assert (m, [1, 1]); 518s ***** test <*63291> 518s [v, m] = std (4 * eye (2), [1, 3]); 518s assert (v, sqrt ([3, 3])); 518s assert (m, [1, 3]); 518s ***** test <*63291> 518s [v, m] = std (sparse (2 * eye (2))); 518s assert (full (v), sqrt ([2, 2])); 518s assert (full (m), [1, 1]); 518s ***** test <*63291> 518s [v, m] = std (sparse (4 * eye (2)), [1, 3]); 518s assert (full (v), sqrt ([3, 3])); 518s assert (full (m), [1, 3]); 518s ***** test <*63291> 518s [v, m] = std (sparse (eye (2))); 518s assert (issparse (v)); 518s assert (issparse (m)); 518s ***** test <*63291> 518s [v, m] = std (sparse (eye (2)), [1, 3]); 518s assert (issparse (v)); 518s assert (issparse (m)); 518s ***** error std () 518s ***** error std (1, 2, "omitnan", 3) 518s ***** error std (1, 2, 3, 4) 519s ***** error std (1, 2, 3, 4, 5) 519s ***** error std (1, "foo") 519s ***** error std (1, [], "foo") 519s ***** error std ([1 2 3], 2) 519s ***** error std ([1 2], 2, "all") 519s ***** error std ([1 2],0.5, "all") 519s ***** error std (1, -1) 519s ***** error std (1, [1 -1]) 519s ***** error ... 519s std ([1 2 3], [1 -1 0]) 519s ***** error std ({1:5}) 519s ***** error std ("char") 519s ***** error std (['A'; 'B']) 519s ***** error std (1, [], ones (2,2)) 519s ***** error std (1, 0, 1.5) 519s ***** error std (1, [], 0) 519s ***** error std (1, [], 1.5) 519s ***** error std ([1 2 3], [], [-1 1]) 519s ***** error ... 519s std (repmat ([1:20;6:25], [5 2 6 3]), 0, [1 2 2 2]) 519s ***** error ... 519s std ([1 2], eye (2)) 519s ***** error ... 519s std ([1 2 3 4], [1 2; 3 4]) 519s ***** error ... 519s std ([1 2 3 4], [1 2; 3 4], 1) 519s ***** error ... 519s std ([1 2 3 4], [1 2; 3 4], [2 3]) 519s ***** error ... 519s std (ones (2, 2), [1 2], [1 2]) 519s ***** error ... 519s std ([1 2 3 4; 5 6 7 8], [1 2 1 2 1; 1 2 1 2 1], 1) 519s ***** error ... 519s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), [2 3]) 519s ***** error std ([1 2 3; 2 3 4], [1 3 4]) 519s ***** error std ([1 2], [1 2 3]) 519s ***** error std (1, [1 2]) 519s ***** error std ([1 2 3; 2 3 4], [1 3 4], 1) 519s ***** error std ([1 2 3; 2 3 4], [1 3], 2) 519s ***** error std ([1 2], [1 2], 1) 519s ***** error <'all' flag cannot be used with DIM or VECDIM options> ... 519s std (1, [], 1, "all") 519s ***** error ... 519s std ([1 2 3; 2 3 4], [1 3], "all") 519s ***** error ... 519s std (repmat ([1:20;6:25], [5 2 6 3]), repmat ([1:20;6:25], [5 2 3]), "all") 519s 162 tests, 162 passed, 0 known failure, 0 skipped 519s [inst/hotelling_t2test.m] 519s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hotelling_t2test.m 519s ***** error hotelling_t2test (); 519s ***** error ... 519s hotelling_t2test (1); 519s ***** error ... 519s hotelling_t2test (ones(2,2,2)); 519s ***** error ... 519s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 519s ***** error ... 519s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 519s ***** error ... 519s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 519s ***** error ... 519s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 519s ***** error ... 519s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 519s ***** error ... 519s hotelling_t2test (ones(20,1), [0, 0]); 519s ***** error ... 519s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 519s ***** error ... 519s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 519s ***** test 519s randn ("seed", 1); 519s x = randn (50000, 5); 519s [h, pval, stats] = hotelling_t2test (x); 519s assert (h, 0); 519s assert (stats.df1, 5); 519s assert (stats.df2, 49995); 519s ***** test 519s randn ("seed", 1); 519s x = randn (50000, 5); 519s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 519s assert (h, 1); 519s assert (stats.df1, 5); 519s assert (stats.df2, 49995); 519s 13 tests, 13 passed, 0 known failure, 0 skipped 519s [inst/Classification/ClassificationPartitionedModel.m] 519s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationPartitionedModel.m 519s ***** demo 519s 519s load fisheriris 519s x = meas; 519s y = species; 519s 519s ## Create a KNN classifier model 519s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 519s 519s ## Create a partition for 5-fold cross-validation 519s partition = cvpartition (y, "KFold", 5); 519s 519s ## Create the ClassificationPartitionedModel object 519s cvModel = crossval (obj, 'cvPartition', partition) 519s ***** demo 519s 519s load fisheriris 519s x = meas; 519s y = species; 519s 519s ## Create a KNN classifier model 519s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 519s 519s ## Create the ClassificationPartitionedModel object 519s cvModel = crossval (obj); 519s 519s ## Predict the class labels for the observations not used for training 519s [label, score, cost] = kfoldPredict (cvModel); 519s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 519s sum (strcmp (label, y)) / numel (y) *100, ... 519s sum (strcmp (label, y)), numel (y)) 519s ***** test 519s load fisheriris 519s a = fitcdiscr (meas, species, "gamma", 0.3); 519s cvModel = crossval (a, "KFold", 5); 519s assert (class (cvModel), "ClassificationPartitionedModel"); 519s assert (cvModel.NumObservations, 150); 519s assert (numel (cvModel.Trained), 5); 519s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 519s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 519s assert (cvModel.KFold, 5); 519s ***** test 519s load fisheriris 519s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 519s cvModel = crossval (a, "HoldOut", 0.3); 519s assert (class (cvModel), "ClassificationPartitionedModel"); 519s assert ({cvModel.X, cvModel.Y}, {meas, species}); 519s assert (cvModel.NumObservations, 150); 519s assert (numel (cvModel.Trained), 1); 519s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 519s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 519s ***** test 519s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 519s y = ["a"; "a"; "b"; "b"]; 519s a = fitcgam (x, y, "Interactions", "all"); 519s cvModel = crossval (a, "KFold", 5); 519s assert (class (cvModel), "ClassificationPartitionedModel"); 519s assert (cvModel.NumObservations, 4); 519s assert (numel (cvModel.Trained), 5); 519s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 519s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 519s assert (cvModel.KFold, 5); 537s ***** test 537s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 537s y = ["a"; "a"; "b"; "b"]; 537s a = fitcgam (x, y); 537s cvModel = crossval (a, "LeaveOut", "on"); 537s assert (class (cvModel), "ClassificationPartitionedModel"); 537s assert ({cvModel.X, cvModel.Y}, {x, y}); 537s assert (cvModel.NumObservations, 4); 537s assert (numel (cvModel.Trained), 4); 537s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 537s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = ["a"; "a"; "b"; "b"]; 542s a = fitcknn (x, y); 542s partition = cvpartition (y, "KFold", 5); 542s cvModel = ClassificationPartitionedModel (a, partition); 542s assert (class (cvModel), "ClassificationPartitionedModel"); 542s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 542s assert (cvModel.NumObservations, 4); 542s assert (cvModel.ModelParameters.NumNeighbors, 1); 542s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 542s assert (cvModel.ModelParameters.Distance, "euclidean"); 542s assert (! cvModel.ModelParameters.Standardize); 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = ["a"; "a"; "b"; "b"]; 542s a = fitcknn (x, y, "NSMethod", "exhaustive"); 542s partition = cvpartition (y, "HoldOut", 0.2); 542s cvModel = ClassificationPartitionedModel (a, partition); 542s assert (class (cvModel), "ClassificationPartitionedModel"); 542s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 542s assert ({cvModel.X, cvModel.Y}, {x, y}); 542s assert (cvModel.NumObservations, 4); 542s assert (cvModel.ModelParameters.NumNeighbors, 1); 542s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 542s assert (cvModel.ModelParameters.Distance, "euclidean"); 542s assert (! cvModel.ModelParameters.Standardize); 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = ["a"; "a"; "b"; "b"]; 542s k = 3; 542s a = fitcknn (x, y, "NumNeighbors" ,k); 542s partition = cvpartition (y, "LeaveOut"); 542s cvModel = ClassificationPartitionedModel (a, partition); 542s assert (class (cvModel), "ClassificationPartitionedModel"); 542s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 542s assert ({cvModel.X, cvModel.Y}, {x, y}); 542s assert (cvModel.NumObservations, 4); 542s assert (cvModel.ModelParameters.NumNeighbors, k); 542s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 542s assert (cvModel.ModelParameters.Distance, "euclidean"); 542s assert (! cvModel.ModelParameters.Standardize); 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = {"a"; "a"; "b"; "b"}; 542s a = fitcnet (x, y, "IterationLimit", 50); 542s cvModel = crossval (a, "KFold", 5); 542s assert (class (cvModel), "ClassificationPartitionedModel"); 542s assert (cvModel.NumObservations, 4); 542s assert (numel (cvModel.Trained), 5); 542s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 542s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 542s assert (cvModel.KFold, 5); 542s ***** test 542s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 542s y = {"a"; "a"; "b"; "b"}; 542s a = fitcnet (x, y, "LayerSizes", [5, 3]); 542s cvModel = crossval (a, "LeaveOut", "on"); 542s assert (class (cvModel), "ClassificationPartitionedModel"); 542s assert ({cvModel.X, cvModel.Y}, {x, y}); 542s assert (cvModel.NumObservations, 4); 542s assert (numel (cvModel.Trained), 4); 542s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 542s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 542s ***** test 542s load fisheriris 542s inds = ! strcmp (species, 'setosa'); 542s x = meas(inds, 3:4); 542s y = grp2idx (species(inds)); 542s SVMModel = fitcsvm (x,y); 542s CVMdl = crossval (SVMModel, "KFold", 5); 542s assert (class (CVMdl), "ClassificationPartitionedModel") 542s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 542s assert (CVMdl.KFold == 5) 542s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 542s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 542s ***** test 542s load fisheriris 542s inds = ! strcmp (species, 'setosa'); 542s x = meas(inds, 3:4); 542s y = grp2idx (species(inds)); 542s obj = fitcsvm (x, y); 542s CVMdl = crossval (obj, "HoldOut", 0.2); 542s assert (class (CVMdl), "ClassificationPartitionedModel") 542s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 542s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 542s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 542s ***** test 542s load fisheriris 542s inds = ! strcmp (species, 'setosa'); 542s x = meas(inds, 3:4); 542s y = grp2idx (species(inds)); 542s obj = fitcsvm (x, y); 542s CVMdl = crossval (obj, "LeaveOut", 'on'); 542s assert (class (CVMdl), "ClassificationPartitionedModel") 542s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 542s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 542s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 545s ***** error ... 545s ClassificationPartitionedModel () 545s ***** error ... 545s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 545s ***** error ... 545s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 545s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 545s ***** error ... 545s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 545s ones (4,1)), 'Holdout') 545s ***** test 545s load fisheriris 545s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 545s cvModel = crossval (a, "Kfold", 4); 545s [label, score, cost] = kfoldPredict (cvModel); 545s assert (class(cvModel), "ClassificationPartitionedModel"); 545s assert ({cvModel.X, cvModel.Y}, {meas, species}); 545s assert (cvModel.NumObservations, 150); 545s ***** # assert (label, {"b"; "b"; "a"; "a"}); 545s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 545s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 545s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 545s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 545s ***** test 545s x = ones(4, 11); 545s y = {"a"; "a"; "b"; "b"}; 545s k = 3; 545s a = fitcknn (x, y, "NumNeighbors", k); 545s partition = cvpartition (y, "LeaveOut"); 545s cvModel = ClassificationPartitionedModel (a, partition); 545s [label, score, cost] = kfoldPredict (cvModel); 545s assert (class(cvModel), "ClassificationPartitionedModel"); 545s assert ({cvModel.X, cvModel.Y}, {x, y}); 545s assert (cvModel.NumObservations, 4); 545s assert (cvModel.ModelParameters.NumNeighbors, k); 545s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 545s assert (cvModel.ModelParameters.Distance, "euclidean"); 545s assert (! cvModel.ModelParameters.Standardize); 545s assert (label, {"b"; "b"; "a"; "a"}); 545s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 545s 0.6667, 0.3333], 1e-4); 545s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 545s 0.3333, 0.6667], 1e-4); 545s ***** error ... 545s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 545s ***** error ... 545s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 545s 20 tests, 20 passed, 0 known failure, 0 skipped 545s [inst/Classification/CompactClassificationSVM.m] 545s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/CompactClassificationSVM.m 545s ***** demo 545s ## Create a support vectors machine classifier and its compact version 545s # and compare their size 545s 545s load fisheriris 545s X = meas; 545s Y = species; 545s 545s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 545s CMdl = crossval (Mdl) 545s ***** error ... 545s CompactClassificationSVM (1) 545s ***** shared x, y, CMdl 545s load fisheriris 545s inds = ! strcmp (species, 'setosa'); 545s x = meas(inds, 3:4); 545s y = grp2idx (species(inds)); 545s ***** test 545s xc = [min(x); mean(x); max(x)]; 545s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 545s CMdl = compact (Mdl); 545s assert (isempty (CMdl.Alpha), true) 545s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 545s [label, score] = predict (CMdl, xc); 545s assert (label, [1; 2; 2]); 545s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 545s assert (score(:,1), -score(:,2), eps) 545s ***** test 545s Mdl = fitcsvm (x, y); 545s CMdl = compact (Mdl); 545s assert (isempty (CMdl.Beta), true) 545s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 545s assert (numel (CMdl.Alpha), 24) 545s assert (CMdl.Bias, -14.415, 1e-3) 545s xc = [min(x); mean(x); max(x)]; 545s label = predict (CMdl, xc); 545s assert (label, [1; 2; 2]); 545s ***** error ... 545s predict (CMdl) 545s ***** error ... 545s predict (CMdl, []) 545s ***** error ... 545s predict (CMdl, 1) 545s ***** test 545s CMdl.ScoreTransform = "a"; 545s ***** error ... 545s [labels, scores] = predict (CMdl, x); 545s ***** test 545s rand ("seed", 1); 545s C = cvpartition (y, 'HoldOut', 0.15); 545s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 545s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 545s CMdl = compact (Mdl); 545s testInds = test (C); 545s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 545s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 545s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 545s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 545s assert (computed_margin, expected_margin, 1e-4); 545s ***** error ... 545s margin (CMdl) 545s ***** error ... 545s margin (CMdl, zeros (2)) 545s ***** error ... 545s margin (CMdl, [], 1) 545s ***** error ... 545s margin (CMdl, 1, 1) 545s ***** error ... 545s margin (CMdl, [1, 2], []) 545s ***** error ... 545s margin (CMdl, [1, 2], [1; 2]) 545s ***** test 545s rand ("seed", 1); 545s C = cvpartition (y, 'HoldOut', 0.15); 545s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 545s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 545s CMdl = compact (Mdl); 545s testInds = test (C); 545s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 545s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 545s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 545s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 545s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 545s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 545s assert (L1, 2.8711, 1e-4); 545s assert (L2, 0.5333, 1e-4); 545s assert (L3, 10.9685, 1e-4); 545s assert (L4, 1.9827, 1e-4); 545s assert (L5, 1.5849, 1e-4); 545s assert (L6, 7.6739, 1e-4); 545s ***** error ... 545s loss (CMdl) 545s ***** error ... 545s loss (CMdl, zeros (2)) 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "LossFun") 545s ***** error ... 545s loss (CMdl, [], zeros (2)) 545s ***** error ... 545s loss (CMdl, 1, zeros (2)) 545s ***** error ... 545s loss (CMdl, [1, 2], []) 545s ***** error ... 545s loss (CMdl, [1, 2], [1; 2]) 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "LossFun", 1) 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "LossFun", "some") 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "Weights", 'a') 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 545s ***** error ... 545s loss (CMdl, [1, 2], 1, "some", "some") 545s 29 tests, 29 passed, 0 known failure, 0 skipped 545s [inst/Classification/ConfusionMatrixChart.m] 545s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ConfusionMatrixChart.m 545s ***** demo 545s ## Create a simple ConfusionMatrixChart Object 545s 545s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 545s NormalizedValues = cm.NormalizedValues 545s ClassLabels = cm.ClassLabels 545s ***** test 545s hf = figure ("visible", "off"); 545s unwind_protect 545s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 545s assert (isa (cm, "ConfusionMatrixChart"), true); 545s unwind_protect_cleanup 545s close (hf); 545s end_unwind_protect 545s 1 test, 1 passed, 0 known failure, 0 skipped 545s [inst/Classification/ClassificationKNN.m] 545s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationKNN.m 545s ***** demo 545s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 545s ## Evaluate some model predictions on new data. 545s 545s load fisheriris 545s x = meas; 545s y = species; 545s xc = [min(x); mean(x); max(x)]; 545s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 545s [label, score, cost] = predict (obj, xc) 545s ***** demo 545s load fisheriris 545s x = meas; 545s y = species; 545s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 545s 545s ## Create a cross-validated model 545s CVMdl = crossval (obj) 545s ***** demo 545s load fisheriris 545s x = meas; 545s y = species; 545s covMatrix = cov (x); 545s 545s ## Fit the k-NN model using the 'mahalanobis' distance 545s ## and the custom covariance matrix 545s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 545s 'Cov', covMatrix); 545s 545s ## Create a partition model using cvpartition 545s Partition = cvpartition (size (x, 1), 'kfold', 12); 545s 545s ## Create cross-validated model using 'cvPartition' name-value argument 545s CVMdl = crossval (obj, 'cvPartition', Partition) 545s 545s ## Access the trained model from first fold of cross-validation 545s CVMdl.Trained{1} 545s ***** demo 545s X = [1, 2; 3, 4; 5, 6]; 545s Y = {'A'; 'B'; 'A'}; 545s model = fitcknn (X, Y); 545s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 545s ## Calculate loss using custom loss function 545s L = loss (model, X, Y, 'LossFun', customLossFun) 545s ***** demo 545s X = [1, 2; 3, 4; 5, 6]; 545s Y = {'A'; 'B'; 'A'}; 545s model = fitcknn (X, Y); 545s ## Calculate loss using 'mincost' loss function 545s L = loss (model, X, Y, 'LossFun', 'mincost') 545s ***** demo 545s X = [1, 2; 3, 4; 5, 6]; 545s Y = ['1'; '2'; '3']; 545s model = fitcknn (X, Y); 545s X_test = [3, 3; 5, 7]; 545s Y_test = ['1'; '2']; 545s ## Specify custom Weights 545s W = [1; 2]; 545s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 545s ***** demo 545s load fisheriris 545s mdl = fitcknn (meas, species); 545s X = mean (meas); 545s Y = {'versicolor'}; 545s m = margin (mdl, X, Y) 545s ***** demo 545s X = [1, 2; 4, 5; 7, 8; 3, 2]; 545s Y = [2; 1; 3; 2]; 545s ## Train the model 545s mdl = fitcknn (X, Y); 545s ## Specify Vars and Labels 545s Vars = 1; 545s Labels = 2; 545s ## Calculate partialDependence 545s [pd, x, y] = partialDependence (mdl, Vars, Labels); 545s ***** demo 545s X = [1, 2; 4, 5; 7, 8; 3, 2]; 545s Y = [2; 1; 3; 2]; 545s ## Train the model 545s mdl = fitcknn (X, Y); 545s ## Specify Vars and Labels 545s Vars = 1; 545s Labels = 1; 545s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 545s ## Calculate partialDependence using queryPoints 545s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 545s queryPoints) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s k = 10; 545s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = ones (4, 11); 545s y = ["a"; "a"; "b"; "b"]; 545s k = 10; 545s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s k = 10; 545s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s k = 10; 545s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s weights = ones (4,1); 545s a = ClassificationKNN (x, y, "Standardize", 1); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.Standardize}, {true}) 545s assert ({a.Sigma}, {std(x, [], 1)}) 545s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s weights = ones (4,1); 545s a = ClassificationKNN (x, y, "Standardize", false); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.Standardize}, {false}) 545s assert ({a.Sigma}, {[]}) 545s assert ({a.Mu}, {[]}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s s = ones (1, 3); 545s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.DistParameter}, {s}) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 545s assert (class (a), "ClassificationKNN"); 545s assert (a.DistParameter, 5) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 545s "NSMethod", "exhaustive"); 545s assert (class (a), "ClassificationKNN"); 545s assert (a.DistParameter, 5) 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 545s assert (class (a), "ClassificationKNN"); 545s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 545s assert ({a.BucketSize}, {20}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y, "IncludeTies", true); 545s assert (class (a), "ClassificationKNN"); 545s assert (a.IncludeTies, true); 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y); 545s assert (class (a), "ClassificationKNN"); 545s assert (a.IncludeTies, false); 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s a = ClassificationKNN (x, y); 545s assert (class (a), "ClassificationKNN") 545s assert (a.Prior, [0.5; 0.5]) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 545s ***** test 545s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 545s y = ["a"; "a"; "b"; "b"]; 545s prior = [0.5; 0.5]; 545s a = ClassificationKNN (x, y, "Prior", "empirical"); 545s assert (class (a), "ClassificationKNN") 545s assert (a.Prior, prior) 545s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 545s assert ({a.BucketSize}, {50}) 546s ***** test 546s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 546s y = ["a"; "a"; "a"; "b"]; 546s prior = [0.75; 0.25]; 546s a = ClassificationKNN (x, y, "Prior", "empirical"); 546s assert (class (a), "ClassificationKNN") 546s assert (a.Prior, prior) 546s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 546s assert ({a.BucketSize}, {50}) 546s ***** test 546s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 546s y = ["a"; "a"; "a"; "b"]; 546s prior = [0.5; 0.5]; 546s a = ClassificationKNN (x, y, "Prior", "uniform"); 546s assert (class (a), "ClassificationKNN") 546s assert (a.Prior, prior) 546s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 546s assert ({a.BucketSize}, {50}) 546s ***** test 546s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 546s y = ["a"; "a"; "b"; "b"]; 546s cost = eye (2); 546s a = ClassificationKNN (x, y, "Cost", cost); 546s assert (class (a), "ClassificationKNN") 546s assert (a.Cost, [1, 0; 0, 1]) 546s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 546s assert ({a.BucketSize}, {50}) 546s ***** test 546s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 546s y = ["a"; "a"; "b"; "b"]; 546s cost = eye (2); 546s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 546s assert (class (a), "ClassificationKNN") 546s assert (a.Cost, [1, 0; 0, 1]) 546s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 546s assert ({a.BucketSize}, {50}) 546s ***** test 546s x = [1, 2; 3, 4; 5,6; 5, 8]; 546s y = {'9'; '9'; '6'; '7'}; 546s a = ClassificationKNN (x, y); 546s assert (a.Prior, [0.5; 0.25; 0.25]) 546s ***** test 546s load fisheriris 546s x = meas; 546s y = species; 546s ClassNames = {'setosa', 'versicolor', 'virginica'}; 546s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 546s assert (a.ClassNames, ClassNames') 546s ***** error ClassificationKNN () 546s ***** error ... 546s ClassificationKNN (ones(4, 1)) 546s ***** error ... 546s ClassificationKNN (ones (4,2), ones (1,4)) 546s ***** error ... 546s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 546s ***** error ... 546s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 546s ***** error ... 546s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", ['a']) 546s ***** error ... 546s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 546s ***** error ... 546s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 546s ***** error ... 546s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 546s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 546s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 546s ***** error ... 546s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 546s ***** error ... 546s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 546s ***** error ... 546s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 546s ***** shared x, y 546s load fisheriris 546s x = meas; 546s y = species; 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 5); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"; "versicolor"; "virginica"}) 546s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 546s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"; "versicolor"; "virginica"}) 546s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 546s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 546s [l, s, c] = predict (obj, xc); 546s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 546s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"; "versicolor"; "virginica"}) 546s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 546s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 546s ***** test 546s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 546s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 546s obj = fitcknn (x, y, "NumNeighbors", 5); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 546s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 546s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 5); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 0.6, 0.4], 1e-4) 546s assert (c, [1, 0.4, 0.6], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 0.5, 0.5], 1e-4) 546s assert (c, [1, 0.5, 0.5], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"}) 546s assert (s, [0.9, 0.1, 0], 1e-4) 546s assert (c, [0.1, 0.9, 1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 546s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"}) 546s assert (s, [0.8, 0.2, 0], 1e-4) 546s assert (c, [0.2, 0.8, 1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 1, 0], 1e-4) 546s assert (c, [1, 0, 1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 0.7, 0.3], 1e-4) 546s assert (c, [1, 0.3, 0.7], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 0.6, 0.4], 1e-4) 546s assert (c, [1, 0.4, 0.6], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"virginica"}) 546s assert (s, [0, 0.1, 0.9], 1e-4) 546s assert (c, [1, 0.9, 0.1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"virginica"}) 546s assert (s, [0, 0.1, 0.9], 1e-4) 546s assert (c, [1, 0.9, 0.1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"versicolor"}) 546s assert (s, [0, 1, 0], 1e-4) 546s assert (c, [1, 0, 1], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"}) 546s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 546s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 546s ***** test 546s xc = [5, 3, 5, 1.45]; 546s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"}) 546s assert (s, [0.8, 0.2, 0], 1e-4) 546s assert (c, [0.2, 0.8, 1], 1e-4) 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa"; "versicolor"; "virginica"}) 546s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 546s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 546s ***** test 546s xc = [min(x); mean(x); max(x)]; 546s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 546s [l, s, c] = predict (obj, xc); 546s assert (l, {"setosa";"setosa";"setosa"}) 546s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 546s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 546s ***** error ... 546s predict (ClassificationKNN (ones (4,2), ones (4,1))) 546s ***** error ... 546s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 546s ***** error ... 546s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 546s ***** test 546s load fisheriris 546s model = fitcknn (meas, species, 'NumNeighbors', 5); 546s X = mean (meas); 546s Y = {'versicolor'}; 546s L = loss (model, X, Y); 546s assert (L, 0) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = {'A'; 'B'; 'A'}; 546s model = fitcknn (X, Y); 546s X_test = [1, 6; 3, 3]; 546s Y_test = {'A'; 'B'}; 546s L = loss (model, X_test, Y_test); 546s assert (abs (L - 0.6667) > 1e-5) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = {'A'; 'B'; 'A'}; 546s model = fitcknn (X, Y); 546s X_with_nan = [1, 2; NaN, 4]; 546s Y_test = {'A'; 'B'}; 546s L = loss (model, X_with_nan, Y_test); 546s assert (abs (L - 0.3333) < 1e-4) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = {'A'; 'B'; 'A'}; 546s model = fitcknn (X, Y); 546s X_with_nan = [1, 2; NaN, 4]; 546s Y_test = {'A'; 'B'}; 546s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 546s assert (isnan (L)) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = {'A'; 'B'; 'A'}; 546s model = fitcknn (X, Y); 546s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 546s L = loss (model, X, Y, 'LossFun', customLossFun); 546s assert (L, 0) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = [1; 2; 1]; 546s model = fitcknn (X, Y); 546s L = loss (model, X, Y, 'LossFun', 'classiferror'); 546s assert (L, 0) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = [true; false; true]; 546s model = fitcknn (X, Y); 546s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 546s assert (abs (L - 0.1269) < 1e-4) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = ['1'; '2'; '1']; 546s model = fitcknn (X, Y); 546s L = loss (model, X, Y, 'LossFun', 'classiferror'); 546s assert (L, 0) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = ['1'; '2'; '3']; 546s model = fitcknn (X, Y); 546s X_test = [3, 3]; 546s Y_test = ['1']; 546s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 546s assert (L, 1) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = ['1'; '2'; '3']; 546s model = fitcknn (X, Y); 546s X_test = [3, 3; 5, 7]; 546s Y_test = ['1'; '2']; 546s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 546s assert (L, 1) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = ['1'; '2'; '3']; 546s model = fitcknn (X, Y); 546s X_test = [3, 3; 5, 7]; 546s Y_test = ['1'; '2']; 546s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 546s assert (L, 1) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = ['1'; '2'; '3']; 546s model = fitcknn (X, Y); 546s X_test = [3, 3; 5, 7]; 546s Y_test = ['1'; '2']; 546s W = [1; 2]; 546s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 546s assert (abs (L - 0.6931) < 1e-4) 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1))) 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 546s ***** error ... 546s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 546s ***** error ... 546s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 546s ones (4,1), 'LossFun') 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 546s ones (4,1), 'LossFun', 'a') 546s ***** error ... 546s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 546s ones (4,1), 'Weights', 'w') 546s ***** test 546s load fisheriris 546s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 546s X = mean (meas); 546s Y = {'versicolor'}; 546s m = margin (mdl, X, Y); 546s assert (m, 1) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = [1; 2; 3]; 546s mdl = fitcknn (X, Y); 546s m = margin (mdl, X, Y); 546s assert (m, [1; 1; 1]) 546s ***** test 546s X = [7, 8; 9, 10]; 546s Y = ['1'; '2']; 546s mdl = fitcknn (X, Y); 546s m = margin (mdl, X, Y); 546s assert (m, [1; 1]) 546s ***** test 546s X = [11, 12]; 546s Y = {'1'}; 546s mdl = fitcknn (X, Y); 546s m = margin (mdl, X, Y); 546s assert (isnan (m)) 546s ***** test 546s X = [1, 2; 3, 4; 5, 6]; 546s Y = [1; 2; 3]; 546s mdl = fitcknn (X, Y); 546s X1 = [15, 16]; 546s Y1 = [1]; 546s m = margin (mdl, X1, Y1); 546s assert (m, -1) 546s ***** error ... 546s margin (ClassificationKNN (ones (4,2), ones (4,1))) 546s ***** error ... 546s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 546s ***** error ... 546s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 546s ***** error ... 546s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 546s ***** error ... 546s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 546s ***** shared X, Y, mdl 546s X = [1, 2; 4, 5; 7, 8; 3, 2]; 546s Y = [2; 1; 3; 2]; 546s mdl = fitcknn (X, Y); 546s ***** test 546s Vars = 1; 546s Labels = 2; 546s [pd, x, y] = partialDependence (mdl, Vars, Labels); 546s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 546s 0.5000, 0.5000]; 546s assert (pd, pdm) 546s ***** test 546s Vars = 1; 546s Labels = 2; 546s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 546s 'NumObservationsToSample', 5); 546s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 546s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 546s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 546s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 546s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 546s assert (abs (pdm - pd) < 1) 547s ***** test 547s Vars = 1; 547s Labels = 2; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 547s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000]; 547s assert (pd, pdm) 547s ***** test 547s Vars = [1, 2]; 547s Labels = 1; 547s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 547s queryPoints, 'UseParallel', true); 547s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 547s assert (pd, pdm) 547s ***** test 547s Vars = 1; 547s Labels = [1; 2]; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels); 547s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 547s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 547s 0.5000, 0.5000, 0.5000]; 547s assert (pd, pdm) 547s ***** test 547s Vars = [1, 2]; 547s Labels = [1; 2]; 547s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 547s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 547s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 547s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 547s assert (pd, pdm) 547s ***** test 547s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 547s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 547s X = [X1, double(X2)]; 547s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 547s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 547s Vars = 1; 547s Labels = 1; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels); 547s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 547s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 547s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 547s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 547s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 547s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 547s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 547s 0.7500, 0.7500, 0.7500]; 547s assert (pd, pdm) 547s ***** test 547s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 547s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 547s X = [X1, double(X2)]; 547s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 547s predictorNames = {'Feature1', 'Feature2'}; 547s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 547s Vars = 'Feature1'; 547s Labels = 1; 547s [pd, x, y] = partialDependence (mdl, Vars, Labels); 547s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 547s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 547s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 547s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 547s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 547s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 547s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 547s 0.7500, 0.7500, 0.7500]; 547s assert (pd, pdm) 548s ***** test 548s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 548s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 548s X = [X1, double(X2)]; 548s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 548s predictorNames = {'Feature1', 'Feature2'}; 548s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 548s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 548s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 548s new_X = [new_X1, double(new_X2)]; 548s Vars = 'Feature1'; 548s Labels = 1; 548s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 548s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 548s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 548s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 548s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 548s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 548s 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]; 548s assert (pd, pdm) 548s ***** error ... 548s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 548s ***** error ... 548s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 548s ***** error ... 548s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 548s ones (4,1), 'NumObservationsToSample') 548s ***** error ... 548s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 548s ones (4,1), 2) 548s ***** shared x, y, obj 548s load fisheriris 548s x = meas; 548s y = species; 548s covMatrix = cov (x); 548s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 548s 'mahalanobis', 'Cov', covMatrix); 548s ***** test 548s CVMdl = crossval (obj); 548s assert (class (CVMdl), "ClassificationPartitionedModel") 548s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 548s assert (CVMdl.KFold == 10) 548s assert (CVMdl.ModelParameters.NumNeighbors == 5) 548s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 548s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 548s assert (!CVMdl.ModelParameters.Standardize) 548s ***** test 548s CVMdl = crossval (obj, "KFold", 5); 548s assert (class (CVMdl), "ClassificationPartitionedModel") 548s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 548s assert (CVMdl.KFold == 5) 548s assert (CVMdl.ModelParameters.NumNeighbors == 5) 548s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 548s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 548s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 548s ***** test 548s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 548s CVMdl = crossval (obj, "HoldOut", 0.2); 548s assert (class (CVMdl), "ClassificationPartitionedModel") 548s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 548s assert (CVMdl.ModelParameters.NumNeighbors == 5) 548s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 548s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 548s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 548s ***** test 548s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 548s CVMdl = crossval (obj, "LeaveOut", 'on'); 548s assert (class (CVMdl), "ClassificationPartitionedModel") 548s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 548s assert (CVMdl.ModelParameters.NumNeighbors == 10) 548s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 548s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 548s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 548s ***** test 548s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 548s partition = cvpartition (y, 'KFold', 3); 548s CVMdl = crossval (obj, 'cvPartition', partition); 548s assert (class (CVMdl), "ClassificationPartitionedModel") 548s assert (CVMdl.KFold == 3) 548s assert (CVMdl.ModelParameters.NumNeighbors == 10) 548s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 548s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 548s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 548s ***** error ... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 548s ***** error... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 548s ***** error ... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 548s ***** error ... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 548s ***** error ... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 548s ***** error ... 548s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 548s 162 tests, 162 passed, 0 known failure, 0 skipped 548s [inst/Classification/ClassificationDiscriminant.m] 548s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationDiscriminant.m 548s ***** demo 548s ## Create discriminant classifier 548s ## Evaluate some model predictions on new data. 548s 548s load fisheriris 548s x = meas; 548s y = species; 548s xc = [min(x); mean(x); max(x)]; 548s obj = fitcdiscr (x, y); 548s [label, score, cost] = predict (obj, xc); 548s ***** demo 548s load fisheriris 548s model = fitcdiscr (meas, species); 548s X = mean (meas); 548s Y = {'versicolor'}; 548s ## Compute loss for discriminant model 548s L = loss (model, X, Y) 548s ***** demo 548s load fisheriris 548s mdl = fitcdiscr (meas, species); 548s X = mean (meas); 548s Y = {'versicolor'}; 548s ## Margin for discriminant model 548s m = margin (mdl, X, Y) 548s ***** demo 548s load fisheriris 548s x = meas; 548s y = species; 548s obj = fitcdiscr (x, y, "gamma", 0.4); 548s ## Cross-validation for discriminant model 548s CVMdl = crossval (obj) 548s ***** test 548s load fisheriris 548s x = meas; 548s y = species; 548s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 548s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 548s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 548s 0.092721, 0.115388, 0.055244, 0.032710; ... 548s 0.167514, 0.055244, 0.185188, 0.042665; ... 548s 0.038401, 0.032710, 0.042665, 0.041882]; 548s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 548s 5.9360, 2.7700, 4.2600, 1.3260; ... 548s 6.5880, 2.9740, 5.5520, 2.0260]; 548s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 548s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 548s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 548s assert (class (Mdl), "ClassificationDiscriminant"); 548s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 548s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 548s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 548s assert (Mdl.ClassNames, unique (species)) 548s assert (Mdl.Sigma, sigma, 1e-6) 548s assert (Mdl.Mu, mu, 1e-14) 548s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 548s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 548s assert (Mdl.PredictorNames, PredictorNames) 549s ***** test 549s load fisheriris 549s x = meas; 549s y = species; 549s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 549s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 549s 0.046361, 0.115388, 0.027622, 0.016355; ... 549s 0.083757, 0.027622, 0.185188, 0.021333; ... 549s 0.019201, 0.016355, 0.021333, 0.041882]; 549s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 549s 5.9360, 2.7700, 4.2600, 1.3260; ... 549s 6.5880, 2.9740, 5.5520, 2.0260]; 549s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 549s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 549s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 549s assert (class (Mdl), "ClassificationDiscriminant"); 549s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 549s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 549s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 549s assert (Mdl.ClassNames, unique (species)) 549s assert (Mdl.Sigma, sigma, 1e-6) 549s assert (Mdl.Mu, mu, 1e-14) 549s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 549s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 549s ***** shared X, Y, MODEL 549s X = rand (10,2); 549s Y = [ones(5,1);2*ones(5,1)]; 549s MODEL = ClassificationDiscriminant (X, Y); 549s ***** error ClassificationDiscriminant () 549s ***** error ... 549s ClassificationDiscriminant (ones(4, 1)) 549s ***** error ... 549s ClassificationDiscriminant (ones (4,2), ones (1,4)) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "ResponseName", 1) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "ClassNames", ['a']) 549s ***** error ... 549s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 549s ***** error ... 549s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 549s ***** error ... 549s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 549s ***** error ... 549s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "Cost", "string") 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 549s ***** error ... 549s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 549s ***** error ... 549s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 549s ***** error ... 549s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 549s ***** error ... 549s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 549s ***** error ... 549s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 549s ***** test 549s load fisheriris 549s x = meas; 549s y = species; 549s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 549s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 549s assert (label, {'versicolor'}) 549s assert (score, [0, 0.9999, 0.0001], 1e-4) 549s assert (cost, [1, 0.0001, 0.9999], 1e-4) 549s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 549s assert (label, {'versicolor'}) 549s assert (score, [0, 0.6368, 0.3632], 1e-4) 549s assert (cost, [1, 0.3632, 0.6368], 1e-4) 549s ***** test 549s load fisheriris 549s x = meas; 549s y = species; 549s xc = [min(x); mean(x); max(x)]; 549s Mdl = fitcdiscr (x, y); 549s [label, score, cost] = predict (Mdl, xc); 549s l = {'setosa'; 'versicolor'; 'virginica'}; 549s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 549s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 549s assert (label, l) 549s assert (score, s, 1e-4) 549s assert (cost, c, 1e-4) 549s ***** error ... 549s predict (MODEL) 549s ***** error ... 549s predict (MODEL, []) 549s ***** error ... 549s predict (MODEL, 1) 549s ***** test 549s load fisheriris 549s model = fitcdiscr (meas, species); 549s x = mean (meas); 549s y = {'versicolor'}; 549s L = loss (model, x, y); 549s assert (L, 0) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6]; 549s y = {'A'; 'B'; 'A'}; 549s model = fitcdiscr (x, y, "Gamma", 0.4); 549s x_test = [1, 6; 3, 3]; 549s y_test = {'A'; 'B'}; 549s L = loss (model, x_test, y_test); 549s assert (L, 0.3333, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6; 7, 8]; 549s y = ['1'; '2'; '3'; '1']; 549s model = fitcdiscr (x, y, "gamma" , 0.5); 549s x_test = [3, 3]; 549s y_test = ['1']; 549s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 549s assert (L, 0.2423, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6; 7, 8]; 549s y = ['1'; '2'; '3'; '1']; 549s model = fitcdiscr (x, y, "gamma" , 0.5); 549s x_test = [3, 3; 5, 7]; 549s y_test = ['1'; '2']; 549s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 549s assert (L, 0.3333, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6; 7, 8]; 549s y = ['1'; '2'; '3'; '1']; 549s model = fitcdiscr (x, y, "gamma" , 0.5); 549s x_test = [3, 3; 5, 7]; 549s y_test = ['1'; '2']; 549s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 549s assert (L, 0.5886, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6; 7, 8]; 549s y = ['1'; '2'; '3'; '1']; 549s model = fitcdiscr (x, y, "gamma" , 0.5); 549s x_test = [3, 3; 5, 7]; 549s y_test = ['1'; '2']; 549s W = [1; 2]; 549s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 549s assert (L, 0.5107, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6]; 549s y = {'A'; 'B'; 'A'}; 549s model = fitcdiscr (x, y, "gamma" , 0.5); 549s x_with_nan = [1, 2; NaN, 4]; 549s y_test = {'A'; 'B'}; 549s L = loss (model, x_with_nan, y_test); 549s assert (L, 0.3333, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6]; 549s y = {'A'; 'B'; 'A'}; 549s model = fitcdiscr (x, y); 549s x_with_nan = [1, 2; NaN, 4]; 549s y_test = {'A'; 'B'}; 549s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 549s assert (isnan (L)) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6]; 549s y = {'A'; 'B'; 'A'}; 549s model = fitcdiscr (x, y); 549s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 549s L = loss (model, x, y, 'LossFun', customLossFun); 549s assert (L, 0.8889, 1e-4) 549s ***** test 549s x = [1, 2; 3, 4; 5, 6]; 549s y = [1; 2; 1]; 549s model = fitcdiscr (x, y); 549s L = loss (model, x, y, 'LossFun', 'classiferror'); 549s assert (L, 0.3333, 1e-4) 549s ***** error ... 549s loss (MODEL) 549s ***** error ... 549s loss (MODEL, ones (4,2)) 549s ***** error ... 549s loss (MODEL, [], zeros (2)) 549s ***** error ... 549s loss (MODEL, 1, zeros (2)) 549s ***** error ... 549s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 549s ***** error ... 549s loss (MODEL, ones (4,2), ones (3,1)) 549s ***** error ... 549s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 549s ***** error ... 549s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 549s load fisheriris 549s mdl = fitcdiscr (meas, species); 549s X = mean (meas); 549s Y = {'versicolor'}; 549s m = margin (mdl, X, Y); 549s assert (m, 1, 1e-6) 549s ***** test 549s X = [1, 2; 3, 4; 5, 6]; 549s Y = [1; 2; 1]; 549s mdl = fitcdiscr (X, Y, "gamma", 0.5); 549s m = margin (mdl, X, Y); 549s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 549s ***** error ... 549s margin (MODEL) 549s ***** error ... 549s margin (MODEL, ones (4,2)) 549s ***** error ... 549s margin (MODEL, [], zeros (2)) 549s ***** error ... 549s margin (MODEL, 1, zeros (2)) 549s ***** error ... 549s margin (MODEL, ones (4,2), ones (3,1)) 549s ***** shared x, y, obj 549s load fisheriris 549s x = meas; 549s y = species; 549s obj = fitcdiscr (x, y, "gamma", 0.4); 549s ***** test 549s CVMdl = crossval (obj); 549s assert (class (CVMdl), "ClassificationPartitionedModel") 549s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 549s assert (CVMdl.KFold == 10) 549s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 549s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 549s ***** test 549s CVMdl = crossval (obj, "KFold", 3); 549s assert (class (CVMdl), "ClassificationPartitionedModel") 549s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 549s assert (CVMdl.KFold == 3) 549s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 549s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 549s ***** test 549s CVMdl = crossval (obj, "HoldOut", 0.2); 549s assert (class (CVMdl), "ClassificationPartitionedModel") 549s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 549s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 549s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 549s ***** test 549s CVMdl = crossval (obj, "LeaveOut", 'on'); 549s assert (class (CVMdl), "ClassificationPartitionedModel") 549s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 549s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 549s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 550s ***** test 550s partition = cvpartition (y, 'KFold', 3); 550s CVMdl = crossval (obj, 'cvPartition', partition); 550s assert (class (CVMdl), "ClassificationPartitionedModel") 550s assert (CVMdl.KFold == 3) 550s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 550s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 550s ***** error ... 550s crossval (obj, "kfold") 550s ***** error... 550s crossval (obj, "kfold", 12, "holdout", 0.2) 550s ***** error ... 550s crossval (obj, "kfold", 'a') 550s ***** error ... 550s crossval (obj, "holdout", 2) 550s ***** error ... 550s crossval (obj, "leaveout", 1) 550s ***** error ... 550s crossval (obj, "cvpartition", 1) 550s 65 tests, 65 passed, 0 known failure, 0 skipped 550s [inst/Classification/ClassificationSVM.m] 550s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationSVM.m 550s ***** demo 550s ## Create a Support Vector Machine classifier and determine margin for test 550s ## data. 550s load fisheriris 550s rng(1); ## For reproducibility 550s 550s ## Select indices of the non-setosa species 550s inds = !strcmp(species, 'setosa'); 550s 550s ## Select features and labels for non-setosa species 550s X = meas(inds, 3:4); 550s Y = grp2idx(species(inds)); 550s 550s ## Convert labels to +1 and -1 550s unique_classes = unique(Y); 550s Y(Y == unique_classes(1)) = -1; 550s Y(Y == unique_classes(2)) = 1; 550s 550s ## Partition data for training and testing 550s cv = cvpartition(Y, 'HoldOut', 0.15); 550s X_train = X(training(cv), :); 550s Y_train = Y(training(cv)); 550s X_test = X(test(cv), :); 550s Y_test = Y(test(cv)); 550s 550s ## Train the SVM model 550s CVSVMModel = fitcsvm(X_train, Y_train); 550s 550s ## Calculate margins 550s m = margin(CVSVMModel, X_test, Y_test); 550s disp(m); 550s ***** demo 550s ## Create a Support Vector Machine classifier and determine loss for test 550s ## data. 550s load fisheriris 550s rng(1); ## For reproducibility 550s 550s ## Select indices of the non-setosa species 550s inds = !strcmp(species, 'setosa'); 550s 550s ## Select features and labels for non-setosa species 550s X = meas(inds, 3:4); 550s Y = grp2idx(species(inds)); 550s 550s ## Convert labels to +1 and -1 550s unique_classes = unique(Y); 550s Y(Y == unique_classes(1)) = -1; 550s Y(Y == unique_classes(2)) = 1; 550s 550s ## Randomly partition the data into training and testing sets 550s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 550s 550s X_train = X(training(cv), :); 550s Y_train = Y(training(cv)); 550s 550s X_test = X(test(cv), :); 550s Y_test = Y(test(cv)); 550s 550s ## Train the SVM model 550s SVMModel = fitcsvm(X_train, Y_train); 550s 550s ## Calculate loss 550s 550s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 550s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 550s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 550s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 550s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 550s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 550s ***** test 550s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 550s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 550s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 550s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 550s assert (class (a), "ClassificationSVM"); 550s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 550s assert ({a.X, a.Y}, {x, y}) 550s assert (a.NumObservations, 5) 550s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 550s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 550s ***** test 550s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 550s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 550s a = ClassificationSVM (x, y); 550s assert (class (a), "ClassificationSVM"); 550s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 550s assert (a.ModelParameters.BoxConstraint, 1) 550s assert (a.ClassNames, [1; -1]) 550s assert (a.ModelParameters.KernelOffset, 0) 550s ***** test 550s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 550s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 550s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 550s "KernelOffset", 2); 550s assert (class (a), "ClassificationSVM"); 550s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 550s assert (a.ModelParameters.BoxConstraint, 2) 550s assert (a.ModelParameters.KernelOffset, 2) 550s ***** test 550s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 550s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 550s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 550s "PolynomialOrder", 3); 550s assert (class (a), "ClassificationSVM"); 550s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 550s assert (a.ModelParameters.PolynomialOrder, 3) 550s ***** error ClassificationSVM () 550s ***** error ... 550s ClassificationSVM (ones(10,2)) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (5,1)) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", ['a']) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 550s ***** error ... 550s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 550s ***** error ... 550s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 550s ***** error ... 550s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 550s ***** error ... 550s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 550s ***** error ... 550s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 550s ***** error ... 550s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 550s ***** error ... 550s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 550s ***** error ... 550s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 550s ***** shared x, y, x_train, x_test, y_train, y_test, objST 550s load fisheriris 550s inds = ! strcmp (species, 'setosa'); 550s x = meas(inds, 3:4); 550s y = grp2idx (species(inds)); 550s ***** test 550s xc = [min(x); mean(x); max(x)]; 550s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 550s assert (isempty (obj.Alpha), true) 550s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 550s [label, score] = predict (obj, xc); 550s assert (label, [1; 2; 2]); 550s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 550s assert (score(:,1), -score(:,2), eps) 550s obj = fitPosterior (obj); 550s [label, probs] = predict (obj, xc); 550s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 2e-5); 550s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 550s ***** test 550s obj = fitcsvm (x, y); 550s assert (isempty (obj.Beta), true) 550s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 550s assert (numel (obj.Alpha), 24) 550s assert (obj.Bias, -14.415, 1e-3) 550s xc = [min(x); mean(x); max(x)]; 550s label = predict (obj, xc); 550s assert (label, [1; 2; 2]); 550s ***** error ... 550s predict (ClassificationSVM (ones (40,2), ones (40,1))) 550s ***** error ... 550s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 550s ***** error ... 550s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 550s ***** test 550s objST = fitcsvm (x, y); 550s objST.ScoreTransform = "a"; 550s ***** error ... 550s [labels, scores] = predict (objST, x); 550s ***** error ... 550s [labels, scores] = resubPredict (objST); 550s ***** test 550s rand ("seed", 1); 550s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 550s 'Tolerance', 1e-7); 550s obj = CVSVMModel.Trained{1}; 550s testInds = test (CVSVMModel.Partition); 550s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 550s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 550s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 550s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 550s assert (computed_margin, expected_margin, 1e-4); 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 550s ***** error ... 550s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 550s ***** test 550s rand ("seed", 1); 550s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 550s obj = CVSVMModel.Trained{1}; 550s testInds = test (CVSVMModel.Partition); 550s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 550s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 550s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 550s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 550s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 550s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 550s assert (L1, 2.8711, 1e-4); 550s assert (L2, 0.5333, 1e-4); 550s assert (L3, 10.9685, 1e-4); 550s assert (L4, 1.9827, 1e-4); 550s assert (L5, 1.5849, 1e-4); 550s assert (L6, 7.6739, 1e-4); 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones(2,1), "LossFun") 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "LossFun", 1) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "LossFun", "some") 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "Weights", ['a','b']) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "Weights", 'a') 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "Weights", [1,2,3]) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "Weights", 3) 550s ***** error ... 550s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 550s ones (2,1), "some", "some") 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 550s ***** error ... 550s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 550s ***** test 550s SVMModel = fitcsvm (x, y); 550s CVMdl = crossval (SVMModel, "KFold", 5); 550s assert (class (CVMdl), "ClassificationPartitionedModel") 550s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 550s assert (CVMdl.KFold == 5) 550s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 550s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 550s ***** test 550s obj = fitcsvm (x, y); 550s CVMdl = crossval (obj, "HoldOut", 0.2); 550s assert (class (CVMdl), "ClassificationPartitionedModel") 550s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 550s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 550s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 550s ***** test 550s obj = fitcsvm (x, y); 550s CVMdl = crossval (obj, "LeaveOut", 'on'); 550s assert (class (CVMdl), "ClassificationPartitionedModel") 550s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 550s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 550s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 551s "KFold", 5, "leaveout", 'on') 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 551s ***** error ... 551s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 551s 114 tests, 114 passed, 0 known failure, 0 skipped 551s [inst/Classification/ClassificationGAM.m] 551s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationGAM.m 551s ***** demo 551s ## Train a GAM classifier for binary classification 551s ## using specific data and plot the decision boundaries. 551s 551s ## Define specific data 551s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 551s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 551s Y = [0; 0; 0; 0; 0; ... 551s 1; 1; 1; 1; 1]; 551s 551s ## Train the GAM model 551s obj = fitcgam (X, Y, "Interactions", "all") 551s 551s ## Create a grid of values for prediction 551s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 551s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 551s [x1G, x2G] = meshgrid (x1, x2); 551s XGrid = [x1G(:), x2G(:)]; 551s [labels, score] = predict (obj, XGrid); 551s ***** test 551s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 551s y = [0; 0; 1; 1]; 551s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 551s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 551s assert (class (a), "ClassificationGAM"); 551s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 551s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 551s assert (a.ClassNames, {'0'; '1'}) 551s assert (a.PredictorNames, PredictorNames) 551s assert (a.BaseModel.Intercept, 0) 551s ***** test 551s load fisheriris 551s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 551s X = meas(inds, :); 551s Y = species(inds, :)'; 551s Y = strcmp (Y, 'virginica')'; 551s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 551s assert (class (a), "ClassificationGAM"); 551s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 551s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 551s assert (a.ClassNames, {'0'; '1'}) 551s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 551s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 551s assert (a.ModelwInt.Intercept, 0) 554s ***** test 554s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 554s Y = [0; 1; 0; 1; 1]; 554s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 554s assert (class (a), "ClassificationGAM"); 554s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 554s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 554s assert (a.ClassNames, {'0'; '1'}) 554s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 554s assert (a.Knots, [4, 4, 4]) 554s assert (a.Order, [3, 3, 3]) 554s assert (a.DoF, [7, 7, 7]) 554s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 556s ***** error ClassificationGAM () 556s ***** error ... 556s ClassificationGAM (ones(4, 1)) 556s ***** error ... 556s ClassificationGAM (ones (4,2), ones (1,4)) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 556s ***** error ... 556s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 556s ***** error ... 556s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", ['a']) 556s ***** error ... 556s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 556s ***** error ... 556s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 556s ***** error ... 556s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 556s ***** error ... 556s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 556s ***** test 556s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 556s y = [1; 0; 1; 0; 1]; 556s a = ClassificationGAM (x, y, "interactions", "all"); 556s l = {'0'; '0'; '0'; '0'; '0'}; 556s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 556s 0.4259, 0.5741; 0.3760, 0.6240]; 556s [labels, scores] = predict (a, x); 556s assert (class (a), "ClassificationGAM"); 556s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 556s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 556s assert (a.ClassNames, {'1'; '0'}) 556s assert (a.PredictorNames, {'x1', 'x2'}) 556s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 556s assert (labels, l) 556s assert (scores, s, 1e-1) 556s ***** test 556s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 556s y = [0; 0; 1; 1]; 556s interactions = [false, true, false; true, false, true; false, true, false]; 556s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 556s [label, score] = predict (a, x, "includeinteractions", true); 556s l = {'0'; '0'; '1'; '1'}; 556s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 556s assert (class (a), "ClassificationGAM"); 556s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 556s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 556s assert (a.ClassNames, {'0'; '1'}) 556s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 556s assert (a.ModelwInt.Intercept, 0) 556s assert (label, l) 556s assert (score, s, 1e-1) 559s ***** error ... 559s predict (ClassificationGAM (ones (4,2), ones (4,1))) 559s ***** error ... 559s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 559s ***** error ... 559s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 560s ***** shared x, y, obj 560s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 560s y = [0; 0; 1; 1]; 560s obj = fitcgam (x, y); 561s ***** test 561s CVMdl = crossval (obj); 561s assert (class (CVMdl), "ClassificationPartitionedModel") 561s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 561s assert (CVMdl.KFold == 10) 561s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 561s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 569s ***** test 569s CVMdl = crossval (obj, "KFold", 5); 569s assert (class (CVMdl), "ClassificationPartitionedModel") 569s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 569s assert (CVMdl.KFold == 5) 569s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 569s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 573s ***** test 573s CVMdl = crossval (obj, "HoldOut", 0.2); 573s assert (class (CVMdl), "ClassificationPartitionedModel") 573s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 573s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 573s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 574s ***** test 574s partition = cvpartition (y, 'KFold', 3); 574s CVMdl = crossval (obj, 'cvPartition', partition); 574s assert (class (CVMdl), "ClassificationPartitionedModel") 574s assert (CVMdl.KFold == 3) 574s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 574s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 577s ***** error ... 577s crossval (obj, "kfold") 577s ***** error... 577s crossval (obj, "kfold", 12, "holdout", 0.2) 577s ***** error ... 577s crossval (obj, "kfold", 'a') 577s ***** error ... 577s crossval (obj, "holdout", 2) 577s ***** error ... 577s crossval (obj, "leaveout", 1) 577s ***** error ... 577s crossval (obj, "cvpartition", 1) 577s 34 tests, 34 passed, 0 known failure, 0 skipped 577s [inst/Classification/CompactClassificationNeuralNetwork.m] 577s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/CompactClassificationNeuralNetwork.m 577s ***** demo 577s ## Create a neural network classifier and its compact version 577s # and compare their size 577s 577s load fisheriris 577s X = meas; 577s Y = species; 577s 577s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 577s CMdl = crossval (Mdl) 577s ***** error ... 577s CompactClassificationDiscriminant (1) 577s ***** shared x, y, CMdl 577s load fisheriris 577s x = meas; 577s y = grp2idx (species); 577s Mdl = fitcnet (x, y, "IterationLimit", 100); 577s CMdl = compact (Mdl); 577s ***** error ... 577s predict (CMdl) 577s ***** error ... 577s predict (CMdl, []) 577s ***** error ... 577s predict (CMdl, 1) 577s ***** test 577s CMdl.ScoreTransform = "a"; 577s ***** error ... 577s [labels, scores] = predict (CMdl, x); 577s 6 tests, 6 passed, 0 known failure, 0 skipped 577s [inst/Classification/CompactClassificationGAM.m] 577s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/CompactClassificationGAM.m 577s ***** demo 577s ## Create a generalized additive model classifier and its compact version 577s # and compare their size 577s 577s load fisheriris 577s X = meas; 577s Y = species; 577s 577s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 577s CMdl = crossval (Mdl) 577s ***** test 577s Mdl = CompactClassificationGAM (); 577s assert (class (Mdl), "CompactClassificationGAM") 577s ***** test 577s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 577s y = [0; 0; 1; 1]; 577s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 577s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 577s CMdl = compact (Mdl); 577s assert (class (CMdl), "CompactClassificationGAM"); 577s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 577s assert (CMdl.ClassNames, {'0'; '1'}) 577s assert (CMdl.PredictorNames, PredictorNames) 577s assert (CMdl.BaseModel.Intercept, 0) 578s ***** test 578s load fisheriris 578s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 578s X = meas(inds, :); 578s Y = species(inds, :)'; 578s Y = strcmp (Y, 'virginica')'; 578s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 578s CMdl = compact (Mdl); 578s assert (class (CMdl), "CompactClassificationGAM"); 578s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 578s assert (CMdl.ClassNames, {'0'; '1'}) 578s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 578s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 578s assert (CMdl.ModelwInt.Intercept, 0) 580s ***** test 580s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 580s Y = [0; 1; 0; 1; 1]; 580s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 580s CMdl = compact (Mdl); 580s assert (class (CMdl), "CompactClassificationGAM"); 580s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 580s assert (CMdl.ClassNames, {'0'; '1'}) 580s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 580s assert (CMdl.Knots, [4, 4, 4]) 580s assert (CMdl.Order, [3, 3, 3]) 580s assert (CMdl.DoF, [7, 7, 7]) 580s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 581s ***** error ... 581s CompactClassificationGAM (1) 581s ***** test 581s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 581s y = [1; 0; 1; 0; 1]; 581s Mdl = fitcgam (x, y, "interactions", "all"); 581s CMdl = compact (Mdl); 581s l = {'0'; '0'; '0'; '0'; '0'}; 581s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 581s 0.4259, 0.5741; 0.3760, 0.6240]; 581s [labels, scores] = predict (CMdl, x); 581s assert (class (CMdl), "CompactClassificationGAM"); 581s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 581s assert (CMdl.ClassNames, {'1'; '0'}) 581s assert (CMdl.PredictorNames, {'x1', 'x2'}) 581s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 581s assert (labels, l) 581s assert (scores, s, 1e-1) 583s ***** test 583s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 583s y = [0; 0; 1; 1]; 583s interactions = [false, true, false; true, false, true; false, true, false]; 583s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 583s CMdl = compact (Mdl); 583s [label, score] = predict (CMdl, x, "includeinteractions", true); 583s l = {'0'; '0'; '1'; '1'}; 583s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 583s assert (class (CMdl), "CompactClassificationGAM"); 583s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 583s assert (CMdl.ClassNames, {'0'; '1'}) 583s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 583s assert (CMdl.ModelwInt.Intercept, 0) 583s assert (label, l) 583s assert (score, s, 1e-1) 586s ***** shared CMdl 586s Mdl = fitcgam (ones (4,2), ones (4,1)); 586s CMdl = compact (Mdl); 586s ***** error ... 586s predict (CMdl) 586s ***** error ... 586s predict (CMdl, []) 586s ***** error ... 586s predict (CMdl, 1) 586s 10 tests, 10 passed, 0 known failure, 0 skipped 586s [inst/Classification/CompactClassificationDiscriminant.m] 586s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/CompactClassificationDiscriminant.m 586s ***** demo 586s ## Create a discriminant analysis classifier and its compact version 586s # and compare their size 586s 586s load fisheriris 586s X = meas; 586s Y = species; 586s 586s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 586s CMdl = crossval (Mdl) 586s ***** test 586s load fisheriris 586s x = meas; 586s y = species; 586s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 586s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 586s CMdl = compact (Mdl); 586s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 586s 0.092721, 0.115388, 0.055244, 0.032710; ... 586s 0.167514, 0.055244, 0.185188, 0.042665; ... 586s 0.038401, 0.032710, 0.042665, 0.041882]; 586s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 586s 5.9360, 2.7700, 4.2600, 1.3260; ... 586s 6.5880, 2.9740, 5.5520, 2.0260]; 586s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 586s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 586s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 586s assert (class (CMdl), "CompactClassificationDiscriminant"); 586s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 586s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 586s assert (CMdl.ClassNames, unique (species)) 586s assert (CMdl.Sigma, sigma, 1e-6) 586s assert (CMdl.Mu, mu, 1e-14) 586s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 586s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 586s assert (CMdl.PredictorNames, PredictorNames) 586s ***** test 586s load fisheriris 586s x = meas; 586s y = species; 586s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 586s CMdl = compact (Mdl); 586s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 586s 0.046361, 0.115388, 0.027622, 0.016355; ... 586s 0.083757, 0.027622, 0.185188, 0.021333; ... 586s 0.019201, 0.016355, 0.021333, 0.041882]; 586s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 586s 5.9360, 2.7700, 4.2600, 1.3260; ... 586s 6.5880, 2.9740, 5.5520, 2.0260]; 586s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 586s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 586s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 586s assert (class (CMdl), "CompactClassificationDiscriminant"); 586s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 586s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 586s assert (CMdl.ClassNames, unique (species)) 586s assert (CMdl.Sigma, sigma, 1e-6) 586s assert (CMdl.Mu, mu, 1e-14) 586s assert (CMdl.XCentered([1:3],:), xCentered, 1e-14) 586s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 586s ***** error ... 586s CompactClassificationDiscriminant (1) 586s ***** test 586s load fisheriris 586s x = meas; 586s y = species; 586s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 586s CMdl = compact (Mdl); 586s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 586s assert (label, {'versicolor'}) 586s assert (score, [0, 0.9999, 0.0001], 1e-4) 586s assert (cost, [1, 0.0001, 0.9999], 1e-4) 586s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 586s assert (label, {'versicolor'}) 586s assert (score, [0, 0.6368, 0.3632], 1e-4) 586s assert (cost, [1, 0.3632, 0.6368], 1e-4) 586s ***** test 586s load fisheriris 586s x = meas; 586s y = species; 586s xc = [min(x); mean(x); max(x)]; 586s Mdl = fitcdiscr (x, y); 586s CMdl = compact (Mdl); 586s [label, score, cost] = predict (CMdl, xc); 586s l = {'setosa'; 'versicolor'; 'virginica'}; 586s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 586s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 586s assert (label, l) 586s assert (score, s, 1e-4) 586s assert (cost, c, 1e-4) 586s ***** shared MODEL 586s X = rand (10,2); 586s Y = [ones(5,1);2*ones(5,1)]; 586s MODEL = compact (ClassificationDiscriminant (X, Y)); 586s ***** error ... 586s predict (MODEL) 586s ***** error ... 586s predict (MODEL, []) 586s ***** error ... 586s predict (MODEL, 1) 586s ***** test 586s load fisheriris 586s model = fitcdiscr (meas, species); 586s x = mean (meas); 586s y = {'versicolor'}; 586s L = loss (model, x, y); 586s assert (L, 0) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6]; 586s y = {'A'; 'B'; 'A'}; 586s model = fitcdiscr (x, y, "Gamma", 0.4); 586s x_test = [1, 6; 3, 3]; 586s y_test = {'A'; 'B'}; 586s L = loss (model, x_test, y_test); 586s assert (L, 0.3333, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6; 7, 8]; 586s y = ['1'; '2'; '3'; '1']; 586s model = fitcdiscr (x, y, "gamma" , 0.5); 586s x_test = [3, 3]; 586s y_test = ['1']; 586s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 586s assert (L, 0.2423, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6; 7, 8]; 586s y = ['1'; '2'; '3'; '1']; 586s model = fitcdiscr (x, y, "gamma" , 0.5); 586s x_test = [3, 3; 5, 7]; 586s y_test = ['1'; '2']; 586s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 586s assert (L, 0.3333, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6; 7, 8]; 586s y = ['1'; '2'; '3'; '1']; 586s model = fitcdiscr (x, y, "gamma" , 0.5); 586s x_test = [3, 3; 5, 7]; 586s y_test = ['1'; '2']; 586s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 586s assert (L, 0.5886, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6; 7, 8]; 586s y = ['1'; '2'; '3'; '1']; 586s model = fitcdiscr (x, y, "gamma" , 0.5); 586s x_test = [3, 3; 5, 7]; 586s y_test = ['1'; '2']; 586s W = [1; 2]; 586s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 586s assert (L, 0.5107, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6]; 586s y = {'A'; 'B'; 'A'}; 586s model = fitcdiscr (x, y, "gamma" , 0.5); 586s x_with_nan = [1, 2; NaN, 4]; 586s y_test = {'A'; 'B'}; 586s L = loss (model, x_with_nan, y_test); 586s assert (L, 0.3333, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6]; 586s y = {'A'; 'B'; 'A'}; 586s model = fitcdiscr (x, y); 586s x_with_nan = [1, 2; NaN, 4]; 586s y_test = {'A'; 'B'}; 586s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 586s assert (isnan (L)) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6]; 586s y = {'A'; 'B'; 'A'}; 586s model = fitcdiscr (x, y); 586s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 586s L = loss (model, x, y, 'LossFun', customLossFun); 586s assert (L, 0.8889, 1e-4) 586s ***** test 586s x = [1, 2; 3, 4; 5, 6]; 586s y = [1; 2; 1]; 586s model = fitcdiscr (x, y); 586s L = loss (model, x, y, 'LossFun', 'classiferror'); 586s assert (L, 0.3333, 1e-4) 586s ***** error ... 586s loss (MODEL) 586s ***** error ... 586s loss (MODEL, ones (4,2)) 586s ***** error ... 586s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 586s ***** error ... 586s loss (MODEL, ones (4,2), ones (3,1)) 586s ***** error ... 586s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 586s ***** error ... 586s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 586s load fisheriris 586s mdl = fitcdiscr (meas, species); 586s X = mean (meas); 586s Y = {'versicolor'}; 586s m = margin (mdl, X, Y); 586s assert (m, 1, 1e-6) 586s ***** test 586s X = [1, 2; 3, 4; 5, 6]; 586s Y = [1; 2; 1]; 586s mdl = fitcdiscr (X, Y, "gamma", 0.5); 586s m = margin (mdl, X, Y); 586s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 586s ***** error ... 586s margin (MODEL) 586s ***** error ... 586s margin (MODEL, ones (4,2)) 586s ***** error ... 586s margin (MODEL, ones (4,2), ones (3,1)) 586s 28 tests, 28 passed, 0 known failure, 0 skipped 586s [inst/Classification/ClassificationNeuralNetwork.m] 586s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Classification/ClassificationNeuralNetwork.m 586s ***** error ... 586s ClassificationNeuralNetwork () 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2)) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 586s ***** error ... 586s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", ['a']) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 586s "Activations", {"sigmoid", "unsupported_type"}) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 586s ***** error ... 586s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 586s ***** error ... 586s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 586s ***** error ... 586s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 586s ***** shared x, y, objST, Mdl 586s load fisheriris 586s x = meas; 586s y = grp2idx (species); 586s Mdl = fitcnet (x, y, "IterationLimit", 100); 586s ***** error ... 586s predict (Mdl) 586s ***** error ... 586s predict (Mdl, []) 586s ***** error ... 586s predict (Mdl, 1) 586s ***** test 586s objST = fitcnet (x, y, "IterationLimit", 100); 586s objST.ScoreTransform = "a"; 587s ***** error ... 587s [labels, scores] = predict (objST, x); 587s ***** error ... 587s [labels, scores] = resubPredict (objST); 587s ***** test 587s CVMdl = crossval (Mdl, "KFold", 5); 587s assert (class (CVMdl), "ClassificationPartitionedModel") 587s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 587s assert (CVMdl.KFold == 5) 587s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 587s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 587s ***** test 587s CVMdl = crossval (Mdl, "HoldOut", 0.2); 587s assert (class (CVMdl), "ClassificationPartitionedModel") 587s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 587s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 587s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 587s ***** error ... 587s crossval (Mdl, "KFold") 587s ***** error ... 587s crossval (Mdl, "KFold", 5, "leaveout", 'on') 587s ***** error ... 587s crossval (Mdl, "KFold", 'a') 587s ***** error ... 587s crossval (Mdl, "KFold", 1) 587s ***** error ... 587s crossval (Mdl, "KFold", -1) 587s ***** error ... 587s crossval (Mdl, "KFold", 11.5) 587s ***** error ... 587s crossval (Mdl, "KFold", [1,2]) 587s ***** error ... 587s crossval (Mdl, "Holdout", 'a') 587s ***** error ... 587s crossval (Mdl, "Holdout", 11.5) 587s ***** error ... 587s crossval (Mdl, "Holdout", -1) 587s ***** error ... 587s crossval (Mdl, "Holdout", 0) 587s ***** error ... 587s crossval (Mdl, "Holdout", 1) 587s ***** error ... 587s crossval (Mdl, "Leaveout", 1) 587s ***** error ... 587s crossval (Mdl, "CVPartition", 1) 587s ***** error ... 587s crossval (Mdl, "CVPartition", 'a') 587s ***** error ... 587s crossval (Mdl, "some", "some") 587s 59 tests, 59 passed, 0 known failure, 0 skipped 587s [inst/grpstats.m] 587s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/grpstats.m 587s ***** demo 587s load carsmall; 587s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 587s n = length(m); 587s errorbar((1:n)',m,p(:,2)-m); 587s set (gca, "xtick", 1:n, "xticklabel", g); 587s title ("95% prediction intervals for mean weight by year"); 587s ***** demo 587s load carsmall; 587s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 587s {"mean", "meanci", "gname"}, 0.05) 587s [c,r] = size (m); 587s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 587s set (gca, "xtick", 1:c, "xticklabel", g); 587s title ("95% prediction intervals for mean weight by year"); 587s ***** test 587s load carsmall 587s means = grpstats (Acceleration, Origin); 587s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 587s ***** test 587s load carsmall 587s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 587s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 587s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 587s ***** test 587s load carsmall 587s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 587s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 587s ***** test 587s load carsmall 587s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 587s {"mean", "meanci", "gname"}, 0.05); 587s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 587s [1e-14, 2e-14, 1e-14]'); 587s 4 tests, 4 passed, 0 known failure, 0 skipped 587s [inst/bartlett_test.m] 587s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/bartlett_test.m 587s ***** error bartlett_test () 587s ***** error ... 587s bartlett_test (1, 2, 3, 4); 587s ***** error bartlett_test (randn (50, 2), 0); 587s ***** error ... 587s bartlett_test (randn (50, 2), [1, 2, 3]); 587s ***** error ... 587s bartlett_test (randn (50, 1), ones (55, 1)); 587s ***** error ... 587s bartlett_test (randn (50, 1), ones (50, 2)); 587s ***** error ... 587s bartlett_test (randn (50, 2), [], 1.2); 587s ***** error ... 587s bartlett_test (randn (50, 2), [], "alpha"); 587s ***** error ... 587s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 587s ***** error ... 587s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 587s ***** warning ... 587s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 587s ***** test 587s load examgrades 587s [h, pval, chisq, df] = bartlett_test (grades); 587s assert (h, 1); 587s assert (pval, 7.908647337018238e-08, 1e-14); 587s assert (chisq, 38.73324, 1e-5); 587s assert (df, 4); 587s ***** test 587s load examgrades 587s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 587s assert (h, 1); 587s assert (pval, 0.01172, 1e-5); 587s assert (chisq, 8.89274, 1e-5); 587s assert (df, 2); 587s ***** test 587s load examgrades 587s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 587s assert (h, 0); 587s assert (pval, 0.88118, 1e-5); 587s assert (chisq, 0.02234, 1e-5); 587s assert (df, 1); 587s ***** test 587s load examgrades 587s grades = [grades; nan(10, 5)]; 587s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 587s assert (h, 0); 587s assert (pval, 0.88118, 1e-5); 587s assert (chisq, 0.02234, 1e-5); 587s assert (df, 1); 587s ***** test 587s load examgrades 587s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 587s assert (h, 0); 587s assert (pval, 0.01791, 1e-5); 587s assert (chisq, 5.60486, 1e-5); 587s assert (df, 1); 587s 16 tests, 16 passed, 0 known failure, 0 skipped 587s [inst/ppplot.m] 587s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ppplot.m 587s ***** test 587s hf = figure ("visible", "off"); 587s unwind_protect 587s 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]); 587s unwind_protect_cleanup 587s close (hf); 587s end_unwind_protect 587s ***** error ppplot () 587s ***** error ppplot (ones (2,2)) 587s ***** error ppplot (1, 2) 587s ***** error ppplot ([1 2 3 4], 2) 587s 5 tests, 5 passed, 0 known failure, 0 skipped 587s [inst/adtest.m] 587s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/adtest.m 587s ***** error adtest (); 587s ***** error adtest (ones (20,2)); 587s ***** error adtest ([1+i,0-3i]); 587s ***** error ... 587s adtest (ones (20,1), "Distribution", "normal"); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"norm", 5}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"ev", 5}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", 35); 587s ***** error ... 587s adtest (rand (20,1), "Name", "norm"); 587s ***** error ... 587s adtest (rand (20,1), "Name", {"norm", 75, 10}); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 587s ***** error ... 587s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 587s ***** error ... 587s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 587s "Asymptotic", true); 587s ***** error ... 587s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 587s "Alpha", 0.000000001); 587s ***** error ... 587s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 587s "Alpha", 0.999999999); 587s ***** error ... 587s adtest (10); 587s ***** warning ... 587s randn ("seed", 34); 587s adtest (ones (20,1), "Alpha", 0.000001); 587s ***** warning ... 587s randn ("seed", 34); 587s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 587s ***** warning ... 587s randn ("seed", 34); 587s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 587s ***** test 587s load examgrades 587s x = grades(:,1); 587s [h, pval, adstat, cv] = adtest (x); 587s assert (h, false); 587s assert (pval, 0.1854, 1e-4); 587s assert (adstat, 0.5194, 1e-4); 587s assert (cv, 0.7470, 1e-4); 587s ***** test 587s load examgrades 587s x = grades(:,1); 587s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 587s assert (h, false); 587s assert (pval, 0.071363, 1e-6); 587s ***** test 587s load examgrades 587s x = grades(:,1); 587s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 587s assert (h, false); 587s assert (pval, 0.4687, 1e-4); 587s 25 tests, 25 passed, 0 known failure, 0 skipped 587s [inst/monotone_smooth.m] 587s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/monotone_smooth.m 587s ***** error ... 587s monotone_smooth (1) 588s ***** error ... 588s monotone_smooth ("char", 1) 588s ***** error ... 588s monotone_smooth ({1,2,3}, 1) 588s ***** error ... 588s monotone_smooth (ones(20,3), 1) 588s ***** error ... 588s monotone_smooth (1, "char") 588s ***** error ... 588s monotone_smooth (1, {1,2,3}) 588s ***** error ... 588s monotone_smooth (1, ones(20,3)) 588s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 588s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 588s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 588s 10 tests, 10 passed, 0 known failure, 0 skipped 588s [inst/manova1.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/manova1.m 588s ***** demo 588s load carbig 588s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 588s ***** test 588s load carbig 588s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 588s assert (d, 3); 588s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 588s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 588s ***** test 588s load carbig 588s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 588s assert (d, 2); 588s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 588s [1e-12, 1e-12, 1e-12]'); 588s 2 tests, 2 passed, 0 known failure, 0 skipped 588s [inst/knnsearch.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/knnsearch.m 588s ***** demo 588s ## find 10 nearest neighbour of a point using different distance metrics 588s ## and compare the results by plotting 588s load fisheriris 588s X = meas(:,3:4); 588s Y = species; 588s point = [5, 1.45]; 588s 588s ## calculate 10 nearest-neighbours by minkowski distance 588s [id, d] = knnsearch (X, point, "K", 10); 588s 588s ## calculate 10 nearest-neighbours by minkowski distance 588s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 588s 588s ## calculate 10 nearest-neighbours by chebychev distance 588s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 588s 588s ## plotting the results 588s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 588s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 588s xlabel("Petal length (cm)"); 588s ylabel("Petal width (cm)"); 588s 588s line (point(1), point(2), "marker", "X", "color", "k", ... 588s "linewidth", 2, "displayname", "query point") 588s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 588s "linestyle", "none", "markersize", 10, "displayname", "eulcidean") 588s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 588s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 588s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 588s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 588s xlim ([4.5 5.5]); 588s ylim ([1 2]); 588s axis square; 588s ***** demo 588s ## knnsearch on iris dataset using kdtree method 588s load fisheriris 588s X = meas(:,3:4); 588s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 588s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 588s 588s ## new point to be predicted 588s point = [5 1.45]; 588s 588s line (point(1), point(2), "marker", "X", "color", "k", ... 588s "linewidth", 2, "displayname", "query point") 588s 588s ## knnsearch using kdtree method 588s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 588s 588s ## plotting predicted neighbours 588s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 588s "linestyle", "none", "markersize", 10, ... 588s "displayname", "nearest neighbour") 588s xlim ([4 6]) 588s ylim ([1 3]) 588s axis square 588s ## details of predicted labels 588s tabulate (species(idx)) 588s 588s ctr = point - d(end); 588s diameter = 2 * d(end); 588s ## Draw a circle around the 10 nearest neighbors. 588s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 588s 588s ## here only 8 neighbours are plotted instead of 10 since the dataset 588s ## contains duplicate values 588s ***** shared X, Y 588s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 588s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * sqrt (2)); 588s ***** test 588s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 588s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * sqrt (2)); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 588s assert (iscell (idx), true); 588s assert (iscell (D), true) 588s assert (idx {1}, [1]); 588s assert (idx {2}, [1, 2]); 588s assert (D{1}, ones (1, 1) * sqrt (2)); 588s assert (D{2}, ones (1, 2) * sqrt (2)); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 588s assert (idx, [1, 2; 1, 2]); 588s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * sqrt (2)); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 588s assert (idx, [1, 2; 1, 2]); 588s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 588s ***** test 588s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 588s yy = [2, 4; 2, 6]; 588s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 588s assert (idx, [3; 2]); 588s assert (D, [0; 3.162277660168377], 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * sqrt (2)); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 588s assert (idx, [1; 1]); 588s assert (D, [2; 2]); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 588s assert (idx, [1; 1]); 588s assert (D, [1; 1]); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 588s assert (idx, [2; 3]); 588s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 588s assert (idx, [1; 1]); 588s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 588s assert (idx, [1; 1]); 588s assert (D, [0.5; 0.5]); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 588s assert (idx, [1; 1]); 588s assert (D, [0.5; 0.5]); 588s ***** test 588s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 588s assert (idx, [1, 2; 1, 2]); 588s assert (D, [0.5, 1; 0.5, 0.5]); 588s ***** test 588s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 588s b = [1, 1]; 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 588s assert (iscell (idx), true); 588s assert (iscell (D), true) 588s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 588s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 588s ***** test 588s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 588s b = [1, 1]; 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 588s assert (iscell (idx), true); 588s assert (iscell (D), true) 588s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 588s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000],1e-4); 588s ***** test 588s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 588s b = [1, 1]; 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 588s assert (iscell (idx), false); 588s assert (iscell (D), false) 588s assert (idx, [4, 2, 3, 6, 1]); 588s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 588s ***** test 588s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 588s b = [1, 1]; 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 588s assert (iscell (idx), false); 588s assert (iscell (D), false) 588s assert (idx, [4, 2, 3, 6, 1]); 588s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000],1e-4); 588s ***** test 588s load fisheriris 588s a = meas; 588s b = min(meas); 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 588s assert (idx, [42, 9, 14, 39, 13]); 588s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874],1e-4); 588s ***** test 588s load fisheriris 588s a = meas; 588s b = mean(meas); 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 588s assert (idx, [65, 83, 89, 72, 100]); 588s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625],1e-4); 588s ***** test 588s load fisheriris 588s a = meas; 588s b = max(meas); 588s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 588s assert (idx, [118, 132, 110, 106, 136]); 588s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 588s 588s ***** test 588s load fisheriris 588s a = meas; 588s b = max(meas); 588s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 588s assert ( iscell (idx), true); 588s assert ( iscell (D), true); 588s assert (cell2mat (idx), [118, 132, 110, 106, 136]); 588s assert (cell2mat (D), [0.7280, 0.9274, 1.3304, 1.5166, 1.6371],1e-4); 588s ***** error knnsearch (1) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (4)) 588s ***** error ... 588s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "P",-2) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 588s ***** error ... 588s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 588s 42 tests, 42 passed, 0 known failure, 0 skipped 588s [inst/linkage.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/linkage.m 588s ***** shared x, t 588s x = reshape (mod (magic (6),5), [], 3); 588s t = 1e-6; 588s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 588s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 588s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 588s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 588s lastwarn(); # Clear last warning before the test 588s ***** warning linkage (pdist (x), "centroid"); 588s ***** test 588s warning off Octave:clustering 588s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 588s warning on Octave:clustering 588s ***** warning linkage (pdist (x), "median"); 588s ***** test 588s warning off Octave:clustering 588s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 588s warning on Octave:clustering 588s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 588s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 588s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 588s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 588s 12 tests, 12 passed, 0 known failure, 0 skipped 588s [inst/ttest.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ttest.m 588s ***** test 588s x = 8:0.1:12; 588s [h, pval, ci] = ttest (x, 10); 588s assert (h, 0) 588s assert (pval, 1, 10*eps) 588s assert (ci, [9.6219 10.3781], 1E-5) 588s [h, pval, ci0] = ttest (x, 0); 588s assert (h, 1) 588s assert (pval, 0) 588s assert (ci0, ci, 2e-15) 588s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 588s assert (h, 0) 588s assert (pval, 0.5, 10*eps) 588s assert (ci, [9.68498 Inf], 1E-5) 588s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 588s ***** error ttest ([8:0.1:12], 10, "tail", 25); 588s 3 tests, 3 passed, 0 known failure, 0 skipped 588s [inst/@cvpartition/set.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/set.m 588s ***** shared C 588s C = cvpartition (ones (10, 1), "KFold", 5); 588s ***** test 588s Cnew = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 588s assert (get (Cnew, "inds"), [1 2 2 2 3 4 3 4 5 5]'); 588s ***** error set (C) 588s ***** error set (C, "NumObservations") 588s ***** error set (C, "some", 15) 588s ***** error set (C, 15, 15) 588s 5 tests, 5 passed, 0 known failure, 0 skipped 588s [inst/@cvpartition/display.m] 588s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/display.m 588s ***** test 588s C = cvpartition (ones (10, 1), "KFold", 5); 588s s = evalc ("display (C)"); 588s sout = "K-fold cross validation partition"; 588s assert (strcmpi (s(1:length (sout)), sout), true); 588s ***** test 588s C = cvpartition (ones (10, 1), "HoldOut", 5); 588s s = evalc ("display (C)"); 588s sout = "HoldOut cross validation partition"; 588s assert (strcmpi (s(1:length (sout)), sout), true); 588s ***** test 588s C = cvpartition (ones (10, 1), "LeaveOut", 5); 588s s = evalc ("display (C)"); 588s sout = "Leave-One-Out cross validation partition"; 588s assert (strcmpi (s(1:length (sout)), sout), true); 589s ***** test 589s C = cvpartition (ones (10, 1), "resubstitution", 5); 589s s = evalc ("display (C)"); 589s sout = "Resubstitution cross validation partition"; 589s assert (strcmpi (s(1:length (sout)), sout), true); 589s ***** test 589s C = cvpartition (ones (10, 1), "Given", 5); 589s s = evalc ("display (C)"); 589s sout = "Given cross validation partition"; 589s assert (strcmpi (s(1:length (sout)), sout), true); 589s ***** error display () 589s 6 tests, 6 passed, 0 known failure, 0 skipped 589s [inst/@cvpartition/get.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/get.m 589s ***** shared C 589s C = cvpartition (ones (10, 1), "KFold", 5); 589s ***** assert (get (C, "NumObservations"), 10); 589s ***** assert (get (C, "NumTestSets"), 5); 589s ***** assert (get (C, "TrainSize"), ones(5,1) * 8); 589s ***** assert (get (C, "TestSize"), ones (5,1) * 2); 589s ***** assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 589s ***** assert (get (C, "Type"), "kfold"); 589s ***** error get (C, "some") 589s ***** error get (C, 25) 589s ***** error get (C, {25}) 589s 9 tests, 9 passed, 0 known failure, 0 skipped 589s [inst/@cvpartition/repartition.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/repartition.m 589s ***** test 589s C = cvpartition (ones (10, 1), "KFold", 5); 589s Cnew = repartition (C); 589s assert (isa (Cnew, "cvpartition"), true); 589s ***** test 589s C = cvpartition (ones (100, 1), "HoldOut", 5); 589s Cnew = repartition (C); 589s indC = get (C, "inds"); 589s indCnew = get (Cnew, "inds"); 589s assert (isequal (indC, indCnew), false); 589s 2 tests, 2 passed, 0 known failure, 0 skipped 589s [inst/@cvpartition/test.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/test.m 589s ***** shared C 589s C = cvpartition (ones (10, 1), "KFold", 5); 589s ***** assert (test (C, 1), logical ([1 1 0 0 0 0 0 0 0 0]')) 589s ***** assert (test (C, 2), logical ([0 0 1 1 0 0 0 0 0 0]')) 589s ***** assert (test (C, 3), logical ([0 0 0 0 1 1 0 0 0 0]')) 589s ***** assert (test (C, 4), logical ([0 0 0 0 0 0 1 1 0 0]')) 589s ***** assert (test (C, 5), logical ([0 0 0 0 0 0 0 0 1 1]')) 589s ***** test 589s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 589s ***** assert (test (C), logical ([1 0 0 0 0 0 0 0 0 0]')) 589s ***** assert (test (C, 2), logical ([0 1 1 1 0 0 0 0 0 0]')) 589s ***** assert (test (C, 3), logical ([0 0 0 0 1 0 1 0 0 0]')) 589s 9 tests, 9 passed, 0 known failure, 0 skipped 589s [inst/@cvpartition/training.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/training.m 589s ***** shared C 589s C = cvpartition (ones (10, 1), "KFold", 5); 589s ***** assert (training (C, 1), logical ([0 0 1 1 1 1 1 1 1 1]')) 589s ***** assert (training (C, 2), logical ([1 1 0 0 1 1 1 1 1 1]')) 589s ***** assert (training (C, 3), logical ([1 1 1 1 0 0 1 1 1 1]')) 589s ***** assert (training (C, 4), logical ([1 1 1 1 1 1 0 0 1 1]')) 589s ***** assert (training (C, 5), logical ([1 1 1 1 1 1 1 1 0 0]')) 589s ***** test 589s C = set (C, "inds", [1 2 2 2 3 4 3 4 5 5]'); 589s ***** assert (training (C), logical ([0 1 1 1 1 1 1 1 1 1]')) 589s ***** assert (training (C, 2), logical ([1 0 0 0 1 1 1 1 1 1]')) 589s ***** assert (training (C, 3), logical ([1 1 1 1 0 1 0 1 1 1]')) 589s 9 tests, 9 passed, 0 known failure, 0 skipped 589s [inst/@cvpartition/cvpartition.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/@cvpartition/cvpartition.m 589s ***** demo 589s ## Partition with Fisher iris dataset (n = 150) 589s ## Stratified by species 589s load fisheriris 589s y = species; 589s ## 10-fold cross-validation partition 589s c = cvpartition (species, 'KFold', 10) 589s ## leave-10-out partition 589s c1 = cvpartition (species, 'HoldOut', 10) 589s idx1 = test (c, 2); 589s idx2 = training (c, 2); 589s ## another leave-10-out partition 589s c2 = repartition (c1) 589s ***** test 589s C = cvpartition (ones (10, 1)); 589s assert (isa (C, "cvpartition"), true); 589s ***** test 589s C = cvpartition (ones (10, 1), "KFold", 5); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 5); 589s assert (get (C, "TrainSize"), ones(5,1) * 8); 589s assert (get (C, "TestSize"), ones (5,1) * 2); 589s assert (get (C, "inds"), [1 1 2 2 3 3 4 4 5 5]'); 589s assert (get (C, "Type"), "kfold"); 589s ***** test 589s C = cvpartition (ones (10, 1), "KFold", 2); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 2); 589s assert (get (C, "TrainSize"), [5; 5]); 589s assert (get (C, "TestSize"), [5; 5]); 589s assert (get (C, "inds"), [1 1 1 1 1 2 2 2 2 2]'); 589s assert (get (C, "Type"), "kfold"); 589s ***** test 589s C = cvpartition (ones (10, 1), "HoldOut", 5); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 1); 589s assert (get (C, "TrainSize"), 5); 589s assert (get (C, "TestSize"), 5); 589s assert (class (get (C, "inds")), "logical"); 589s assert (length (get (C, "inds")), 10); 589s assert (get (C, "Type"), "holdout"); 589s ***** test 589s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "LeaveOut", 5); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 10); 589s assert (get (C, "TrainSize"), ones (10, 1)); 589s assert (get (C, "TestSize"), ones (10, 1) * 9); 589s assert (get (C, "inds"), []); 589s assert (get (C, "Type"), "leaveout"); 589s ***** test 589s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "resubstitution", 5); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 1); 589s assert (get (C, "TrainSize"), 10); 589s assert (get (C, "TestSize"), 10); 589s assert (get (C, "inds"), []); 589s assert (get (C, "Type"), "resubstitution"); 589s ***** test 589s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "Given", 2); 589s assert (get (C, "NumObservations"), 10); 589s assert (get (C, "NumTestSets"), 10); 589s assert (get (C, "TrainSize"), ones (10, 1) * 9); 589s assert (get (C, "TestSize"), ones (10, 1)); 589s assert (get (C, "inds"), [1:10]'); 589s assert (get (C, "Type"), "given"); 589s ***** warning ... 589s C = cvpartition ([1 2 3 4 5 6 7 8 9 10], "some", 2); 589s 8 tests, 8 passed, 0 known failure, 0 skipped 589s [inst/fitcsvm.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitcsvm.m 589s ***** demo 589s ## Use a subset of Fisher's iris data set 589s 589s load fisheriris 589s inds = ! strcmp (species, 'setosa'); 589s X = meas(inds, [3,4]); 589s Y = species(inds); 589s 589s ## Train a linear SVM classifier 589s SVMModel = fitcsvm (X, Y) 589s 589s ## Plot a scatter diagram of the data and circle the support vectors. 589s sv = SVMModel.SupportVectors; 589s figure 589s gscatter (X(:,1), X(:,2), Y) 589s hold on 589s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 589s legend ('versicolor', 'virginica', 'Support Vector') 589s hold off 589s ***** test 589s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 589s y = {"a"; "a"; "b"; "b"}; 589s a = fitcsvm (x, y); 589s assert (class (a), "ClassificationSVM"); 589s assert ({a.X, a.Y}, {x, y}) 589s assert (a.NumObservations, 4) 589s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 589s assert (a.ModelParameters.SVMtype, "c_svc") 589s assert (a.ClassNames, {"a"; "b"}) 589s ***** test 589s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 589s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 589s a = fitcsvm (x, y); 589s assert (class (a), "ClassificationSVM"); 589s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 589s assert (a.ModelParameters.BoxConstraint, 1) 589s assert (a.ModelParameters.KernelOffset, 0) 589s assert (a.ClassNames, [1; -1]) 589s ***** test 589s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 589s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 589s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 589s "KernelOffset", 2); 589s assert (class (a), "ClassificationSVM"); 589s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 589s assert (a.ModelParameters.BoxConstraint, 2) 589s assert (a.ModelParameters.KernelOffset, 2) 589s assert (isempty (a.Alpha), true) 589s assert (isempty (a.Beta), false) 589s ***** test 589s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 589s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 589s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 589s assert (class (a), "ClassificationSVM"); 589s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 589s assert (a.ModelParameters.PolynomialOrder, 3) 589s assert (isempty (a.Alpha), true) 589s assert (isempty (a.Beta), false) 589s ***** test 589s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 589s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 589s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 589s assert (class (a), "ClassificationSVM"); 589s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 589s assert (a.ModelParameters.PolynomialOrder, 3) 589s assert (isempty (a.Alpha), false) 589s assert (isempty (a.Beta), true) 589s ***** test 589s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 589s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 589s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 589s assert (class (a), "ClassificationPartitionedModel"); 589s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 589s assert (a.ModelParameters.PolynomialOrder, 3) 589s assert (isempty (a.Trained{1}.Alpha), false) 589s assert (isempty (a.Trained{1}.Beta), true) 589s ***** error fitcsvm () 589s ***** error fitcsvm (ones (4,1)) 589s ***** error 589s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 589s ***** error 589s fitcsvm (ones (4,2), ones (3, 1)) 589s ***** error 589s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 589s ***** error 589s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 589s ***** error 589s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 589s ***** error ... 589s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 589s 14 tests, 14 passed, 0 known failure, 0 skipped 589s [inst/grp2idx.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/grp2idx.m 589s ***** test 589s in = [true false false true]; 589s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 589s assert (nthargout (1:3, @grp2idx, in), out) 589s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 589s ***** test 589s assert (nthargout (1:3, @grp2idx, [false, true]), 589s {[1; 2] {"0"; "1"} [false; true]}); 589s assert (nthargout (1:3, @grp2idx, [true, false]), 589s {[1; 2] {"1"; "0"} [true; false]}); 589s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 589s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 589s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 589s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 589s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 589s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 589s [1; -3; -2; 2; -1; 3]}); 589s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 589s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 589s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 589s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 589s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 589s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 589s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 589s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 589s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 589s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 589s 10 tests, 10 passed, 0 known failure, 0 skipped 589s [inst/pdist.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/pdist.m 589s ***** shared xy, t, eucl, x 589s xy = [0 1; 0 2; 7 6; 5 6]; 589s t = 1e-3; 589s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 589s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 589s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 589s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 589s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 589s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 589s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 589s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 589s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 589s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 589s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 589s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 589s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 589s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 589s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 589s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 589s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 589s ***** assert (pdist (x, "euclidean"), ... 589s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 589s ***** assert (pdist (x, eucl), ... 589s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 589s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 589s ***** assert (pdist (x, "seuclidean"), ... 589s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 589s ***** warning ... 589s pdist (x, "mahalanobis"); 589s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 589s ***** assert (pdist (x, "minkowski"), ... 589s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 589s ***** assert (pdist (x, "minkowski", 3), ... 589s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 589s ***** assert (pdist (x, "cosine"), ... 589s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 589s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 589s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 589s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 589s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 589s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 589s 29 tests, 29 passed, 0 known failure, 0 skipped 589s [inst/canoncorr.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/canoncorr.m 589s ***** shared X,Y,A,B,r,U,V,k 589s k = 10; 589s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 589s [A,B,r,U,V,stats] = canoncorr (X,Y); 589s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 589s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 589s ***** assert (r, [0.99590 0.26754], 1E-5); 589s ***** assert (U, center(X) * A, 10*eps); 589s ***** assert (V, center(Y) * B, 10*eps); 589s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 589s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 589s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 589s ***** assert (r, ones(1, 5), 10*eps); 589s 8 tests, 8 passed, 0 known failure, 0 skipped 589s [inst/friedman.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/friedman.m 589s ***** demo 589s load popcorn; 589s friedman (popcorn, 3); 589s ***** demo 589s load popcorn; 589s [p, atab] = friedman (popcorn, 3, "off"); 589s disp (p); 589s ***** test 589s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 589s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 589s [p, atab] = friedman (popcorn, 3, "off"); 589s assert (p, 0.001028853354594794, 1e-14); 589s assert (atab{2,2}, 99.75, 1e-14); 589s assert (atab{2,3}, 2, 0); 589s assert (atab{2,4}, 49.875, 1e-14); 589s assert (atab{2,5}, 13.75862068965517, 1e-14); 589s assert (atab{2,6}, 0.001028853354594794, 1e-14); 589s assert (atab{3,2}, 0.08333333333333215, 1e-14); 589s assert (atab{3,4}, 0.04166666666666607, 1e-14); 589s assert (atab{4,3}, 12, 0); 589s ***** test 589s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 589s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 589s [p, atab, stats] = friedman (popcorn, 3, "off"); 589s assert (atab{5,2}, 116, 0); 589s assert (atab{5,3}, 17, 0); 589s assert (stats.source, "friedman"); 589s assert (stats.n, 2); 589s assert (stats.meanranks, [8, 4.75, 2.25], 0); 589s assert (stats.sigma, 2.692582403567252, 1e-14); 589s 2 tests, 2 passed, 0 known failure, 0 skipped 589s [inst/pcacov.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/pcacov.m 589s ***** demo 589s x = [ 7 26 6 60; 589s 1 29 15 52; 589s 11 56 8 20; 589s 11 31 8 47; 589s 7 52 6 33; 589s 11 55 9 22; 589s 3 71 17 6; 589s 1 31 22 44; 589s 2 54 18 22; 589s 21 47 4 26; 589s 1 40 23 34; 589s 11 66 9 12; 589s 10 68 8 12 589s ]; 589s Kxx = cov (x); 589s [coeff, latent, explained] = pcacov (Kxx) 589s ***** test 589s load hald 589s Kxx = cov (ingredients); 589s [coeff,latent,explained] = pcacov(Kxx); 589s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 589s -0.6785, -0.0200, -0.5440, 0.4933; ... 589s 0.0290, 0.7553, 0.4036, 0.5156; ... 589s 0.7309, -0.1085, -0.4684, 0.4844]; 589s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 589s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 589s assert (coeff, c_out, 1e-4); 589s assert (latent, l_out, 1e-4); 589s assert (explained, e_out, 1e-4); 589s ***** error pcacov (ones (2,3)) 589s ***** error pcacov (ones (3,3,3)) 589s 3 tests, 3 passed, 0 known failure, 0 skipped 589s [inst/pdist2.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/pdist2.m 589s ***** shared x, y, xx 589s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 589s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 589s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 589s ***** test 589s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 589s assert (pdist2 (x, y), d); 589s ***** test 589s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 589s 3.4641, 2.2361, 3.3166, 5.4772]; 589s i = [3, 1, 1, 1; 2, 3, 3, 2]; 589s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 589s 3.4641, 2.2361, 3.3166, 5.4772]; 589s i = [1, 2, 2, 3;2, 1, 1, 2]; 589s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s yy = [1 2 3;5 6 7;9 5 1]; 589s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 589s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 589s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 589s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s yy = [1 2 3;5 6 7;9 5 1]; 589s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 589s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 589s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s yy = [1 2 3;5 6 7;9 5 1]; 589s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 589s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 589s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 589s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 589s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 589s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 589s ***** test 589s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 589s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 589s i = [2, 2, 2; 3, 4, 4]; 589s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 589s i = [1, 1, 3; 4, 3, 1]; 589s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 589s assert ({D, I}, {d, i}, 1e-4); 589s ***** test 589s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 589s assert (pdist2 (x, y, "cityblock"), d); 589s ***** test 589s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 589s assert (pdist2 (x, y, "chebychev"), d); 589s ***** test 589s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 589s assert (pdist2 (x, y, "cosine"), d, 1e-4); 589s ***** test 589s yy = [1 2 3;5 6 7;9 5 1]; 589s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 589s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 589s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 589s assert ({D, I}, {d, i}, eps); 589s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 589s assert ({D, I}, {d, i}, eps); 589s ***** test 589s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 589s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 589s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 589s assert ({D, I}, {d, i}, eps); 589s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 589s assert ({D, I}, {d, i}, eps); 589s ***** test 589s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 589s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 589s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 589s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 589s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 589s assert ({D, I}, {d, i}); 589s ***** warning ... 589s pdist2 (xx, xx, "mahalanobis"); 589s ***** error pdist2 (1) 589s ***** error ... 589s pdist2 (ones (4, 5), ones (4)) 589s ***** error ... 589s pdist2 (ones (4, 2, 3), ones (3, 2)) 589s ***** error ... 589s pdist2 (ones (3), ones (3), "euclidean", "Largest") 589s ***** error ... 589s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 589s ***** error ... 589s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 589s ***** error ... 589s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 589s ***** error ... 589s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 589s ***** error ... 589s pdist2 (ones (3), ones (3), "seuclidean", 3) 589s ***** error ... 589s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 589s ***** error ... 589s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 589s ***** error ... 589s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 589s ***** error ... 589s pdist2 (ones (3), eye (3), "minkowski", 0) 589s ***** error ... 589s pdist2 (ones (3), eye (3), "minkowski", -5) 589s ***** error ... 589s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 589s ***** error ... 589s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 589s ***** error ... 589s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 589s 33 tests, 33 passed, 0 known failure, 0 skipped 589s [inst/anovan.m] 589s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/anovan.m 589s ***** demo 589s 589s # Two-sample unpaired test on independent samples (equivalent to Student's 589s # t-test). Note that the absolute value of t-statistic can be obtained by 589s # taking the square root of the reported F statistic. In this example, 589s # t = sqrt (1.44) = 1.20. 589s 589s score = [54 23 45 54 45 43 34 65 77 46 65]'; 589s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 589s "female" "female" "female"}'; 589s 589s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 589s ***** demo 589s 589s # Two-sample paired test on dependent or matched samples equivalent to a 589s # paired t-test. As for the first example, the t-statistic can be obtained by 589s # taking the square root of the reported F statistic. Note that the interaction 589s # between treatment x subject was dropped from the full model by assigning 589s # subject as a random factor ('). 589s 589s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 589s treatment = {"before" "after"; "before" "after"; "before" "after"; 589s "before" "after"; "before" "after"}'; 589s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 589s 589s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 589s "model", "full", "random", 2, "sstype", 2, ... 589s "varnames", {"treatment", "subject"}, ... 589s "display", "on"); 589s ***** demo 589s 589s # One-way ANOVA on the data from a study on the strength of structural beams, 589s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 589s 589s strength = [82 86 79 83 84 85 86 87 74 82 ... 589s 78 75 76 77 79 79 77 78 82 79]'; 589s alloy = {"st","st","st","st","st","st","st","st", ... 589s "al1","al1","al1","al1","al1","al1", ... 589s "al2","al2","al2","al2","al2","al2"}'; 589s 589s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 589s "varnames", "alloy"); 589s ***** demo 589s 589s # One-way repeated measures ANOVA on the data from a study on the number of 589s # words recalled by 10 subjects for three time condtions, in Loftus & Masson 589s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 589s # between seconds x subject was dropped from the full model by assigning 589s # subject as a random factor ('). 589s 589s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 589s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 589s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 589s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 589s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 589s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 589s 589s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 589s "model", "full", "random", 2, "sstype", 2, ... 589s "display", "on", "varnames", {"seconds", "subject"}); 589s ***** demo 589s 589s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 589s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 589s # New York: MacMillan 589s 589s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 589s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 589s brands = {"Gourmet", "National", "Generic"; ... 589s "Gourmet", "National", "Generic"; ... 589s "Gourmet", "National", "Generic"; ... 589s "Gourmet", "National", "Generic"; ... 589s "Gourmet", "National", "Generic"; ... 589s "Gourmet", "National", "Generic"}; 589s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 589s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 589s 589s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 589s "display", "on", "model", "full", ... 589s "varnames", {"brands", "popper"}); 589s ***** demo 589s 589s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 589s # gender and having a college degree on salaries of company employees, 589s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 589s 589s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 589s 25 29 27 19 18 21 20 21 22 19]'; 589s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 589s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 589s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 589s 589s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 589s "sstype", 3, "display", "on", "varnames", ... 589s {"gender", "degree"}); 589s ***** demo 589s 589s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 589s # adding sugar and/or milk on the tendency of coffee to make people babble, 589s # in from Navarro (2019): 16.10 589s 589s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 589s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 589s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 589s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 589s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 589s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 589s 589s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 589s "sstype", 3, "display", "on", ... 589s "varnames", {"sugar", "milk"}); 589s ***** demo 589s 589s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 589s # of three different drugs, biofeedback and diet on patient blood pressure, 589s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 589s # * Missing values introduced to make the sample sizes unequal to test the 589s # calculation of different types of sums-of-squares 589s 589s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 589s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 589s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 589s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 589s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 589s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 589s 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; 589s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 589s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 589s 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; 589s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 589s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 589s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 589s 173 194 197 190 176 198 164 190 169 164 176 175; 589s 186 194 201 215 219 209 164 166 159 182 187 174 ... 589s 189 194 217 206 199 195 171 173 196 199 180 NaN; 589s 180 187 199 170 204 194 162 184 183 156 180 173 ... 589s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 589s 589s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 589s "model", "full", "sstype", 3, ... 589s "display", "on", ... 589s "varnames", {"drug", "feedback", "diet"}); 589s ***** demo 589s 589s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 589s # factor. The data is from a randomized block design study on the effects 589s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 589s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 589s # Note that all interactions involving block were dropped from the full model 589s # by assigning block as a random factor ('). 589s 589s measurement = [444 614 423 625 408 856 447 719 ... 589s 764 831 586 782 609 1002 606 766]'; 589s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 589s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 589s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 589s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 589s 589s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 589s "sstype", 2, "model", "full", "random", 3, ... 589s "display", "on", ... 589s "varnames", {"strain", "treatment", "block"}); 589s ***** demo 589s 589s # One-way ANCOVA on data from a study of the additive effects of species 589s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 589s # Text eveR 589s 589s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 589s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 589s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 589s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 589s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 589s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 589s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 589s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 589s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 589s 589s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 589s "continuous", 2, "sstype", "h", "display", "on", ... 589s "varnames", {"species", "temp"}); 589s ***** demo 589s 589s # Factorial ANCOVA on data from a study of the effects of treatment and 589s # exercise on stress reduction score after adjusting for age. Data from R 589s # datarium package). 589s 589s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 589s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 589s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 589s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 589s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 589s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 589s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 589s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 589s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 589s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 589s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 589s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 589s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 589s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 589s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 589s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 589s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 589s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 589s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 589s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 589s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 589s 589s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 589s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 589s "continuous", 3, "sstype", "h", "display", "on", ... 589s "varnames", {"treatment", "exercise", "age"}); 589s ***** demo 589s 589s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 589s # relating to the contrasts are shown in the table of model parameters, and 589s # can be retrieved from the STATS.coeffs output. 589s 589s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 589s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 589s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 589s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 589s 25.694 ]'; 589s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 589s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 589s C = [ 0.4001601 0.3333333 0.5 0.0 589s 0.4001601 0.3333333 -0.5 0.0 589s 0.4001601 -0.6666667 0.0 0.0 589s -0.6002401 0.0000000 0.0 0.5 589s -0.6002401 0.0000000 0.0 -0.5]; 589s 589s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 589s "alpha", 0.05, "display", "on"); 589s ***** demo 589s 589s # One-way ANOVA with the linear model fit by weighted least squares to 589s # account for heteroskedasticity. In this example, the variance appears 589s # proportional to the outcome, so weights have been estimated by initially 589s # fitting the model without weights and regressing the absolute residuals on 589s # the fitted values. Although this data could have been analysed by Welch's 589s # ANOVA test, the approach here can generalize to ANOVA models with more than 589s # one factor. 589s 589s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 589s 2, 2, 2, 2, 2, 2, 2, 2, ... 589s 3, 3, 3, 3, 3, 3, 3, 3]'; 589s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 589s 10, 25, 66, 43, 47, 56, 6, 39, ... 589s 11, 39, 26, 35, 25, 14, 24, 17]'; 589s 589s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 589s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 589s b = polyfit (fitted, abs (STATS.resid), 1); 589s v = polyval (b, fitted); # Variance as a function of the fitted values 589s figure("Name", "Regression of the absolute residuals on the fitted values"); 589s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 589s xlabel("Fitted values"); ylabel("Absolute residuals"); 589s 589s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 589s ***** test 589s score = [54 23 45 54 45 43 34 65 77 46 65]'; 589s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 589s 'female' 'female' 'female'}'; 589s 589s [P, T, STATS] = anovan (score,gender,'display','off'); 589s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 589s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 589s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 589s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 589s ***** test 589s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 589s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 589s 'before' 'after'; 'before' 'after'}'; 589s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 589s 589s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 589s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 589s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 589s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 589s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 589s ***** test 589s strength = [82 86 79 83 84 85 86 87 74 82 ... 589s 78 75 76 77 79 79 77 78 82 79]'; 589s alloy = {'st','st','st','st','st','st','st','st', ... 589s 'al1','al1','al1','al1','al1','al1', ... 589s 'al2','al2','al2','al2','al2','al2'}'; 589s 589s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 589s assert (P(1), 0.000152643638830491, 1e-09); 589s assert (ATAB{2,6}, 15.4, 1e-09); 589s ***** test 589s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 589s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 589s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 589s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 589s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 589s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 589s 589s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 589s assert (P(1), 1.51865926758752e-07, 1e-09); 589s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 589s assert (ATAB{3,2}, 942.533333333333, 1e-09); 589s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 589s ***** test 589s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 589s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 589s brands = {'Gourmet', 'National', 'Generic'; ... 589s 'Gourmet', 'National', 'Generic'; ... 589s 'Gourmet', 'National', 'Generic'; ... 589s 'Gourmet', 'National', 'Generic'; ... 589s 'Gourmet', 'National', 'Generic'; ... 589s 'Gourmet', 'National', 'Generic'}; 589s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 589s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 589s 589s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 589s assert (P(1), 7.67895738278171e-07, 1e-09); 589s assert (P(2), 0.000100373896304998, 1e-09); 589s assert (P(3), 0.746215396636649, 1e-09); 589s assert (ATAB{2,6}, 56.7, 1e-09); 589s assert (ATAB{3,6}, 32.4, 1e-09); 589s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 589s ***** test 589s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 589s 25 29 27 19 18 21 20 21 22 19]'; 589s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 589s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 589s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 589s 589s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 589s assert (P(1), 0.747462549227232, 1e-09); 589s assert (P(2), 1.03809316857694e-08, 1e-09); 589s assert (P(3), 0.523689833702691, 1e-09); 589s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 589s assert (ATAB{3,2}, 272.391841491841, 1e-09); 589s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 589s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 589s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 589s assert (P(1), 2.53445097305047e-08, 1e-09); 589s assert (P(2), 0.00388133678528749, 1e-09); 589s assert (P(3), 0.523689833702671, 1e-09); 589s assert (ATAB{2,2}, 242.227272727273, 1e-09); 589s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 589s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 589s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 589s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 589s assert (P(1), 0.00388133678528743, 1e-09); 589s assert (P(2), 1.03809316857694e-08, 1e-09); 589s assert (P(3), 0.523689833702691, 1e-09); 589s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 589s assert (ATAB{3,2}, 272.391841491841, 1e-09); 589s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 589s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 589s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 589s assert (P(1), 0.00442898146583742, 1e-09); 589s assert (P(2), 1.30634252053587e-08, 1e-09); 589s assert (P(3), 0.523689833702691, 1e-09); 589s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 589s assert (ATAB{3,2}, 264.335664335664, 1e-09); 589s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 589s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 590s ***** test 590s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 590s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 590s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 590s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 590s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 590s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 590s 590s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 590s assert (P(1), 0.0108632139833963, 1e-09); 590s assert (P(2), 0.0810606976703546, 1e-09); 590s assert (P(3), 0.00175433329935627, 1e-09); 590s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 590s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 590s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 590s assert (ATAB{5,2}, 3.1625, 1e-09); 590s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 590s assert (P(1), 0.0373333189297505, 1e-09); 590s assert (P(2), 0.017075098787169, 1e-09); 590s assert (P(3), 0.00175433329935627, 1e-09); 590s assert (ATAB{2,2}, 1.444, 1e-09); 590s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 590s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 590s assert (ATAB{5,2}, 3.1625, 1e-09); 590s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 590s assert (P(1), 0.017075098787169, 1e-09); 590s assert (P(2), 0.0810606976703546, 1e-09); 590s assert (P(3), 0.00175433329935627, 1e-09); 590s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 590s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 590s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 590s assert (ATAB{5,2}, 3.1625, 1e-09); 590s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 590s assert (P(1), 0.0454263063473954, 1e-09); 590s assert (P(2), 0.0746719907091438, 1e-09); 590s assert (P(3), 0.00175433329935627, 1e-09); 590s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 590s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 590s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 590s assert (ATAB{5,2}, 3.1625, 1e-09); 590s ***** test 590s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 590s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 590s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 590s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 590s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 590s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 590s 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; 590s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 590s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 590s 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; 590s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 590s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 590s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 590s 173 194 197 190 176 198 164 190 169 164 176 175; 590s 186 194 201 215 219 209 164 166 159 182 187 174 ... 590s 189 194 217 206 199 195 171 173 196 199 180 NaN; 590s 180 187 199 170 204 194 162 184 183 156 180 173 ... 590s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 590s 590s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 590s assert (P(1), 7.02561843825325e-05, 1e-09); 590s assert (P(2), 0.000425806013389362, 1e-09); 590s assert (P(3), 6.16780773446401e-07, 1e-09); 590s assert (P(4), 0.261347622678438, 1e-09); 590s assert (P(5), 0.0542278432357043, 1e-09); 590s assert (P(6), 0.590353225626655, 1e-09); 590s assert (P(7), 0.0861628249564267, 1e-09); 590s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 590s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 590s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 590s assert (ATAB{5,2}, 437.066007908781, 1e-09); 590s assert (ATAB{6,2}, 976.180770397332, 1e-09); 590s assert (ATAB{7,2}, 46.616653365254, 1e-09); 590s assert (ATAB{8,2}, 814.345251396648, 1e-09); 590s assert (ATAB{9,2}, 9065.8, 1e-09); 590s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 590s assert (P(1), 9.4879638470754e-05, 1e-09); 590s assert (P(2), 0.00124177666315809, 1e-09); 590s assert (P(3), 6.86162012732911e-07, 1e-09); 590s assert (P(4), 0.260856132341256, 1e-09); 590s assert (P(5), 0.0523758623892078, 1e-09); 590s assert (P(6), 0.590353225626655, 1e-09); 590s assert (P(7), 0.0861628249564267, 1e-09); 590s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 590s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 590s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 590s assert (ATAB{5,2}, 437.693674777847, 1e-09); 590s assert (ATAB{6,2}, 988.431929811402, 1e-09); 590s assert (ATAB{7,2}, 46.616653365254, 1e-09); 590s assert (ATAB{8,2}, 814.345251396648, 1e-09); 590s assert (ATAB{9,2}, 9065.8, 1e-09); 590s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 590s assert (P(1), 0.000106518678028207, 1e-09); 590s assert (P(2), 0.00125371366571508, 1e-09); 590s assert (P(3), 5.30813260778464e-07, 1e-09); 590s assert (P(4), 0.308353667232981, 1e-09); 590s assert (P(5), 0.0562901327343161, 1e-09); 590s assert (P(6), 0.599091042141092, 1e-09); 590s assert (P(7), 0.0861628249564267, 1e-09); 590s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 590s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 590s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 590s assert (ATAB{5,2}, 382.07709497207, 1e-09); 590s assert (ATAB{6,2}, 963.037988826813, 1e-09); 590s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 590s assert (ATAB{8,2}, 814.345251396648, 1e-09); 590s assert (ATAB{9,2}, 9065.8, 1e-09); 590s ***** test 590s measurement = [444 614 423 625 408 856 447 719 ... 590s 764 831 586 782 609 1002 606 766]'; 590s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 590s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 590s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 590s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 590s 590s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 590s assert (P(1), 0.0914352969909372, 1e-09); 590s assert (P(2), 5.04077373924908e-05, 1e-09); 590s assert (P(4), 0.0283196918836667, 1e-09); 590s assert (ATAB{2,2}, 286.132500000002, 1e-09); 590s assert (ATAB{3,2}, 2275.29, 1e-09); 590s assert (ATAB{4,2}, 1242.5625, 1e-09); 590s assert (ATAB{5,2}, 495.905000000001, 1e-09); 590s assert (ATAB{6,2}, 207.007499999999, 1e-09); 590s ***** test 590s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 590s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 590s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 590s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 590s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 590s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 590s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 590s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 590s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 590s 590s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 590s assert (P(1), 6.27153318786007e-14, 1e-09); 590s assert (P(2), 2.48773241196644e-25, 1e-09); 590s assert (ATAB{2,2}, 598.003953318404, 1e-09); 590s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 590s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 590s assert (ATAB{2,6}, 187.399388123951, 1e-09); 590s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 590s ***** test 590s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 590s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 590s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 590s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 590s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 590s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 590s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 590s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 590s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 590s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 590s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 590s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 590s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 590s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 590s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 590s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 590s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 590s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 590s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 590s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 590s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 590s 590s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 590s assert (P(5), 0.9245630968248468, 1e-09); 590s assert (P(6), 0.791115159521822, 1e-09); 590s assert (P(7), 0.9296668751457956, 1e-09); 590s [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'); 590s assert (P(1), 0.00158132928938933, 1e-09); 590s assert (P(2), 2.12537505039986e-07, 1e-09); 590s assert (P(3), 0.00390292555160047, 1e-09); 590s assert (P(4), 0.0164086580775543, 1e-09); 590s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 590s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 590s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 590s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 590s ***** test 590s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 590s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 590s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 590s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 590s 25.694 ]'; 590s 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]'; 590s C = [ 0.4001601 0.3333333 0.5 0.0 590s 0.4001601 0.3333333 -0.5 0.0 590s 0.4001601 -0.6666667 0.0 0.0 590s -0.6002401 0.0000000 0.0 0.5 590s -0.6002401 0.0000000 0.0 -0.5]; 590s 590s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 590s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 590s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 590s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 590s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 590s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 590s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 590s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 590s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 590s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 590s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 590s assert (STATS.coeffs(1,5), 40.161, 1e-03); 590s assert (STATS.coeffs(2,5), -9.624, 1e-03); 590s assert (STATS.coeffs(3,5), -3.825, 1e-03); 590s assert (STATS.coeffs(4,5), -4.875, 1e-03); 590s assert (STATS.coeffs(5,5), -5.515, 1e-03); 590s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 590s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 590s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 590s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 590s 12 tests, 12 passed, 0 known failure, 0 skipped 590s [inst/dcov.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dcov.m 590s ***** demo 590s base=@(x) (x- min(x))./(max(x)-min(x)); 590s N = 5e2; 590s x = randn (N,1); x = base (x); 590s z = randn (N,1); z = base (z); 590s # Linear relations 590s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 590s ly = x .* cy; 590s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 590s # Correlated Gaussian 590s cz = 1 - abs (cy); 590s gy = base ( ly + cz.*z); 590s # Shapes 590s sx = repmat (x,1,7); 590s sy = zeros (size (ly)); 590s v = 2 * rand (size(x,1),2) - 1; 590s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 590s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 590s tmp = R(35) * v.'; 590s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 590s tmp = R(45) * v.'; 590s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 590s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 590s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 590s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 590s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 590s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 590s sy = base (sy); 590s sx = base (sx); 590s # scaled shape 590s sc = 1/3; 590s ssy = (sy-0.5) * sc + 0.5; 590s n = size (ly,2); 590s ym = 1.2; 590s xm = 0.5; 590s fmt={'horizontalalignment','center'}; 590s ff = "% .2f"; 590s figure (1) 590s for i=1:n 590s subplot(4,n,i); 590s plot (x, gy(:,i), '.b'); 590s axis tight 590s axis off 590s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 590s 590s subplot(4,n,i+n); 590s plot (x, ly(:,i), '.b'); 590s axis tight 590s axis off 590s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 590s 590s subplot(4,n,i+2*n); 590s plot (sx(:,i), sy(:,i), '.b'); 590s axis tight 590s axis off 590s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 590s v = axis (); 590s 590s subplot(4,n,i+3*n); 590s plot (sx(:,i), ssy(:,i), '.b'); 590s axis (v) 590s axis off 590s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 590s endfor 590s ***** error dcov (randn (30, 5), randn (25,5)) 590s 1 test, 1 passed, 0 known failure, 0 skipped 590s [inst/kruskalwallis.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/kruskalwallis.m 590s ***** demo 590s x = meshgrid (1:6); 590s x = x + normrnd (0, 1, 6, 6); 590s kruskalwallis (x, [], 'off'); 590s ***** demo 590s x = meshgrid (1:6); 590s x = x + normrnd (0, 1, 6, 6); 590s [p, atab] = kruskalwallis(x); 590s ***** demo 590s x = ones (30, 4) .* [-2, 0, 1, 5]; 590s x = x + normrnd (0, 2, 30, 4); 590s group = {"A", "B", "C", "D"}; 590s kruskalwallis (x, group); 590s ***** test 590s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 590s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 590s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 590s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 590s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 590s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 590s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 590s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 590s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 590s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 590s group = [1:10] .* ones (10,10); 590s group = group(:); 590s [p, tbl] = kruskalwallis (data, group, "off"); 590s assert (p, 0.048229, 1e-6); 590s assert (tbl{2,5}, 17.03124, 1e-5); 590s assert (tbl{2,3}, 9, 0); 590s assert (tbl{4,2}, 82655.5, 1e-16); 590s data = reshape (data, 10, 10); 590s [p, tbl, stats] = kruskalwallis (data, [], "off"); 590s assert (p, 0.048229, 1e-6); 590s assert (tbl{2,5}, 17.03124, 1e-5); 590s assert (tbl{2,3}, 9, 0); 590s assert (tbl{4,2}, 82655.5, 1e-16); 590s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 590s N = 10 * ones (1, 10); 590s assert (stats.meanranks, means, 1e-6); 590s assert (length (stats.gnames), 10, 0); 590s assert (stats.n, N, 0); 590s 1 test, 1 passed, 0 known failure, 0 skipped 590s [inst/manovacluster.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/manovacluster.m 590s ***** demo 590s load carbig 590s X = [MPG Acceleration Weight Displacement]; 590s [d, p, stats] = manova1 (X, Origin); 590s manovacluster (stats) 590s ***** test 590s hf = figure ("visible", "off"); 590s unwind_protect 590s load carbig 590s X = [MPG Acceleration Weight Displacement]; 590s [d, p, stats] = manova1 (X, Origin); 590s manovacluster (stats); 590s unwind_protect_cleanup 590s close (hf); 590s end_unwind_protect 590s ***** error manovacluster (stats, "some"); 590s 2 tests, 2 passed, 0 known failure, 0 skipped 590s [inst/bar3h.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/bar3h.m 590s ***** demo 590s ## Ploting 5 bars in the same series. 590s 590s y = [50; 40; 30; 20; 10]; 590s bar3h (y); 590s ***** demo 590s ## Ploting 5 bars in different groups. 590s 590s y = [50, 40, 30, 20, 10]; 590s bar3h (y); 590s ***** demo 590s ## A 3D bar graph with each series corresponding to a column in y. 590s 590s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 590s bar3h (y); 590s ***** demo 590s ## Specify z-axis locations as tick names. z must be a column vector! 590s 590s z = [1950, 1960, 1970, 1980, 1990]'; 590s y = [16, 8, 4, 2, 1]'; 590s bar3h (z, y); 590s ***** demo 590s ## Plot 3 series as a grouped plot without any space between the grouped bars 590s 590s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 590s bar3h (y, 1, 'grouped'); 590s ***** demo 590s ## Plot a stacked style 3D bar graph 590s 590s y = [19, 30, 21, 30; 40, 16, 32, 12]; 590s b = bar3h (y, 0.5, 'stacked'); 590s ***** error bar3h ("A") 590s ***** error bar3h ({2,3,4,5}) 590s ***** error ... 590s bar3h ([1,2,3]', ones (2)) 590s ***** error ... 590s bar3h ([1:5], 1.2) 590s ***** error ... 590s bar3h ([1:5]', ones (5), 1.2) 590s ***** error ... 590s bar3h ([1:5]', ones (5), [0.8, 0.7]) 590s ***** error ... 590s bar3h (ones (5), 'width') 590s ***** error ... 590s bar3h (ones (5), 'width', 1.2) 590s ***** error ... 590s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 590s ***** error ... 590s bar3h (ones (5), 'color') 590s ***** error ... 590s bar3h (ones (5), 'color', [0.8, 0.8]) 590s ***** error ... 590s bar3h (ones (5), 'color', "brown") 590s ***** error ... 590s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 590s ***** error ... 590s bar3h (ones (5), 'xlabel') 590s ***** error ... 590s bar3h (ones (5), 'xlabel', 4) 590s ***** error ... 590s bar3h (ones (5), 'zlabel') 590s ***** error ... 590s bar3h (ones (5), 'zlabel', 4) 590s ***** error bar3h (ones (5), 'this', 4) 590s ***** error ... 590s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 590s ***** error ... 590s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 590s 20 tests, 20 passed, 0 known failure, 0 skipped 590s [inst/qrandn.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/qrandn.m 590s ***** demo 590s z = qrandn (-5, 5e6); 590s [c x] = hist (z,linspace(-1.5,1.5,200),1); 590s figure(1) 590s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 590s 590s z = qrandn (-0.14286, 5e6); 590s [c x] = hist (z,linspace(-2,2,200),1); 590s figure(2) 590s plot(x,c,"r."); axis tight; axis([-2,2]); 590s 590s z = qrandn (2.75, 5e6); 590s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 590s figure(3) 590s semilogy(x,c,"r."); axis tight; axis([-100,100]); 590s 590s # --------- 590s # Figures from the reference paper. 590s ***** error qrandn ([1 2], 1) 590s ***** error qrandn (4, 1) 590s ***** error qrandn (3, 1) 590s ***** error qrandn (2.5, 1, 2, 3) 590s ***** error qrandn (2.5) 590s ***** test 590s q = 1.5; 590s s = [2, 3]; 590s z = qrandn (q, s); 590s assert (isnumeric (z) && isequal (size (z), s)); 590s 6 tests, 6 passed, 0 known failure, 0 skipped 590s [inst/ismissing.m] 590s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ismissing.m 590s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 590s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 590s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 590s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 590s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 590s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 590s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 590s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 590s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 590s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 590s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 590s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 590s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 590s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 590s ***** assert (ismissing (double (NaN)), true) 590s ***** assert (ismissing (single (NaN)), true) 590s ***** assert (ismissing (' '), true) 590s ***** assert (ismissing ({''}), true) 590s ***** assert (ismissing ({' '}), false) 590s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 590s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 590s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 590s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 590s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 590s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 590s ***** assert (ismissing ({'123', '', 123}), [false false false]) 590s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 590s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 590s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 590s ***** assert (ismissing ({1, 2, 3}), [false false false]) 590s ***** assert (ismissing ([struct struct struct]), [false false false]) 590s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 590s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 590s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 590s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 590s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 590s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 590s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 590s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 590s ***** assert (ismissing ([]), logical([])) 590s ***** assert (ismissing (''), logical([])) 590s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 590s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 591s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 591s ***** error ismissing () 591s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 591s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 591s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 591s ***** error ismissing (struct, 1) 591s 49 tests, 49 passed, 0 known failure, 0 skipped 591s [inst/cophenet.m] 591s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cophenet.m 591s ***** demo 591s randn ("seed", 5) # for reproducibility 591s X = randn (10,2); 591s y = pdist (X); 591s Z = linkage (y, "average"); 591s cophenet (Z, y) 591s ***** error cophenet () 591s ***** error cophenet (1) 591s ***** error ... 591s cophenet (ones (2,2), 1) 591s ***** error ... 591s cophenet ([1 2 1], "a") 591s ***** error ... 591s cophenet ([1 2 1], [1 2]) 591s 5 tests, 5 passed, 0 known failure, 0 skipped 591s [inst/jackknife.m] 591s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/jackknife.m 591s ***** demo 591s for k = 1:1000 591s rand ("seed", k); # for reproducibility 591s x = rand (10, 1); 591s s(k) = std (x); 591s jackstat = jackknife (@std, x); 591s j(k) = 10 * std (x) - 9 * mean (jackstat); 591s endfor 591s figure(); 591s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 591s ***** demo 591s for k = 1:1000 591s randn ("seed", k); # for reproducibility 591s x = randn (1, 50); 591s rand ("seed", k); # for reproducibility 591s y = rand (1, 50); 591s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 591s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 591s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 591s endfor 591s t = (j - sqrt (1 / 12)) ./ sqrt (v); 591s figure(); 591s plot (sort (tcdf (t, 49)), ... 591s "-;Almost linear mapping indicates good fit with t-distribution.;") 591s ***** test 591s ##Example from Quenouille, Table 1 591s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 591s jackstat = jackknife ( @(x) 1/mean(x), d ); 591s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 591s 1 test, 1 passed, 0 known failure, 0 skipped 591s [inst/regression_ttest.m] 591s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/regression_ttest.m 591s ***** error regression_ttest (); 591s ***** error regression_ttest (1); 591s ***** error ... 591s regression_ttest ([1 2 NaN]', [2 3 4]'); 591s ***** error ... 591s regression_ttest ([1 2 Inf]', [2 3 4]'); 591s ***** error ... 591s regression_ttest ([1 2 3+i]', [2 3 4]'); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 NaN]'); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 Inf]'); 591s ***** error ... 591s regression_ttest ([1 2 3]', [3 4 3+i]'); 591s ***** error ... 591s regression_ttest ([1 2 3]', [3 4 4 5]'); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 591s ***** error ... 591s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 591s 16 tests, 16 passed, 0 known failure, 0 skipped 591s [inst/isoutlier.m] 591s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/isoutlier.m 591s ***** demo 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s TF = isoutlier (A, "mean") 591s ***** demo 591s ## Use a moving detection method to detect local outliers in a sine wave 591s 591s x = -2*pi:0.1:2*pi; 591s A = sin(x); 591s A(47) = 0; 591s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 591s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 591s plot (time, A) 591s hold on 591s plot (time(TF), A(TF), "x") 591s datetick ('x', 20, 'keepticks') 591s legend ("Original Data", "Outlier Data") 591s ***** demo 591s ## Locate an outlier in a vector of data and visualize the outlier 591s 591s x = 1:10; 591s A = [60 59 49 49 58 100 61 57 48 58]; 591s [TF, L, U, C] = isoutlier (A); 591s plot (x, A); 591s hold on 591s plot (x(TF), A(TF), "x"); 591s xlim ([1,10]); 591s line ([1,10], [L, L], "Linestyle", ":"); 591s text (1.1, L-2, "Lower Threshold"); 591s line ([1,10], [U, U], "Linestyle", ":"); 591s text (1.1, U-2, "Upper Threshold"); 591s line ([1,10], [C, C], "Linestyle", ":"); 591s text (1.1, C-3, "Center Value"); 591s legend ("Original Data", "Outlier Data"); 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 591s assert (isoutlier (A, "median"), ... 591s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "mean"); 591s assert (L, -109.2459044922864, 1e-12) 591s assert (U, 264.9792378256198, 1e-12) 591s assert (C, 77.8666666666666, 1e-12) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "median"); 591s assert (L, 50.104386688966386, 1e-12) 591s assert (U, 67.895613311033610, 1e-12) 591s assert (C, 59) 591s ***** test 591s A = magic(5) + diag(200*ones(1,5)); 591s T = logical (eye (5)); 591s assert (isoutlier (A, 2), T) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 591s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 591s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 591s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 591s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 591s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 591s assert (L, l, 1e-4) 591s assert (U, u, 1e-4) 591s assert (C, c) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 591s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 591s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 591s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 591s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 591s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 591s assert (L, l, 1e-4) 591s assert (U, u, 1e-4) 591s assert (C, c) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "movmean", 5); 591s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 591s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 591s 52.5979, 51.0627]; 591s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 591s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 591s 66.9373]; 591s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 591s 60.6, 59.8, 59.25, 59]; 591s assert (L, l, 1e-4) 591s assert (U, u, 1e-4) 591s assert (C, c, 1e-4) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 591s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 591s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 591s 52.5979, 51.0627]; 591s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 591s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 591s 66.9373]; 591s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 591s 60.6, 59.8, 59.25, 59]; 591s assert (L, l, 1e-4) 591s assert (U, u, 1e-4) 591s assert (C, c, 1e-4) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "gesd"); 591s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 34.235977035439944, 1e-12) 591s assert (U, 89.764022964560060, 1e-12) 591s assert (C, 62) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 591s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 31.489256770616173, 1e-12) 591s assert (U, 92.510743229383820, 1e-12) 591s assert (C, 62) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 591s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 23.976664158788935, 1e-12) 591s assert (U, 100.02333584121110, 1e-12) 591s assert (C, 62) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "grubbs"); 591s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 54.642809574646606, 1e-12) 591s assert (U, 63.511036579199555, 1e-12) 591s assert (C, 59.076923076923080, 1e-12) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 591s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 54.216083184201850, 1e-12) 591s assert (U, 63.937762969644310, 1e-12) 591s assert (C, 59.076923076923080, 1e-12) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 591s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 591s assert (L, 57) 591s assert (U, 100) 591s assert (C, 78.5) 591s ***** test 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 591s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 591s assert (L, 57.5) 591s assert (U, 62) 591s assert (C, 59.75) 591s ***** shared A 591s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 591s ***** error ... 591s isoutlier (A, "movmedian", 0); 591s ***** error ... 591s isoutlier (A, "movmedian", []); 591s ***** error ... 591s isoutlier (A, "movmedian", [2 3 4]); 591s ***** error ... 591s isoutlier (A, "movmedian", 1.4); 591s ***** error ... 591s isoutlier (A, "movmedian", [0 1]); 591s ***** error ... 591s isoutlier (A, "movmedian", [2 -1]); 591s ***** error ... 591s isoutlier (A, "movmedian", {2 3}); 591s ***** error ... 591s isoutlier (A, "movmedian", "char"); 591s 591s ***** error ... 591s isoutlier (A, "movmean", 0); 591s ***** error ... 591s isoutlier (A, "movmean", []); 591s ***** error ... 591s isoutlier (A, "movmean", [2 3 4]); 591s ***** error ... 591s isoutlier (A, "movmean", 1.4); 591s ***** error ... 591s isoutlier (A, "movmean", [0 1]); 591s ***** error ... 591s isoutlier (A, "movmean", [2 -1]); 591s ***** error ... 591s isoutlier (A, "movmean", {2 3}); 591s ***** error ... 591s isoutlier (A, "movmean", "char"); 591s 591s ***** error ... 591s isoutlier (A, "percentiles", [-1 90]); 591s ***** error ... 591s isoutlier (A, "percentiles", [10 -90]); 591s ***** error ... 591s isoutlier (A, "percentiles", [90]); 591s ***** error ... 591s isoutlier (A, "percentiles", [90 20]); 591s ***** error ... 591s isoutlier (A, "percentiles", [90 20]); 591s ***** error ... 591s isoutlier (A, "percentiles", [10 20 90]); 591s ***** error ... 591s isoutlier (A, "percentiles", {10 90}); 591s ***** error ... 591s isoutlier (A, "percentiles", "char"); 591s 591s ***** error ... 591s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "SamplePoints", 15); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 591s 591s ***** error ... 591s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 591s ***** error ... 591s isoutlier (A, "gesd", "ThresholdFactor", 3); 591s ***** error ... 591s isoutlier (A, "grubbs", "ThresholdFactor", 3); 591s 591s ***** error ... 591s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 591s ***** error ... 591s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 591s 591s ***** error ... 591s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 591s ***** error isoutlier (A, {1}); 591s ***** error isoutlier (A, true); 591s ***** error isoutlier (A, false); 591s ***** error isoutlier (A, 0); 591s ***** error isoutlier (A, [1 2]); 591s ***** error isoutlier (A, -2); 591s 59 tests, 59 passed, 0 known failure, 0 skipped 591s [inst/dendrogram.m] 591s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dendrogram.m 591s ***** demo 591s ## simple dendrogram 591s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 591s y(:,3) = 1:5; 591s dendrogram (y); 591s title ("simple dendrogram"); 591s ***** demo 591s ## another simple dendrogram 591s v = 2 * rand (30, 1) - 1; 591s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 591s y = linkage (squareform (d, "tovector")); 591s dendrogram (y); 591s title ("another simple dendrogram"); 591s ***** demo 591s ## collapsed tree, find all the leaves of node 5 591s X = randn (60, 2); 591s D = pdist (X); 591s y = linkage (D, "average"); 591s subplot (2, 1, 1); 591s title ("original tree"); 591s dendrogram (y, 0); 591s subplot (2, 1, 2); 591s title ("collapsed tree"); 591s [~, t] = dendrogram (y, 20); 591s find(t == 5) 591s ***** demo 591s ## optimal leaf order 591s X = randn (30, 2); 591s D = pdist (X); 591s y = linkage (D, "average"); 591s order = optimalleaforder (y, D); 591s subplot (2, 1, 1); 591s title ("original leaf order"); 591s dendrogram (y); 591s subplot (2, 1, 2); 591s title ("optimal leaf order"); 591s dendrogram (y, "Reorder", order); 591s ***** demo 591s ## horizontal orientation and labels 591s X = randn (8, 2); 591s D = pdist (X); 591s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 591s "Sneezy"; "Dopey"]; 591s y = linkage (D, "average"); 591s dendrogram (y, "Orientation", "left", "Labels", L); 591s title ("horizontal orientation and labels"); 591s ***** shared visibility_setting 591s visibility_setting = get (0, "DefaultFigureVisible"); 591s ***** test 591s hf = figure ("visible", "off"); 591s unwind_protect 591s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 591s y(:,3) = 1:5; 591s dendrogram (y); 591s unwind_protect_cleanup 591s close (hf); 591s end_unwind_protect 591s ***** test 591s hf = figure ("visible", "off"); 591s unwind_protect 591s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 591s y(:,3) = 1:5; 591s dendrogram (y); 591s unwind_protect_cleanup 591s close (hf); 591s end_unwind_protect 591s ***** test 591s hf = figure ("visible", "off"); 591s unwind_protect 591s v = 2 * rand (30, 1) - 1; 591s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 591s y = linkage (squareform (d, "tovector")); 591s dendrogram (y); 591s unwind_protect_cleanup 591s close (hf); 591s end_unwind_protect 592s ***** test 592s hf = figure ("visible", "off"); 592s unwind_protect 592s X = randn (30, 2); 592s D = pdist (X); 592s y = linkage (D, "average"); 592s order = optimalleaforder (y, D); 592s subplot (2, 1, 1); 592s title ("original leaf order"); 592s dendrogram (y); 592s subplot (2, 1, 2); 592s title ("optimal leaf order"); 592s dendrogram (y, "Reorder", order); 592s unwind_protect_cleanup 592s close (hf); 592s end_unwind_protect 593s ***** error dendrogram (); 593s ***** error dendrogram (ones (2, 2), 1); 593s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 593s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 593s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 593s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 593s 9 tests, 9 passed, 0 known failure, 0 skipped 593s [inst/boxplot.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/boxplot.m 593s ***** demo 593s axis ([0, 3]); 593s randn ("seed", 1); # for reproducibility 593s girls = randn (10, 1) * 5 + 140; 593s randn ("seed", 2); # for reproducibility 593s boys = randn (13, 1) * 8 + 135; 593s boxplot ({girls, boys}); 593s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 593s title ("Grade 3 heights"); 593s ***** demo 593s randn ("seed", 7); # for reproducibility 593s A = randn (10, 1) * 5 + 140; 593s randn ("seed", 8); # for reproducibility 593s B = randn (25, 1) * 8 + 135; 593s randn ("seed", 9); # for reproducibility 593s C = randn (20, 1) * 6 + 165; 593s data = [A; B; C]; 593s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 593s labels = {"Team A", "Team B", "Team C"}; 593s pos = [2, 1, 3]; 593s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 593s "OutlierTags", "on", "BoxStyle", "filled"); 593s title ("Example of Group splitting with paired vectors"); 593s ***** demo 593s randn ("seed", 1); # for reproducibility 593s data = randn (100, 9); 593s boxplot (data, "notch", "on", "boxstyle", "filled", ... 593s "colors", "ygcwkmb", "whisker", 1.2); 593s title ("Example of different colors specified with characters"); 593s ***** demo 593s randn ("seed", 5); # for reproducibility 593s data = randn (100, 13); 593s colors = [0.7 0.7 0.7; ... 593s 0.0 0.4 0.9; ... 593s 0.7 0.4 0.3; ... 593s 0.7 0.1 0.7; ... 593s 0.8 0.7 0.4; ... 593s 0.1 0.8 0.5; ... 593s 0.9 0.9 0.2]; 593s boxplot (data, "notch", "on", "boxstyle", "filled", ... 593s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 593s title ("Example of different colors specified as RGB values"); 593s ***** error boxplot ("a") 593s ***** error boxplot ({[1 2 3], "a"}) 593s ***** error boxplot ([1 2 3], 1, {2, 3}) 593s ***** error boxplot ([1 2 3], {"a", "b"}) 593s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 593s ***** error boxplot ([1:10], "notch", i) 593s ***** error boxplot ([1:10], "notch", {}) 593s ***** error boxplot (1, "symbol", 1) 593s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 593s ***** error boxplot (1, "orientation", {}) 593s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 593s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 593s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 593s ***** error boxplot (3, "OutlierTags", {}) 593s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 593s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 593s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 593s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 593s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 593s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 593s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 593s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 593s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 593s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 593s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 593s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 593s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 593s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 593s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 593s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 593s ***** error boxplot (rand (3, 3), [1 2]) 593s ***** test 593s hf = figure ("visible", "off"); 593s unwind_protect 593s [a, b] = boxplot (rand (10, 3)); 593s assert (size (a), [7, 3]); 593s assert (numel (b.box), 3); 593s assert (numel (b.whisker), 12); 593s assert (numel (b.median), 3); 593s unwind_protect_cleanup 593s close (hf); 593s end_unwind_protect 593s ***** test 593s hf = figure ("visible", "off"); 593s unwind_protect 593s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 593s assert (numel (b.box_fill), 3); 593s unwind_protect_cleanup 593s close (hf); 593s end_unwind_protect 593s ***** test 593s hf = figure ("visible", "off"); 593s unwind_protect 593s hold on 593s [a, b] = boxplot (rand (10, 3)); 593s assert (ishold, true); 593s unwind_protect_cleanup 593s close (hf); 593s end_unwind_protect 593s 34 tests, 34 passed, 0 known failure, 0 skipped 593s [inst/runstest.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/runstest.m 593s ***** test 593s ## NIST beam deflection data 593s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 593s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 593s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 593s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 593s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 593s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 593s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 593s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 593s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 593s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 593s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 593s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 593s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 593s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 593s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 593s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 593s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 593s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 593s [h, p, stats] = runstest (data, median (data)); 593s expected_h = 1; 593s expected_p = 0.008562; 593s expected_z = 2.6229; 593s assert (h, expected_h); 593s assert (p, expected_p, 1E-6); 593s assert (stats.z, expected_z, 1E-4); 593s ***** shared x 593s x = [45, -60, 1.225, 55.4, -9 27]; 593s ***** test 593s [h, p, stats] = runstest (x); 593s assert (h, 0); 593s assert (p, 0.6, 1e-14); 593s assert (stats.nruns, 5); 593s assert (stats.n1, 3); 593s assert (stats.n0, 3); 593s assert (stats.z, 0.456435464587638, 1e-14); 593s ***** test 593s [h, p, stats] = runstest (x, [], "method", "approximate"); 593s assert (h, 0); 593s assert (p, 0.6481, 1e-4); 593s assert (stats.z, 0.456435464587638, 1e-14); 593s ***** test 593s [h, p, stats] = runstest (x, [], "tail", "left"); 593s assert (h, 0); 593s assert (p, 0.9, 1e-14); 593s assert (stats.z, 1.369306393762915, 1e-14); 593s ***** error runstest (ones (2,20)) 593s ***** error runstest (["asdasda"]) 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], "updown") 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "method", "some") 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 593s ***** error ... 593s runstest ([2 3 4 3 2 3 4], [], "option", "some") 593s 14 tests, 14 passed, 0 known failure, 0 skipped 593s [inst/dist_stat/normstat.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/normstat.m 593s ***** error normstat () 593s ***** error normstat (1) 593s ***** error normstat ({}, 2) 593s ***** error normstat (1, "") 593s ***** error normstat (i, 2) 593s ***** error normstat (1, i) 593s ***** error ... 593s normstat (ones (3), ones (2)) 593s ***** error ... 593s normstat (ones (2), ones (3)) 593s ***** test 593s mu = 1:6; 593s sigma = 0.2:0.2:1.2; 593s [m, v] = normstat (mu, sigma); 593s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 593s assert (m, mu); 593s assert (v, expected_v, 0.001); 593s ***** test 593s sigma = 0.2:0.2:1.2; 593s [m, v] = normstat (0, sigma); 593s expected_mn = [0, 0, 0, 0, 0, 0]; 593s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 593s assert (m, expected_mn, 0.001); 593s assert (v, expected_v, 0.001); 593s 10 tests, 10 passed, 0 known failure, 0 skipped 593s [inst/dist_stat/expstat.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/expstat.m 593s ***** error expstat () 593s ***** error expstat ({}) 593s ***** error expstat ("") 593s ***** error expstat (i) 593s ***** test 593s mu = 1:6; 593s [m, v] = expstat (mu); 593s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 593s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 593s 5 tests, 5 passed, 0 known failure, 0 skipped 593s [inst/dist_stat/ncx2stat.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/ncx2stat.m 593s ***** error ncx2stat () 593s ***** error ncx2stat (1) 593s ***** error ncx2stat ({}, 2) 593s ***** error ncx2stat (1, "") 593s ***** error ncx2stat (i, 2) 593s ***** error ncx2stat (1, i) 593s ***** error ... 593s ncx2stat (ones (3), ones (2)) 593s ***** error ... 593s ncx2stat (ones (2), ones (3)) 593s ***** shared df, d1 593s df = [2, 0, -1, 1, 4]; 593s d1 = [1, NaN, 3, -1, 2]; 593s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 593s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 593s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 593s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 593s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 593s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 593s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 593s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 593s 16 tests, 16 passed, 0 known failure, 0 skipped 593s [inst/dist_stat/binostat.m] 593s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/binostat.m 593s ***** error binostat () 593s ***** error binostat (1) 593s ***** error binostat ({}, 2) 593s ***** error binostat (1, "") 593s ***** error binostat (i, 2) 593s ***** error binostat (1, i) 593s ***** error ... 593s binostat (ones (3), ones (2)) 593s ***** error ... 593s binostat (ones (2), ones (3)) 593s ***** test 593s n = 1:6; 593s ps = 0:0.2:1; 593s [m, v] = binostat (n, ps); 593s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 593s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 593s assert (m, expected_m, 0.001); 593s assert (v, expected_v, 0.001); 593s ***** test 593s n = 1:6; 593s [m, v] = binostat (n, 0.5); 593s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 593s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 593s assert (m, expected_m, 0.001); 593s assert (v, expected_v, 0.001); 593s ***** test 593s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 593s [m, v] = binostat (n, 0.5); 593s assert (isnan (m), [true true false true false true false false]) 593s assert (isnan (v), [true true false true false true false false]) 593s assert (m(end), Inf); 593s assert (v(end), Inf); 594s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 594s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 594s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 594s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 594s 15 tests, 15 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/burrstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/burrstat.m 594s ***** error burrstat () 594s ***** error burrstat (1) 594s ***** error burrstat (1, 2) 594s ***** error burrstat ({}, 2, 3) 594s ***** error burrstat (1, "", 3) 594s ***** error burrstat (1, 2, "") 594s ***** error burrstat (i, 2, 3) 594s ***** error burrstat (1, i, 3) 594s ***** error burrstat (1, 2, i) 594s ***** error ... 594s burrstat (ones (3), ones (2), 3) 594s ***** error ... 594s burrstat (ones (2), 2, ones (3)) 594s ***** error ... 594s burrstat (1, ones (2), ones (3)) 594s ***** test 594s [m, v] = burrstat (1, 2, 5); 594s assert (m, 0.4295, 1e-4); 594s assert (v, 0.0655, 1e-4); 594s ***** test 594s [m, v] = burrstat (1, 1, 1); 594s assert (m, Inf); 594s assert (v, Inf); 594s ***** test 594s [m, v] = burrstat (2, 4, 1); 594s assert (m, 2.2214, 1e-4); 594s assert (v, 1.3484, 1e-4); 594s 15 tests, 15 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/wblstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/wblstat.m 594s ***** error wblstat () 594s ***** error wblstat (1) 594s ***** error wblstat ({}, 2) 594s ***** error wblstat (1, "") 594s ***** error wblstat (i, 2) 594s ***** error wblstat (1, i) 594s ***** error ... 594s wblstat (ones (3), ones (2)) 594s ***** error ... 594s wblstat (ones (2), ones (3)) 594s ***** test 594s lambda = 3:8; 594s k = 1:6; 594s [m, v] = wblstat (lambda, k); 594s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 594s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s k = 1:6; 594s [m, v] = wblstat (6, k); 594s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 594s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/fstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/fstat.m 594s ***** error fstat () 594s ***** error fstat (1) 594s ***** error fstat ({}, 2) 594s ***** error fstat (1, "") 594s ***** error fstat (i, 2) 594s ***** error fstat (1, i) 594s ***** error ... 594s fstat (ones (3), ones (2)) 594s ***** error ... 594s fstat (ones (2), ones (3)) 594s ***** test 594s df1 = 1:6; 594s df2 = 5:10; 594s [m, v] = fstat (df1, df2); 594s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 594s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 594s assert (m, expected_mn, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s df1 = 1:6; 594s [m, v] = fstat (df1, 5); 594s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 594s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 594s assert (m, expected_mn, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/nakastat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/nakastat.m 594s ***** error nakastat () 594s ***** error nakastat (1) 594s ***** error nakastat ({}, 2) 594s ***** error nakastat (1, "") 594s ***** error nakastat (i, 2) 594s ***** error nakastat (1, i) 594s ***** error ... 594s nakastat (ones (3), ones (2)) 594s ***** error ... 594s nakastat (ones (2), ones (3)) 594s ***** test 594s [m, v] = nakastat (1, 1); 594s assert (m, 0.8862269254, 1e-10); 594s assert (v, 0.2146018366, 1e-10); 594s ***** test 594s [m, v] = nakastat (1, 2); 594s assert (m, 1.25331413731, 1e-10); 594s assert (v, 0.42920367321, 1e-10); 594s ***** test 594s [m, v] = nakastat (2, 1); 594s assert (m, 0.93998560299, 1e-10); 594s assert (v, 0.11642706618, 1e-10); 594s 11 tests, 11 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/ricestat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/ricestat.m 594s ***** error ricestat () 594s ***** error ricestat (1) 594s ***** error ricestat ({}, 2) 594s ***** error ricestat (1, "") 594s ***** error ricestat (i, 2) 594s ***** error ricestat (1, i) 594s ***** error ... 594s ricestat (ones (3), ones (2)) 594s ***** error ... 594s ricestat (ones (2), ones (3)) 594s ***** shared s, sigma 594s s = [2, 0, -1, 1, 4]; 594s sigma = [1, NaN, 3, -1, 2]; 594s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 594s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 594s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 594s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 594s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 594s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 594s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 594s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 594s 16 tests, 16 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/unifstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/unifstat.m 594s ***** error unifstat () 594s ***** error unifstat (1) 594s ***** error unifstat ({}, 2) 594s ***** error unifstat (1, "") 594s ***** error unifstat (i, 2) 594s ***** error unifstat (1, i) 594s ***** error ... 594s unifstat (ones (3), ones (2)) 594s ***** error ... 594s unifstat (ones (2), ones (3)) 594s ***** test 594s a = 1:6; 594s b = 2:2:12; 594s [m, v] = unifstat (a, b); 594s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 594s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s a = 1:6; 594s [m, v] = unifstat (a, 10); 594s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 594s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/tlsstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/tlsstat.m 594s ***** error tlsstat () 594s ***** error tlsstat (1) 594s ***** error tlsstat (1, 2) 594s ***** error tlsstat ({}, 2, 3) 594s ***** error tlsstat (1, "", 3) 594s ***** error tlsstat (1, 2, ["d"]) 594s ***** error tlsstat (i, 2, 3) 594s ***** error tlsstat (1, i, 3) 594s ***** error tlsstat (1, 2, i) 594s ***** error ... 594s tlsstat (ones (3), ones (2), 1) 594s ***** error ... 594s tlsstat (ones (2), 1, ones (3)) 594s ***** error ... 594s tlsstat (1, ones (2), ones (3)) 594s ***** test 594s [m, v] = tlsstat (0, 1, 0); 594s assert (m, NaN); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (0, 1, 1); 594s assert (m, NaN); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (2, 1, 1); 594s assert (m, NaN); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (-2, 1, 1); 594s assert (m, NaN); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (0, 1, 2); 594s assert (m, 0); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (2, 1, 2); 594s assert (m, 2); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (-2, 1, 2); 594s assert (m, -2); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (0, 2, 2); 594s assert (m, 0); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (2, 2, 2); 594s assert (m, 2); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (-2, 2, 2); 594s assert (m, -2); 594s assert (v, NaN); 594s ***** test 594s [m, v] = tlsstat (0, 1, 3); 594s assert (m, 0); 594s assert (v, 3); 594s ***** test 594s [m, v] = tlsstat (0, 2, 3); 594s assert (m, 0); 594s assert (v, 6); 594s ***** test 594s [m, v] = tlsstat (2, 1, 3); 594s assert (m, 2); 594s assert (v, 3); 594s ***** test 594s [m, v] = tlsstat (2, 2, 3); 594s assert (m, 2); 594s assert (v, 6); 594s ***** test 594s [m, v] = tlsstat (-2, 1, 3); 594s assert (m, -2); 594s assert (v, 3); 594s ***** test 594s [m, v] = tlsstat (-2, 2, 3); 594s assert (m, -2); 594s assert (v, 6); 594s 28 tests, 28 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/geostat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/geostat.m 594s ***** error geostat () 594s ***** error geostat ({}) 594s ***** error geostat ("") 594s ***** error geostat (i) 594s ***** test 594s ps = 1 ./ (1:6); 594s [m, v] = geostat (ps); 594s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 594s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/bisastat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/bisastat.m 594s ***** error bisastat () 594s ***** error bisastat (1) 594s ***** error bisastat ({}, 2) 594s ***** error bisastat (1, "") 594s ***** error bisastat (i, 2) 594s ***** error bisastat (1, i) 594s ***** error ... 594s bisastat (ones (3), ones (2)) 594s ***** error ... 594s bisastat (ones (2), ones (3)) 594s ***** test 594s beta = 1:6; 594s gamma = 1:0.2:2; 594s [m, v] = bisastat (beta, gamma); 594s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 594s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 594s assert (m, expected_m, 1e-2); 594s assert (v, expected_v, 1e-3); 594s ***** test 594s beta = 1:6; 594s [m, v] = bisastat (beta, 1.5); 594s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 594s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 594s assert (m, expected_m, 1e-3); 594s assert (v, expected_v, 1e-4); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/hnstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/hnstat.m 594s ***** error hnstat () 594s ***** error hnstat (1) 594s ***** error hnstat ({}, 2) 594s ***** error hnstat (1, "") 594s ***** error hnstat (i, 2) 594s ***** error hnstat (1, i) 594s ***** error ... 594s hnstat (ones (3), ones (2)) 594s ***** error ... 594s hnstat (ones (2), ones (3)) 594s ***** test 594s [m, v] = hnstat (0, 1); 594s assert (m, 0.7979, 1e-4); 594s assert (v, 0.3634, 1e-4); 594s ***** test 594s [m, v] = hnstat (2, 1); 594s assert (m, 2.7979, 1e-4); 594s assert (v, 0.3634, 1e-4); 594s ***** test 594s [m, v] = hnstat (2, 2); 594s assert (m, 3.5958, 1e-4); 594s assert (v, 1.4535, 1e-4); 594s ***** test 594s [m, v] = hnstat (2, 2.5); 594s assert (m, 3.9947, 1e-4); 594s assert (v, 2.2711, 1e-4); 594s ***** test 594s [m, v] = hnstat (1.5, 0.5); 594s assert (m, 1.8989, 1e-4); 594s assert (v, 0.0908, 1e-4); 594s ***** test 594s [m, v] = hnstat (-1.5, 0.5); 594s assert (m, -1.1011, 1e-4); 594s assert (v, 0.0908, 1e-4); 594s 14 tests, 14 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/plstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/plstat.m 594s ***** shared x, Fx 594s x = [0, 1, 3, 4, 7, 10]; 594s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 594s ***** assert (plstat (x, Fx), 4.15) 594s ***** test 594s [m, v] = plstat (x, Fx); 594s assert (v, 10.3775, 1e-14) 594s ***** error plstat () 594s ***** error plstat (1) 594s ***** error ... 594s plstat ([0, 1, 2], [0, 1]) 594s ***** error ... 594s plstat ([0], [1]) 594s ***** error ... 594s plstat ([0, 1, 2], [0, 1, 1.5]) 594s ***** error ... 594s plstat ([0, 1, 2], [0, i, 1]) 594s ***** error ... 594s plstat ([0, i, 2], [0, 0.5, 1]) 594s ***** error ... 594s plstat ([0, i, 2], [0, 0.5i, 1]) 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/gpstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/gpstat.m 594s ***** error gpstat () 594s ***** error gpstat (1) 594s ***** error gpstat (1, 2) 594s ***** error gpstat ({}, 2, 3) 594s ***** error gpstat (1, "", 3) 594s ***** error gpstat (1, 2, "") 594s ***** error gpstat (i, 2, 3) 594s ***** error gpstat (1, i, 3) 594s ***** error gpstat (1, 2, i) 594s ***** error ... 594s gpstat (ones (3), ones (2), 3) 594s ***** error ... 594s gpstat (ones (2), 2, ones (3)) 594s ***** error ... 594s gpstat (1, ones (2), ones (3)) 594s ***** shared x, y 594s x = [-Inf, -1, 0, 1/2, 1, Inf]; 594s y = [0, 0.5, 1, 2, Inf, Inf]; 594s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 594s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 594s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 594s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 594s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 594s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 594s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 594s 19 tests, 19 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/gevstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/gevstat.m 594s ***** error gevstat () 594s ***** error gevstat (1) 594s ***** error gevstat (1, 2) 594s ***** error gevstat ({}, 2, 3) 594s ***** error gevstat (1, "", 3) 594s ***** error gevstat (1, 2, "") 594s ***** error gevstat (i, 2, 3) 594s ***** error gevstat (1, i, 3) 594s ***** error gevstat (1, 2, i) 594s ***** error ... 594s gevstat (ones (3), ones (2), 3) 594s ***** error ... 594s gevstat (ones (2), 2, ones (3)) 594s ***** error ... 594s gevstat (1, ones (2), ones (3)) 594s ***** test 594s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 594s sigma = 2; 594s mu = 1; 594s [m, v] = gevstat (k, sigma, mu); 594s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 594s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 594s assert (m, expected_m, -0.001); 594s assert (v, expected_v, -0.001); 594s 13 tests, 13 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/logistat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/logistat.m 594s ***** error logistat () 594s ***** error logistat (1) 594s ***** error logistat ({}, 2) 594s ***** error logistat (1, "") 594s ***** error logistat (i, 2) 594s ***** error logistat (1, i) 594s ***** error ... 594s logistat (ones (3), ones (2)) 594s ***** error ... 594s logistat (ones (2), ones (3)) 594s ***** test 594s [m, v] = logistat (0, 1); 594s assert (m, 0); 594s assert (v, 3.2899, 0.001); 594s ***** test 594s [m, v] = logistat (0, 0.8); 594s assert (m, 0); 594s assert (v, 2.1055, 0.001); 594s ***** test 594s [m, v] = logistat (1, 0.6); 594s assert (m, 1); 594s assert (v, 1.1844, 0.001); 594s ***** test 594s [m, v] = logistat (0, 0.4); 594s assert (m, 0); 594s assert (v, 0.5264, 0.001); 594s ***** test 594s [m, v] = logistat (-1, 0.2); 594s assert (m, -1); 594s assert (v, 0.1316, 0.001); 594s 13 tests, 13 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/tristat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/tristat.m 594s ***** error tristat () 594s ***** error tristat (1) 594s ***** error tristat (1, 2) 594s ***** error tristat ("i", 2, 1) 594s ***** error tristat (0, "d", 1) 594s ***** error tristat (0, 3, {}) 594s ***** error tristat (i, 2, 1) 594s ***** error tristat (0, i, 1) 594s ***** error tristat (0, 3, i) 594s ***** test 594s a = 1:5; 594s b = 3:7; 594s c = 5:9; 594s [m, v] = tristat (a, b, c); 594s expected_m = [3, 4, 5, 6, 7]; 594s assert (m, expected_m); 594s assert (v, ones (1, 5) * (2/3)); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/lognstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/lognstat.m 594s ***** error lognstat () 594s ***** error lognstat (1) 594s ***** error lognstat ({}, 2) 594s ***** error lognstat (1, "") 594s ***** error lognstat (i, 2) 594s ***** error lognstat (1, i) 594s ***** error ... 594s lognstat (ones (3), ones (2)) 594s ***** error ... 594s lognstat (ones (2), ones (3)) 594s ***** test 594s mu = 0:0.2:1; 594s sigma = 0.2:0.2:1.2; 594s [m, v] = lognstat (mu, sigma); 594s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 594s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s sigma = 0.2:0.2:1.2; 594s [m, v] = lognstat (0, sigma); 594s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 594s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/nbinstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/nbinstat.m 594s ***** error nbinstat () 594s ***** error nbinstat (1) 594s ***** error nbinstat ({}, 2) 594s ***** error nbinstat (1, "") 594s ***** error nbinstat (i, 2) 594s ***** error nbinstat (1, i) 594s ***** error ... 594s nbinstat (ones (3), ones (2)) 594s ***** error ... 594s nbinstat (ones (2), ones (3)) 594s ***** test 594s r = 1:4; 594s ps = 0.2:0.2:0.8; 594s [m, v] = nbinstat (r, ps); 594s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 594s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s r = 1:4; 594s [m, v] = nbinstat (r, 0.5); 594s expected_m = [1, 2, 3, 4]; 594s expected_v = [2, 4, 6, 8]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/unidstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/unidstat.m 594s ***** error unidstat () 594s ***** error unidstat ({}) 594s ***** error unidstat ("") 594s ***** error unidstat (i) 594s ***** test 594s N = 1:6; 594s [m, v] = unidstat (N); 594s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 594s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/ncfstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/ncfstat.m 594s ***** error ncfstat () 594s ***** error ncfstat (1) 594s ***** error ncfstat (1, 2) 594s ***** error ncfstat ({}, 2, 3) 594s ***** error ncfstat (1, "", 3) 594s ***** error ncfstat (1, 2, "") 594s ***** error ncfstat (i, 2, 3) 594s ***** error ncfstat (1, i, 3) 594s ***** error ncfstat (1, 2, i) 594s ***** error ... 594s ncfstat (ones (3), ones (2), 3) 594s ***** error ... 594s ncfstat (ones (2), 2, ones (3)) 594s ***** error ... 594s ncfstat (1, ones (2), ones (3)) 594s ***** shared df1, df2, lambda 594s df1 = [2, 0, -1, 1, 4, 5]; 594s df2 = [2, 4, -1, 5, 6, 7]; 594s lambda = [1, NaN, 3, 0, 2, -1]; 594s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 594s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 594s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 594s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 594s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 594s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 594s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 594s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 594s 20 tests, 20 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/chi2stat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/chi2stat.m 594s ***** error chi2stat () 594s ***** error chi2stat ({}) 594s ***** error chi2stat ("") 594s ***** error chi2stat (i) 594s ***** test 594s df = 1:6; 594s [m, v] = chi2stat (df); 594s assert (m, df); 594s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/poisstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/poisstat.m 594s ***** error poisstat () 594s ***** error poisstat ({}) 594s ***** error poisstat ("") 594s ***** error poisstat (i) 594s ***** test 594s lambda = 1 ./ (1:6); 594s [m, v] = poisstat (lambda); 594s assert (m, lambda); 594s assert (v, lambda); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/evstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/evstat.m 594s ***** error evstat () 594s ***** error evstat (1) 594s ***** error evstat ({}, 2) 594s ***** error evstat (1, "") 594s ***** error evstat (i, 2) 594s ***** error evstat (1, i) 594s ***** error ... 594s evstat (ones (3), ones (2)) 594s ***** error ... 594s evstat (ones (2), ones (3)) 594s ***** shared x, y0, y1 594s x = [-5, 0, 1, 2, 3]; 594s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 594s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 594s ***** assert (evstat (x, x), y0, 1e-4) 594s ***** assert (evstat (x, x+6), y1, 1e-4) 594s ***** assert (evstat (x, x-6), NaN (1,5)) 594s 11 tests, 11 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/nctstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/nctstat.m 594s ***** error nctstat () 594s ***** error nctstat (1) 594s ***** error nctstat ({}, 2) 594s ***** error nctstat (1, "") 594s ***** error nctstat (i, 2) 594s ***** error nctstat (1, i) 594s ***** error ... 594s nctstat (ones (3), ones (2)) 594s ***** error ... 594s nctstat (ones (2), ones (3)) 594s ***** shared df, mu 594s df = [2, 0, -1, 1, 4]; 594s mu = [1, NaN, 3, -1, 2]; 594s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 594s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 594s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 594s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 594s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 594s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 594s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 594s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 594s 16 tests, 16 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/raylstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/raylstat.m 594s ***** error raylstat () 594s ***** error raylstat ({}) 594s ***** error raylstat ("") 594s ***** error raylstat (i) 594s ***** test 594s sigma = 1:6; 594s [m, v] = raylstat (sigma); 594s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 594s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/tstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/tstat.m 594s ***** error tstat () 594s ***** error tstat ({}) 594s ***** error tstat ("") 594s ***** error tstat (i) 594s ***** test 594s df = 3:8; 594s [m, v] = tstat (df); 594s expected_m = [0, 0, 0, 0, 0, 0]; 594s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 594s assert (m, expected_m); 594s assert (v, expected_v, 0.001); 594s 5 tests, 5 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/hygestat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/hygestat.m 594s ***** error hygestat () 594s ***** error hygestat (1) 594s ***** error hygestat (1, 2) 594s ***** error hygestat ({}, 2, 3) 594s ***** error hygestat (1, "", 3) 594s ***** error hygestat (1, 2, "") 594s ***** error hygestat (i, 2, 3) 594s ***** error hygestat (1, i, 3) 594s ***** error hygestat (1, 2, i) 594s ***** error ... 594s hygestat (ones (3), ones (2), 3) 594s ***** error ... 594s hygestat (ones (2), 2, ones (3)) 594s ***** error ... 594s hygestat (1, ones (2), ones (3)) 594s ***** test 594s m = 4:9; 594s k = 0:5; 594s n = 1:6; 594s [mn, v] = hygestat (m, k, n); 594s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 594s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 594s assert (mn, expected_mn, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s m = 4:9; 594s k = 0:5; 594s [mn, v] = hygestat (m, k, 2); 594s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 594s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 594s assert (mn, expected_mn, 0.001); 594s assert (v, expected_v, 0.001); 594s 14 tests, 14 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/betastat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/betastat.m 594s ***** error betastat () 594s ***** error betastat (1) 594s ***** error betastat ({}, 2) 594s ***** error betastat (1, "") 594s ***** error betastat (i, 2) 594s ***** error betastat (1, i) 594s ***** error ... 594s betastat (ones (3), ones (2)) 594s ***** error ... 594s betastat (ones (2), ones (3)) 594s ***** test 594s a = -2:6; 594s b = 0.4:0.2:2; 594s [m, v] = betastat (a, b); 594s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 594s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 594s assert (m, expected_m, eps*100); 594s assert (v, expected_v, 0.001); 594s ***** test 594s a = -2:1:6; 594s [m, v] = betastat (a, 1.5); 594s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 594s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 594s assert (m, expected_m); 594s assert (v, expected_v, 0.001); 594s ***** test 594s a = [14 Inf 10 NaN 10]; 594s b = [12 9 NaN Inf 12]; 594s [m, v] = betastat (a, b); 594s expected_m = [14/26 NaN NaN NaN 10/22]; 594s expected_v = [168/18252 NaN NaN NaN 120/11132]; 594s assert (m, expected_m); 594s assert (v, expected_v); 594s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 594s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 594s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 594s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 594s 15 tests, 15 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/invgstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/invgstat.m 594s ***** error invgstat () 594s ***** error invgstat (1) 594s ***** error invgstat ({}, 2) 594s ***** error invgstat (1, "") 594s ***** error invgstat (i, 2) 594s ***** error invgstat (1, i) 594s ***** error ... 594s invgstat (ones (3), ones (2)) 594s ***** error ... 594s invgstat (ones (2), ones (3)) 594s ***** test 594s [m, v] = invgstat (1, 1); 594s assert (m, 1); 594s assert (v, 1); 594s ***** test 594s [m, v] = invgstat (2, 1); 594s assert (m, 2); 594s assert (v, 8); 594s ***** test 594s [m, v] = invgstat (2, 2); 594s assert (m, 2); 594s assert (v, 4); 594s ***** test 594s [m, v] = invgstat (2, 2.5); 594s assert (m, 2); 594s assert (v, 3.2); 594s ***** test 594s [m, v] = invgstat (1.5, 0.5); 594s assert (m, 1.5); 594s assert (v, 6.75); 594s 13 tests, 13 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/gamstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/gamstat.m 594s ***** error gamstat () 594s ***** error gamstat (1) 594s ***** error gamstat ({}, 2) 594s ***** error gamstat (1, "") 594s ***** error gamstat (i, 2) 594s ***** error gamstat (1, i) 594s ***** error ... 594s gamstat (ones (3), ones (2)) 594s ***** error ... 594s gamstat (ones (2), ones (3)) 594s ***** test 594s a = 1:6; 594s b = 1:0.2:2; 594s [m, v] = gamstat (a, b); 594s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 594s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s ***** test 594s a = 1:6; 594s [m, v] = gamstat (a, 1.5); 594s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 594s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 594s assert (m, expected_m, 0.001); 594s assert (v, expected_v, 0.001); 594s 10 tests, 10 passed, 0 known failure, 0 skipped 594s [inst/dist_stat/loglstat.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_stat/loglstat.m 594s ***** error loglstat () 594s ***** error loglstat (1) 594s ***** error loglstat ({}, 2) 594s ***** error loglstat (1, "") 594s ***** error loglstat (i, 2) 594s ***** error loglstat (1, i) 594s ***** error ... 594s loglstat (ones (3), ones (2)) 594s ***** error ... 594s loglstat (ones (2), ones (3)) 594s ***** test 594s [m, v] = loglstat (0, 1); 594s assert (m, Inf, 0.001); 594s assert (v, Inf, 0.001); 594s ***** test 594s [m, v] = loglstat (0, 0.8); 594s assert (m, 4.2758, 0.001); 594s assert (v, Inf, 0.001); 594s ***** test 594s [m, v] = loglstat (0, 0.6); 594s assert (m, 1.9820, 0.001); 594s assert (v, Inf, 0.001); 594s ***** test 594s [m, v] = loglstat (0, 0.4); 594s assert (m, 1.3213, 0.001); 594s assert (v, 2.5300, 0.001); 594s ***** test 594s [m, v] = loglstat (0, 0.2); 594s assert (m, 1.0690, 0.001); 594s assert (v, 0.1786, 0.001); 594s 13 tests, 13 passed, 0 known failure, 0 skipped 594s [inst/pcares.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/pcares.m 594s ***** demo 594s x = [ 7 26 6 60; 594s 1 29 15 52; 594s 11 56 8 20; 594s 11 31 8 47; 594s 7 52 6 33; 594s 11 55 9 22; 594s 3 71 17 6; 594s 1 31 22 44; 594s 2 54 18 22; 594s 21 47 4 26; 594s 1 40 23 34; 594s 11 66 9 12; 594s 10 68 8 12]; 594s 594s ## As we increase the number of principal components, the norm 594s ## of the residuals matrix will decrease 594s r1 = pcares (x,1); 594s n1 = norm (r1) 594s r2 = pcares (x,2); 594s n2 = norm (r2) 594s r3 = pcares (x,3); 594s n3 = norm (r3) 594s r4 = pcares (x,4); 594s n4 = norm (r4) 594s ***** test 594s load hald 594s r1 = pcares (ingredients,1); 594s r2 = pcares (ingredients,2); 594s r3 = pcares (ingredients,3); 594s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 594s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 594s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 594s ***** error pcares (ones (20, 3)) 594s ***** error ... 594s pcares (ones (30, 2), 3) 594s 3 tests, 3 passed, 0 known failure, 0 skipped 594s [inst/mnrfit.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/mnrfit.m 594s ***** error mnrfit (ones (50,1)) 594s ***** error ... 594s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 594s ***** error ... 594s mnrfit (ones (50, 4, 2), ones (50, 1)) 594s ***** error ... 594s mnrfit (ones (50, 4), ones (50, 1, 3)) 594s ***** error ... 594s mnrfit (ones (50, 4), ones (45,1)) 594s ***** error ... 594s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 594s ***** error ... 594s mnrfit (ones (5, 4), ones (5, 1), "model") 594s ***** error ... 594s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 594s ***** error ... 594s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 594s ***** error ... 594s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 594s ***** error ... 594s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 594s ***** error ... 594s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 594s ***** error ... 594s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 594s 13 tests, 13 passed, 0 known failure, 0 skipped 594s [inst/optimalleaforder.m] 594s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/optimalleaforder.m 594s ***** demo 594s randn ("seed", 5) # for reproducibility 594s X = randn (10, 2); 594s D = pdist (X); 594s tree = linkage(D, 'average'); 594s optimalleaforder (tree, D, 'Transformation', 'linear') 594s ***** error optimalleaforder () 594s ***** error optimalleaforder (1) 595s ***** error optimalleaforder (ones (2, 2), 1) 595s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 595s ***** error optimalleaforder ([1 2 1], [1 2 3]) 595s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 595s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 595s 7 tests, 7 passed, 0 known failure, 0 skipped 595s [inst/hotelling_t2test2.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hotelling_t2test2.m 595s ***** error hotelling_t2test2 (); 595s ***** error ... 595s hotelling_t2test2 ([2, 3, 4, 5, 6]); 595s ***** error ... 595s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 595s ***** error ... 595s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 595s ***** error ... 595s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 595s ***** error ... 595s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 595s ***** error ... 595s hotelling_t2test2 (ones (20,1), ones (20,2)); 595s ***** error ... 595s hotelling_t2test2 (ones (20,2), ones (25,3)); 595s ***** test 595s randn ("seed", 1); 595s x1 = randn (60000, 5); 595s randn ("seed", 5); 595s x2 = randn (30000, 5); 595s [h, pval, stats] = hotelling_t2test2 (x1, x2); 595s assert (h, 0); 595s assert (stats.df1, 5); 595s assert (stats.df2, 89994); 595s 14 tests, 14 passed, 0 known failure, 0 skipped 595s [inst/fitgmdist.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitgmdist.m 595s ***** demo 595s ## Generate a two-cluster problem 595s C1 = randn (100, 2) + 2; 595s C2 = randn (100, 2) - 2; 595s data = [C1; C2]; 595s 595s ## Perform clustering 595s GMModel = fitgmdist (data, 2); 595s 595s ## Plot the result 595s figure 595s [heights, bins] = hist3([C1; C2]); 595s [xx, yy] = meshgrid(bins{1}, bins{2}); 595s bbins = [xx(:), yy(:)]; 595s contour (reshape (GMModel.pdf (bbins), size (heights))); 595s ***** demo 595s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 595s nbOrientations = 2; 595s initial_orientations = [38.0; 18.0]; 595s initial_weights = ones (1, nbOrientations) / nbOrientations; 595s initial_Sigma = 10 * ones (1, 1, nbOrientations); 595s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 595s "ComponentProportion", initial_weights); 595s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 595s "RegularizationValue", 0.0001) 595s ***** test 595s load fisheriris 595s classes = unique (species); 595s [~, score] = pca (meas, "NumComponents", 2); 595s options.MaxIter = 1000; 595s options.TolFun = 1e-6; 595s options.Display = "off"; 595s GMModel = fitgmdist (score, 2, "Options", options); 595s assert (isa (GMModel, "gmdistribution"), true); 595s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 595s 1 test, 1 passed, 0 known failure, 0 skipped 595s [inst/fitcnet.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitcnet.m 595s ***** demo 595s ## Train a Neural Network on the Fisher's Iris data set and display 595s ## a confusion chart with the classification results. 595s 595s load fisheriris 595s Mdl = fitcnet (meas, species); 595s pred_species = resubPredict (Mdl); 595s confusionchart (species, pred_species); 595s ***** test 595s load fisheriris 595s x = meas; 595s y = grp2idx (species); 595s Mdl = fitcnet (x, y, "IterationLimit", 50); 595s assert (class (Mdl), "ClassificationNeuralNetwork"); 595s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 595s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 595s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 595s ***** error fitcnet () 595s ***** error fitcnet (ones (4,1)) 595s ***** error 595s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 595s ***** error 595s fitcnet (ones (4,2), ones (3, 1)) 595s ***** error 595s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 595s 6 tests, 6 passed, 0 known failure, 0 skipped 595s [inst/normplot.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/normplot.m 595s ***** demo 595s h = normplot([1:20]); 595s ***** demo 595s h = normplot([1:20;5:2:44]'); 595s ***** demo 595s ax = newplot(); 595s h = normplot(ax, [1:20]); 595s ax = gca; 595s h = normplot(ax, [-10:10]); 595s set (ax, "xlim", [-11, 21]); 595s ***** error normplot (); 595s ***** error normplot (23); 595s ***** error normplot (23, [1:20]); 595s ***** error normplot (ones(3,4,5)); 595s ***** test 595s hf = figure ("visible", "off"); 595s unwind_protect 595s ax = newplot (hf); 595s h = normplot (ax, [1:20]); 595s ax = gca; 595s h = normplot(ax, [-10:10]); 595s set (ax, "xlim", [-11, 21]); 595s unwind_protect_cleanup 595s close (hf); 595s end_unwind_protect 595s ***** test 595s hf = figure ("visible", "off"); 595s unwind_protect 595s h = normplot([1:20;5:2:44]'); 595s unwind_protect_cleanup 595s close (hf); 595s end_unwind_protect 595s 6 tests, 6 passed, 0 known failure, 0 skipped 595s [inst/Clustering/CalinskiHarabaszEvaluation.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Clustering/CalinskiHarabaszEvaluation.m 595s ***** test 595s load fisheriris 595s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 595s assert (class (eva), "CalinskiHarabaszEvaluation"); 595s 1 test, 1 passed, 0 known failure, 0 skipped 595s [inst/Clustering/ClusterCriterion.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Clustering/ClusterCriterion.m 595s ***** error ... 595s ClusterCriterion ("1", "kmeans", [1:6]) 595s ***** error ... 595s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 595s ***** error ... 595s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 595s ***** error ... 595s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 595s 4 tests, 4 passed, 0 known failure, 0 skipped 595s [inst/Clustering/SilhouetteEvaluation.m] 595s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Clustering/SilhouetteEvaluation.m 595s ***** test 595s load fisheriris 595s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 595s assert (class (eva), "SilhouetteEvaluation"); 596s 1 test, 1 passed, 0 known failure, 0 skipped 596s [inst/Clustering/DaviesBouldinEvaluation.m] 596s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Clustering/DaviesBouldinEvaluation.m 596s ***** test 596s load fisheriris 596s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 596s assert (class (eva), "DaviesBouldinEvaluation"); 596s 1 test, 1 passed, 0 known failure, 0 skipped 596s [inst/Clustering/GapEvaluation.m] 596s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Clustering/GapEvaluation.m 596s ***** test 596s load fisheriris 596s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 596s "referencedistribution", "uniform"); 596s assert (class (eva), "GapEvaluation"); 598s 1 test, 1 passed, 0 known failure, 0 skipped 598s [inst/fullfact.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fullfact.m 598s ***** demo 598s ## Full factorial design with 3 binary variables 598s fullfact (3) 598s ***** demo 598s ## Full factorial design with 3 ordinal variables 598s fullfact ([2, 3, 4]) 598s ***** error fullfact (); 598s ***** error fullfact (2, 5); 598s ***** error fullfact (2.5); 598s ***** error fullfact (0); 598s ***** error fullfact (-3); 598s ***** error fullfact (3+2i); 598s ***** error fullfact (Inf); 598s ***** error fullfact (NaN); 598s ***** error fullfact ([1, 2, -3]); 598s ***** error fullfact ([0, 1, 2]); 598s ***** error fullfact ([1, 2, NaN]); 598s ***** error fullfact ([1, 2, Inf]); 598s ***** test 598s A = fullfact (2); 598s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 598s ***** test 598s A = fullfact ([1, 2]); 598s assert (A, [1, 1; 1, 2]); 598s ***** test 598s A = fullfact ([1, 2, 4]); 598s A_out = [1, 1, 1; 1, 1, 2; 1, 1, 3; 1, 1, 4; ... 598s 1, 2, 1; 1, 2, 2; 1, 2, 3; 1, 2, 4]; 598s assert (A, A_out); 598s 15 tests, 15 passed, 0 known failure, 0 skipped 598s [inst/pca.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/pca.m 598s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 598s ***** test 598s x=[7 4 3 598s 4 1 8 598s 6 3 5 598s 8 6 1 598s 8 5 7 598s 7 2 9 598s 5 3 3 598s 9 5 8 598s 7 4 5 598s 8 2 2]; 598s R = corrcoef (x); 598s [V, lambda] = eig (R); 598s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 598s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 598s ***** 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 598s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 598s F = zscore(x)*B; 598s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 598s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 598s ***** test 598s x=[1,2,3;2,1,3]'; 598s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 598s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 598s m(:,1) = m(:,1)*sign(COEFF(1,1)); 598s m(:,2) = m(:,2)*sign(COEFF(1,2)); 598s ***** assert(COEFF,m(1:2,:),10*eps); 598s ***** assert(SCORE,-m,10*eps); 598s ***** assert(latent,[1.5;.5],10*eps); 598s ***** assert(tsquare,[4;4;4]/3,10*eps); 598s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 598s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 598s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 598s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 598s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 598s !!!!! known failure 598s ASSERT errors for: assert (tsquare,[1.5; 0.5; 1.5],10 * eps) 598s 598s Location | Observed | Expected | Reason 598s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 598s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 598s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 598s ***** test 598s x=x'; 598s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 598s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 598s m(:,1) = m(:,1)*sign(COEFF(1,1)); 598s m(:,2) = m(:,2)*sign(COEFF(1,2)); 598s m(:,3) = m(:,3)*sign(COEFF(3,3)); 598s ***** assert(COEFF,m,10*eps); 598s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 598s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 598s ***** assert(latent,[1;0;0],10*eps); 598s ***** assert(tsquare,[0.5;0.5],10*eps) 598s ***** test 598s [COEFF,SCORE,latent,tsquare] = pca(x); 598s ***** assert(COEFF,m(:, 1),10*eps); 598s ***** assert(SCORE,-m(1:2,1),10*eps); 598s ***** assert(latent,[1],10*eps); 598s ***** assert(tsquare,[0.5;0.5],10*eps) 598s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 598s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 598s ***** error pca([1 2; 3 4], "NumComponents", -4) 598s ***** error pca([1 2; 3 4], "Rows", 1) 598s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 598s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 598s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 598s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 598s ***** error pca([1 2; 3 4], "XXX", 1) 598s 32 tests, 31 passed, 1 known failure, 0 skipped 598s [inst/nanmin.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/nanmin.m 598s ***** demo 598s ## Find the column minimum values and their indices 598s ## for matrix data with missing values. 598s 598s x = magic (3); 598s x([1, 6:9]) = NaN 598s [y, ind] = nanmin (x) 598s ***** demo 598s ## Find the minimum of all the values in an array, ignoring missing values. 598s ## Create a 2-by-5-by-3 array x with some missing values. 598s 598s x = reshape (1:30, [2, 5, 3]); 598s x([10:12, 25]) = NaN 598s 598s ## Find the minimum of the elements of x. 598s 598s y = nanmin (x, [], 'all') 598s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 598s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 598s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 598s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 598s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 598s ***** shared x, y 598s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 598s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 598s y = x; 598s y(2,3,1) = 0.51; 598s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 598s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 598s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 598s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 598s ***** assert (nanmin (x, [], 'all'), -2.95) 598s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 598s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 598s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 598s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 598s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 598s ***** test 598s xx = repmat ([1:20;6:25], [5 2 6 3]); 598s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 598s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 598s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 598s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 598s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 598s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 598s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 598s ***** assert (nanmin (magic (3), [], 3), magic (3)) 598s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 598s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 598s ***** assert (nanmin (ones (2), 3), ones (2,2)) 598s ***** error ... 598s nanmin (y, [], [1, 1, 2]) 598s ***** error ... 598s [v, idx] = nanmin(x, y, [1 2]) 598s 24 tests, 24 passed, 0 known failure, 0 skipped 598s [inst/glmfit.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/glmfit.m 598s ***** demo 598s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 598s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 598s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 598s b = glmfit (x, [y n], "binomial", "Link", "probit"); 598s yfit = glmval (b, x, "probit", "Size", n); 598s plot (x, y./n, 'o', x, yfit ./ n, '-') 598s ***** demo 598s load fisheriris 598s X = meas (51:end, :); 598s y = strcmp ("versicolor", species(51:end)); 598s b = glmfit (X, y, "binomial", "link", "logit") 598s ***** test 598s load fisheriris; 598s X = meas(51:end,:); 598s y = strcmp ("versicolor", species(51:end)); 598s b = glmfit (X, y, "binomial", "link", "logit"); 598s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 598s ***** test 598s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 598s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 598s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 598s b_matlab = [-0.7631; 0.1113]; 598s dev_matlab = 0.0111; 598s assert (Bnew, b_matlab, 0.001); 598s assert (dev, dev_matlab, 0.001); 598s ***** test 598s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 598s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 598s p_input = 1; 598s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 598s b_matlab = [0.3813; 0.0950]; 598s dev_matlab = 0.0051; 598s assert (Bnew, b_matlab, 0.001); 598s assert (dev, dev_matlab, 0.001); 598s ***** error glmfit () 598s ***** error glmfit (1) 598s ***** error glmfit (1, 2) 598s ***** error ... 598s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 598s ***** error ... 598s glmfit ('abc', rand (6, 1), 'poisson') 598s ***** error ... 598s glmfit ([], rand (6, 1), 'poisson') 598s ***** error ... 598s glmfit (rand (5, 2), 'abc', 'poisson') 598s ***** error ... 598s glmfit (rand (5, 2), [], 'poisson') 598s ***** error ... 598s glmfit (rand (5, 2), rand (6, 1), 'poisson') 598s ***** error ... 598s glmfit (rand (6, 2), rand (6, 1), 3) 598s ***** error ... 598s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 3), 'binomial') 598s ***** error ... 598s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 2), 'normal') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 598s ***** error ... 598s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 598s ***** error ... 598s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 598s 70 tests, 70 passed, 0 known failure, 0 skipped 598s [inst/ttest2.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ttest2.m 598s ***** test 598s a = 1:5; 598s b = 6:10; 598s b(5) = NaN; 598s [h,p,ci,stats] = ttest2 (a,b); 598s assert (h, 1); 598s assert (p, 0.002535996080258229, 1e-14); 598s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 598s assert (stats.tstat, -4.582575694955839, 1e-14); 598s assert (stats.df, 7); 598s assert (stats.sd, 1.4638501094228, 1e-13); 598s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 598s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 598s 3 tests, 3 passed, 0 known failure, 0 skipped 598s [inst/fitrgam.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitrgam.m 598s ***** demo 598s # Train a RegressionGAM Model for synthetic values 598s 598s f1 = @(x) cos (3 *x); 598s f2 = @(x) x .^ 3; 598s 598s # generate x1 and x2 for f1 and f2 598s x1 = 2 * rand (50, 1) - 1; 598s x2 = 2 * rand (50, 1) - 1; 598s 598s # calculate y 598s y = f1(x1) + f2(x2); 598s 598s # add noise 598s y = y + y .* 0.2 .* rand (50,1); 598s X = [x1, x2]; 598s 598s # create an object 598s a = fitrgam (X, y, "tol", 1e-3) 598s ***** test 598s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 598s y = [1; 2; 3; 4]; 598s a = fitrgam (x, y); 598s assert ({a.X, a.Y}, {x, y}) 598s assert ({a.BaseModel.Intercept}, {2.5000}) 598s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 598s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 598s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 598s assert ({a.Formula}, {[]}) 598s ***** test 598s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 598s y = [1; 2; 3; 4]; 598s pnames = {"A", "B", "C", "D"}; 598s formula = "Y ~ A + B + C + D + A:C"; 598s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 598s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 598s assert ({a.IntMatrix}, {intMat}) 598s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 598s assert ({a.Formula}, {formula}) 598s ***** error fitrgam () 598s ***** error fitrgam (ones(10,2)) 598s ***** error 598s fitrgam (ones (4,2), ones (4, 1), "K") 598s ***** error 598s fitrgam (ones (4,2), ones (3, 1)) 598s ***** error 598s fitrgam (ones (4,2), ones (3, 1), "K", 2) 598s 7 tests, 7 passed, 0 known failure, 0 skipped 598s [inst/combnk.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/combnk.m 598s ***** demo 598s c = combnk (1:5, 2); 598s disp ("All pairs of integers between 1 and 5:"); 598s disp (c); 598s ***** test 598s c = combnk (1:3, 2); 598s assert (c, [1, 2; 1, 3; 2, 3]); 598s ***** test 598s c = combnk (1:3, 6); 598s assert (isempty (c)); 598s ***** test 598s c = combnk ({1, 2, 3}, 2); 598s assert (c, {1, 2; 1, 3; 2, 3}); 598s ***** test 598s c = combnk ("hello", 2); 598s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 598s 4 tests, 4 passed, 0 known failure, 0 skipped 598s [inst/cluster.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cluster.m 598s ***** error cluster () 598s ***** error cluster ([1 1], "Cutoff", 1) 598s ***** error cluster ([1 2 1], "Bogus", 1) 598s ***** error cluster ([1 2 1], "Cutoff", -1) 598s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 598s ***** test 598s 6 tests, 6 passed, 0 known failure, 0 skipped 598s [inst/logistic_regression.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/logistic_regression.m 598s ***** test 598s # Output compared to following MATLAB commands 598s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 598s # P = mnrval(B,X) 598s X = [1.489381332449196, 1.1534152241851305; ... 598s 1.8110085304863965, 0.9449666896938425; ... 598s -0.04453299665130296, 0.34278203449678646; ... 598s -0.36616019468850347, 1.130254275908322; ... 598s 0.15339143291005095, -0.7921044310668951; ... 598s -1.6031878794469698, -1.8343471035233376; ... 598s -0.14349521143198166, -0.6762996896828459; ... 598s -0.4403818557740143, -0.7921044310668951; ... 598s -0.7372685001160434, -0.027793137932169563; ... 598s -0.11875465773681024, 0.5512305689880763]; 598s Y = [1,1,1,1,1,0,0,0,0,0]'; 598s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 598s ***** test 598s # Output compared to following MATLAB commands 598s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 598s load carbig 598s X = [Acceleration Displacement Horsepower Weight]; 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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, ... 598s 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]'; 598s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 598s assert (DEV, 433.197174495549, 1e-05); 598s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 598s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 598s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 598s assert (SLOPE(1), 0.104762463756714, 1e-05); 598s assert (SLOPE(2), 0.0103357623191891, 1e-05); 598s assert (SLOPE(3), 0.0645199313242276, 1e-05); 598s assert (SLOPE(4), 0.00166377028388103, 1e-05); 598s 2 tests, 2 passed, 0 known failure, 0 skipped 598s [inst/cdfplot.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cdfplot.m 598s ***** demo 598s x = randn(100,1); 598s cdfplot (x); 598s ***** test 598s hf = figure ("visible", "off"); 598s unwind_protect 598s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 598s [hCDF, stats] = cdfplot (x); 598s assert (stats.min, 2); 598s assert (stats.max, 6); 598s assert (stats.median, 3.5); 598s assert (stats.std, 1.35400640077266, 1e-14); 598s unwind_protect_cleanup 598s close (hf); 598s end_unwind_protect 598s ***** test 598s hf = figure ("visible", "off"); 598s unwind_protect 598s x = randn(100,1); 598s cdfplot (x); 598s unwind_protect_cleanup 598s close (hf); 598s end_unwind_protect 598s ***** error cdfplot (); 598s ***** error cdfplot ([x',x']); 598s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 598s 5 tests, 5 passed, 0 known failure, 0 skipped 598s [inst/standardizeMissing.m] 598s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/standardizeMissing.m 598s ***** assert (standardizeMissing (1, 1), NaN) 598s ***** assert (standardizeMissing (1, 0), 1) 598s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 598s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 598s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 598s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 598s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 598s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 598s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 598s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 598s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 598s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 598s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 598s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 598s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 598s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 598s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 598s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 598s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 598s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 598s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 598s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 598s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 598s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 598s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 598s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 598s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 598s ***** assert (standardizeMissing (single (1), true), single (NaN)) 598s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 598s ***** assert (standardizeMissing (true, true), true) 598s ***** assert (standardizeMissing (true, 1), true) 598s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 598s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 598s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 598s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 598s ***** error standardizeMissing (); 598s ***** error standardizeMissing (1); 599s ***** error standardizeMissing (1,2,3); 599s ***** error standardizeMissing ({'abc', 1}, 1); 599s ***** error standardizeMissing (struct ('a','b'), 1); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 599s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 599s 49 tests, 49 passed, 0 known failure, 0 skipped 599s [inst/confusionmat.m] 599s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/confusionmat.m 599s ***** test 599s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 599s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 599s 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; ... 599s 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]; 599s assert (confusionmat (Yt, Yp), C) 599s 1 test, 1 passed, 0 known failure, 0 skipped 599s [inst/squareform.m] 599s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/squareform.m 599s ***** shared v, m 599s v = 1:6; 599s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 599s ***** assert (squareform (v), m) 599s ***** assert (squareform (squareform (v)), v) 599s ***** assert (squareform (m), v) 599s ***** assert (squareform (v'), m) 599s ***** assert (squareform (1), [0 1;1 0]) 599s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 599s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 599s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 599s ***** test 599s for c = {@single, @double, @uint8, @uint32, @uint64} 599s f = c{1}; 599s assert (squareform (f (v)), f (m)) 599s assert (squareform (f (m)), f (v)) 599s endfor 599s 9 tests, 9 passed, 0 known failure, 0 skipped 599s [inst/fillmissing.m] 599s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fillmissing.m 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 599s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 599s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 599s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 599s ***** test 599s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 599s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 599s assert (fillmissing (x, "constant", 99), y); 599s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 599s assert (fillmissing (x, "constant", [94:99]), y); 599s assert (fillmissing (x, "constant", [94:99]'), y); 599s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 599s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 599s assert (fillmissing (x, "constant", [94:99], 1), y); 599s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 599s assert (fillmissing (x, "constant", [96:99], 2), y); 599s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 599s assert (fillmissing (x, "constant", [94:99], 3), y); 599s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 599s assert (fillmissing (x, "constant", [88:99], 99), y); 599s ***** test 599s x = reshape ([1:24], 4, 3, 2); 599s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s y = x; 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 599s assert (fillmissing (x, "constant", [94:99], 1), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 599s assert (fillmissing (x, "constant", [92:99], 2), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 599s assert (fillmissing (x, "constant", [88:99], 3), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 599s assert (fillmissing (x, "constant", [76:99], 99), y); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 599s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 599s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 599s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 599s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 599s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 599s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 599s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s y = x; 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 599s y([8]) = 99; 599s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 599s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 599s y = x; 599s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 599s y([6, 18, 20, 21]) = 99; 599s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 599s y(y == 99) = 88; 599s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 599s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 599s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 599s y([8]) = 94; 599s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 599s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 599s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 599s y = x; 599s y(isnan (y)) = 88; 599s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 599s y = x; 599s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 599s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 599s y = x; 599s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 599s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 599s y = x; 599s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 599s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 599s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 599s ***** test 599s x = reshape ([1:24],4,3,2); 599s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s y = x; 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 599s assert (fillmissing (x, "constant", [94:99], 1), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 599s assert (fillmissing (x, "constant", [92:99], 2), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 599s assert (fillmissing (x, "constant", [88:99], 3), y); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 599s assert (fillmissing (x, "constant", [76:99], 99), y); 599s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 599s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** test 599s x = reshape ([1:24], 4, 3, 2); 599s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s y = x; 599s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 599s assert (fillmissing (x, "next", 1), y); 599s y = x; 599s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 599s assert (fillmissing (x, "next", 2), y); 599s y = x; 599s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 599s assert (fillmissing (x, "next", 3), y); 599s assert (fillmissing (x, "next", 99), x); 599s y = x; 599s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 599s assert (fillmissing (x, "previous", 1), y); 599s y = x; 599s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 599s assert (fillmissing (x, "previous", 2), y); 599s y = x; 599s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 599s assert (fillmissing (x, "previous", 3), y); 599s assert (fillmissing (x, "previous", 99), x); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 599s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 599s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 599s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 599s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 599s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 599s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 599s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 599s y = x; 599s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 599s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 599s y = x; 599s y([16, 19, 21]) = [4, 7, 9]; 599s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 599s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 599s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 599s y = x; 599s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 599s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 599s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 599s y = x; 599s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 599s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 599s y = x; 599s y([2, 5]) = [14, 17]; 599s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 599s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 599s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 599s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 599s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 599s ***** test 599s x = reshape ([1:24], 4, 3, 2); 599s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s y = x; 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 599s assert (fillmissing (x, "nearest", 1), y); 599s y = x; 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 599s assert (fillmissing (x, "nearest", 2), y); 599s y = x; 599s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 599s assert (fillmissing (x, "nearest", 3), y); 599s assert (fillmissing (x, "nearest", 99), x); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 599s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 599s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 599s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 599s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 599s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 599s y = x; 599s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 599s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 599s y = x; 599s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 599s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 599s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 599s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 599s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 599s ***** test 599s x = reshape ([1:24], 4, 3, 2); 599s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 599s y = reshape ([1:24], 4, 3, 2); 599s y([1, 9, 14, 19, 22, 23]) = NaN; 599s assert (fillmissing (x, "linear", 2), y); 599s y = reshape ([1:24], 4, 3, 2); 599s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 599s assert (fillmissing (x, "linear", 3), y); 599s assert (fillmissing (x, "linear", 99), x); 599s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 599s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 599s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 599s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 599s y(8) = 8; 599s assert (fillmissing (x, "linear", "endvalues", 0), y); 599s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 599s y = x; 599s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 599s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 599s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 599s y = x; 599s y(isnan(y)) = 0; 599s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 599s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 599s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 599s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 599s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 599s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 599s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 599s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 599s ***** test <60965> 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 599s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 599s !!!!! known bug: https://octave.org/testfailure/?60965 599s interp1: invalid METHOD 'makima' 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 599s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 599s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 599s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 599s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 599s ***** 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]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 599s assert (fillmissing (x, "movmean", 3), y); 599s assert (fillmissing (x, "movmean", [1, 1]), y); 599s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 599s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 599s y = x; 599s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 599s assert (fillmissing (x, "movmean", 3, 2), y); 599s assert (fillmissing (x, "movmean", [1, 1], 2), y); 599s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 599s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 599s y([1, 18]) = NaN; 599s y(6) = 9; 599s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 599s y = x; 599s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 599s y(8) = 8; 599s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 599s y = x; 599s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 599s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 599s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 599s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 599s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 599s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 599s ***** 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]) 599s ***** test 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 599s assert (fillmissing (x, "movmedian", 3), y); 599s assert (fillmissing (x, "movmedian", [1, 1]), y); 599s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 599s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 599s y = x; 599s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 599s assert (fillmissing (x, "movmedian", 3, 2), y); 599s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 599s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 599s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 599s y([1,18]) = NaN; 599s y(6) = 9; 599s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 599s y = x; 599s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 599s y(8) = 8; 599s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 599s y = x; 599s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 599s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 599s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 599s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 599s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 599s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 599s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 599s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 599s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 599s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 599s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 599s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 599s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 599s ***** function A = testfcn (x, y, z) 599s if (isempty (y)) 599s A = z; 599s elseif (numel (y) == 1) 599s A = repelem (x(1), numel(z)); 599s else 599s A = interp1 (y, x, z, "linear", "extrap"); 599s endif 599s ***** endfunction 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 599s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 599s ***** 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] 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 599s ***** 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]' 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 599s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 599s ***** 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) 599s ***** 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] 599s ***** test 599s ***** function A = testfcn (x, y, z) 599s if (isempty (y)) 599s A = z; 599s elseif (numel (y) == 1) 599s A = repelem (x(1), numel(z)); 599s else 599s A = interp1 (y, x, z, "linear", "extrap"); 599s endif 599s ***** endfunction 599s x = reshape ([1:24], 3, 4, 2); 599s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 599s y = x; 599s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 599s assert (fillmissing (x, @testfcn, 3), y); 599s assert (fillmissing (x, @testfcn, [1, 1]), y); 599s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 599s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 599s y= x; 599s y(isnan (x)) = 99; 599s y(8) = 8; 599s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 599s y = x; 599s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 599s assert (fillmissing (x, @testfcn, 3, 2), y); 599s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 599s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 599s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 599s y(1) = NaN; 599s y([6, 18, 21]) = [9, 24, 24]; 599s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 599s y = x; 599s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 599s y(8) = 8; 599s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 599s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 599s y(8) = 99; 599s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 599s y([6, 18, 20, 21]) = 99; 599s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 599s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 599s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 599s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 599s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 599s ***** 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]) 599s ***** test 599s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 599s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 599s y = x; 599s y([4, 7, 12]) = 0; 599s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 599s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 599s y = x; 599s y([5, 7, 12]) = 0; 599s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 599s y = x; 599s y([4, 5, 7]) = 0; 599s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 599s ***** test 599s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 599s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 599s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 599s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 599s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 599s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 599s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 599s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 599s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 599s ***** test 599s x = [NaN, 2, 3]; 599s [~, idx] = fillmissing (x, "previous"); 599s assert (idx, logical ([0, 0, 0])); 599s [~, idx] = fillmissing (x, "movmean", 1); 599s assert (idx, logical ([0, 0, 0])); 599s x = [1:3; 4:6; 7:9]; 599s x([2, 4, 7, 9]) = NaN; 599s [~, idx] = fillmissing (x, "linear"); 599s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 599s [~, idx] = fillmissing (x, "movmean", 2); 599s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 599s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 599s assert (A, [1, 2, 3, 3, NaN]); 599s assert (idx, logical ([0, 0, 0, 1, 0])); 599s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 599s assert (A, [1, 2, 3, 3, NaN]); 599s assert (idx, logical ([0, 0, 0, 1, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 599s assert (A, [1, 2, 3, 3, NaN]); 599s assert (idx, logical ([0, 0, 0, 1, 0])); 599s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 599s assert (A, [1, 2, 1, 4, 1]); 599s assert (idx, logical ([0, 1, 0, 1, 0])); 599s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 599s assert (A, [1, NaN, 1, NaN, 1]); 599s assert (idx, logical ([0, 0, 0, 0, 0])); 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 599s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 599s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 599s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 599s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 599s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 599s ***** test 599s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 599s assert (idx, logical ([0, 0, 0, 0, 0])); 599s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 599s assert (idx, logical ([0, 1, 1, 1, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 599s assert (A, [1, 2, 2, NaN, NaN]); 599s assert (idx, logical ([0, 0, 1, 0, 0])); 599s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 599s assert (A, [1, 1, 1, 1, 1]); 599s assert (idx, logical ([0, 1, 0, 1, 1])); 599s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 599s assert (A, [1, NaN, 1, NaN, NaN]); 599s assert (idx, logical ([0, 0, 0, 0, 0])); 599s ***** test 599s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 599s assert (A, [1, 3, 5]); 599s assert (idx, logical ([0, 1, 0])); 599s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 599s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 599s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 599s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 599s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 599s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 599s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 599s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 599s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 599s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 599s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 599s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 599s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 600s ***** test 600s [A, idx] = fillmissing (" a b c", "constant", " "); 600s assert (A, " a b c"); 600s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 600s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 600s assert (A, {"foo", "", "bar", ""}); 600s assert (idx, logical ([0, 0, 0, 0])); 600s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 600s assert (A, {"foo", "", "bar", ""}); 600s assert (idx, logical ([0, 0, 0, 0])); 600s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 600s assert (A, "afaoaoa"); 600s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 600s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 600s assert (A, " f o o "); 600s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 600s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 600s assert (A, {"a", "foo", "a"}); 600s assert (idx, logical ([1, 0, 1])); 600s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 600s assert (A, {"", "foo", ""}); 600s assert (idx, logical ([0, 0, 0])); 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 600s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 600s ***** 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])) 600s ***** 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])) 600s ***** test 600s x = logical ([1, 0, 1, 0, 1]); 600s [~, idx] = fillmissing (x, "constant", true); 600s assert (idx, logical ([0, 0, 0, 0, 0])); 600s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([0, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 0])); 600s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 600s assert (idx, logical ([0, 0, 0, 0, 0])) 600s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])) 600s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([0, 0, 1, 0, 1])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 600s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 600s ***** 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])) 600s ***** 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])) 600s ***** test 600s x = int32 ([1, 2, 3, 4, 5]); 600s [~, idx] = fillmissing (x, "constant", 0); 600s assert (idx, logical ([0, 0, 0, 0, 0])); 600s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 600s assert (idx, logical ([0, 0, 1, 0, 0])); 600s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([0, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 0])); 600s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 600s assert (idx, logical ([0, 0, 0, 0, 0])); 600s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([1, 0, 1, 0, 1])); 600s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 600s assert (idx, logical ([0, 0, 1, 0, 1])); 600s ***** test 600s [A, idx] = fillmissing ([struct, struct], "constant", 1); 600s assert (A, [struct, struct]) 600s assert (idx, [false, false]) 600s ***** error fillmissing () 600s ***** error fillmissing (1) 600s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 600s ***** error fillmissing (1, 2) 600s ***** error fillmissing (1, "foo") 600s ***** error fillmissing (1, @(x) x, 1) 600s ***** error fillmissing (1, @(x,y) x+y, 1) 600s ***** error fillmissing ("a b c", "linear") 600s ***** error fillmissing ({"a", "b"}, "linear") 600s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 600s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 600s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 600s ***** error fillmissing (1, "constant", []) 600s ***** error fillmissing (1, "constant", "a") 600s ***** error fillmissing ("a", "constant", 1) 600s ***** error fillmissing ("a", "constant", {"foo"}) 600s ***** error fillmissing ({"foo"}, "constant", 1) 600s ***** error fillmissing (1, "movmean") 600s ***** error fillmissing (1, "movmedian") 600s ***** error fillmissing (1, "constant", 1, 0) 600s ***** error fillmissing (1, "constant", 1, -1) 600s ***** error fillmissing (1, "constant", 1, [1, 2]) 600s ***** error fillmissing (1, "constant", 1, "samplepoints") 600s ***** error fillmissing (1, "constant", 1, "foo") 600s ***** error fillmissing (1, "constant", 1, 1, "foo") 600s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 600s ***** error fillmissing ("foo", "next", "endvalues", 1) 600s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 600s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 600s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 600s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 600s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 600s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 600s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 600s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 600s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 600s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 600s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 600s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 600s ***** error fillmissing (true, "linear", "missinglocations", true) 600s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 600s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 600s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 600s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 600s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 600s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 600s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 600s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 600s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 600s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 600s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 600s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 600s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 600s ***** error fillmissing (1, @(x,y,z) x+y+z) 600s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 600s 380 tests, 379 passed, 0 known failure, 1 skipped 600s [inst/hmmviterbi.m] 600s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hmmviterbi.m 600s ***** test 600s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 600s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 600s transprob = [0.8, 0.2; 0.4, 0.6]; 600s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 600s vpath = hmmviterbi (sequence, transprob, outprob); 600s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 600s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 600s assert (vpath, expected); 600s ***** test 600s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 600s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 600s transprob = [0.8, 0.2; 0.4, 0.6]; 600s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 600s symbols = {"A", "B", "C"}; 600s statenames = {"One", "Two"}; 600s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 600s "statenames", statenames); 600s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 600s "One", "One", "One", "One", "One", "One", "One", "Two", ... 600s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 600s assert (vpath, expected); 600s 2 tests, 2 passed, 0 known failure, 0 skipped 600s [inst/confusionchart.m] 600s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/confusionchart.m 600s ***** demo 600s ## Setting the chart properties 600s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 600s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 600s confusionchart (Yt, Yp, "Title", ... 600s "Demonstration with summaries","Normalization",... 600s "absolute","ColumnSummary", "column-normalized","RowSummary",... 600s "row-normalized") 600s ***** demo 600s ## Cellstr as inputs 600s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 600s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 600s m = confusionmat (Yt, Yp); 600s confusionchart (m, {"Positive", "Negative"}); 600s ***** demo 600s ## Editing the object properties 600s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 600s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 600s cm = confusionchart (Yt, Yp); 600s cm.Title = "This is an example with a green diagonal"; 600s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 600s ***** demo 600s ## Confusion chart in a uipanel 600s h = uipanel (); 600s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 600s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 600s cm = confusionchart (h, Yt, Yp); 600s ***** demo 600s ## Sorting classes 600s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 600s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 600s cm = confusionchart (Yt, Yp, "Title", ... 600s "Classes are sorted in ascending order"); 600s cm = confusionchart (Yt, Yp, "Title", ... 600s "Classes are sorted according to clusters"); 600s sortClasses (cm, "cluster"); 600s ***** shared visibility_setting 600s visibility_setting = get (0, "DefaultFigureVisible"); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ()", "Invalid call"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 600s ".* YLabel .* string"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 600s set (0, "DefaultFigureVisible", visibility_setting); 600s ***** test 600s set (0, "DefaultFigureVisible", "off"); 600s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 600s ".* FontName .* string"); 600s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 601s ".* FontSize .* numeric"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 601s ".* DiagonalColor .* color"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 601s ".* OffDiagonalColor .* color"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 601s ".* invalid .* Normalization"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 601s ".* invalid .* ColumnSummary"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 601s ".* invalid .* RowSummary"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 601s ".* invalid .* GridVisible"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 601s ".* invalid .* HandleVisibility"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 601s ".* invalid .* OuterPosition"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 601s ".* invalid .* Position"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s ***** test 601s set (0, "DefaultFigureVisible", "off"); 601s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 601s set (0, "DefaultFigureVisible", visibility_setting); 601s 18 tests, 18 passed, 0 known failure, 0 skipped 601s [inst/tabulate.m] 601s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/tabulate.m 601s ***** demo 601s ## Generate a frequency table for a vector of data in a cell array 601s load patients 601s 601s ## Display the first seven entries of the Gender variable 601s gender = Gender(1:7) 601s 601s ## Compute the equency table that shows the number and 601s ## percentage of Male and Female patients 601s tabulate (Gender) 601s ***** demo 601s ## Create a frequency table for a vector of positive integers 601s load patients 601s 601s ## Display the first seven entries of the Gender variable 601s height = Height(1:7) 601s 601s ## Create a frequency table that shows, in its second and third columns, 601s ## the number and percentage of patients with a particular height. 601s table = tabulate (Height); 601s 601s ## Display the first and last seven entries of the frequency table 601s first = table(1:7,:) 601s 601s last = table(end-6:end,:) 601s ***** demo 601s ## Create a frequency table from a character array 601s load carsmall 601s 601s ## Tabulate the data in the Origin variable, which shows the 601s ## country of origin of each car in the data set 601s tabulate (Origin) 601s ***** demo 601s ## Create a frequency table from a numeric vector with NaN values 601s load carsmall 601s 601s ## The carsmall dataset contains measurements of 100 cars 601s total_cars = length (MPG) 601s ## For six cars, the MPG value is missing 601s missingMPG = length (MPG(isnan (MPG))) 601s 601s ## Create a frequency table using MPG 601s tabulate (MPG) 601s table = tabulate (MPG); 601s 601s ## Only 94 cars were used 601s valid_cars = sum (table(:,2)) 601s ***** test 601s load patients 601s table = tabulate (Gender); 601s assert (table{1,1}, "Male"); 601s assert (table{2,1}, "Female"); 601s assert (table{1,2}, 47); 601s assert (table{2,2}, 53); 601s ***** test 601s load patients 601s table = tabulate (Height); 601s assert (table(end-4,:), [68, 15, 15]); 601s assert (table(end-3,:), [69, 8, 8]); 601s assert (table(end-2,:), [70, 11, 11]); 601s assert (table(end-1,:), [71, 10, 10]); 601s assert (table(end,:), [72, 4, 4]); 601s ***** error tabulate (ones (3)) 601s ***** error tabulate ({1, 2, 3, 4}) 601s ***** error ... 601s tabulate ({"a", "b"; "a", "c"}) 601s 5 tests, 5 passed, 0 known failure, 0 skipped 601s [inst/crosstab.m] 601s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/crosstab.m 601s ***** error crosstab () 601s ***** error crosstab (1) 601s ***** error crosstab (ones (2), [1 1]) 601s ***** error crosstab ([1 1], ones (2)) 601s ***** error crosstab ([1], [1 2]) 601s ***** error crosstab ([1 2], [1]) 601s ***** test 601s load carbig 601s [table, chisq, p, labels] = crosstab (cyl4, when, org); 601s assert (table(2,3,1), 38); 601s assert (labels{3,3}, "Japan"); 601s ***** test 601s load carbig 601s [table, chisq, p, labels] = crosstab (cyl4, when, org); 601s assert (table(2,3,2), 17); 601s assert (labels{1,3}, "USA"); 601s 8 tests, 8 passed, 0 known failure, 0 skipped 601s [inst/wblplot.m] 601s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/wblplot.m 601s ***** demo 601s x = [16 34 53 75 93 120]; 601s wblplot (x); 601s ***** demo 601s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 601s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 601s [h, p] = wblplot (x, c); 601s p 601s ***** demo 601s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 601s [h, p] = wblplot (x, [], [], 0.05); 601s p 601s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 601s ***** demo 601s x = [46 64 83 105 123 150 150]; 601s c = [0 0 0 0 0 0 1]; 601s f = [1 1 1 1 1 1 4]; 601s wblplot (x, c, f, 0.05); 601s ***** demo 601s x = [46 64 83 105 123 150 150]; 601s c = [0 0 0 0 0 0 1]; 601s f = [1 1 1 1 1 1 4]; 601s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 601s wblplot (x - 30.92, c, f, 0.05); 601s ***** test 601s hf = figure ("visible", "off"); 601s unwind_protect 601s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 601s [h, p] = wblplot (x, [], [], 0.05); 601s assert (numel (h), 4) 601s assert (p(1), 146.2545, 1E-4) 601s assert (p(2), 1.1973, 1E-4) 601s assert (p(3), 0.9999, 5E-5) 601s unwind_protect_cleanup 601s close (hf); 601s end_unwind_protect 602s 1 test, 1 passed, 0 known failure, 0 skipped 602s [inst/gscatter.m] 602s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/gscatter.m 602s ***** demo 602s load fisheriris; 602s X = meas(:,3:4); 602s cidcs = kmeans (X, 3, "Replicates", 5); 602s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 602s title ("Fisher's iris data"); 602s ***** shared visibility_setting 602s visibility_setting = get (0, "DefaultFigureVisible"); 602s ***** test 602s hf = figure ("visible", "off"); 602s unwind_protect 602s load fisheriris; 602s X = meas(:,3:4); 602s cidcs = kmeans (X, 3, "Replicates", 5); 602s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 602s title ("Fisher's iris data"); 602s unwind_protect_cleanup 602s close (hf); 602s end_unwind_protect 602s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 602s ***** error gscatter (); 602s ***** error gscatter ([1]); 602s ***** error gscatter ([1], [2]); 602s ***** error gscatter ('abc', [1 2 3], [1]); 602s ***** error gscatter ([1 2 3], [1 2], [1]); 602s ***** error gscatter ([1 2 3], 'abc', [1]); 602s ***** error gscatter ([1 2], [1 2], [1]); 602s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 602s 9 tests, 9 passed, 0 known failure, 0 skipped 602s [inst/rmmissing.m] 602s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/rmmissing.m 602s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 602s ***** assert (rmmissing ('abcd f'), 'abcdf') 602s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 602s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 602s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 602s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 602s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 602s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 602s ***** test 602s x = [1:6]; 602s x([2,4]) = NaN; 602s [~, idx] = rmmissing (x); 602s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 602s assert (class(idx), 'logical'); 602s x = reshape (x, [2, 3]); 602s [~, idx] = rmmissing (x); 602s assert (idx, logical ([0; 1])); 602s assert (class(idx), 'logical'); 602s [~, idx] = rmmissing (x, 2); 602s assert (idx, logical ([1, 1, 0])); 602s assert (class(idx), 'logical'); 602s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 602s assert (idx, logical ([0; 1])); 602s assert (class(idx), 'logical'); 602s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 602s assert (idx, logical ([0, 0, 0])); 602s assert (class(idx), 'logical'); 602s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 602s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 602s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 602s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 602s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 602s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 602s ***** assert (rmmissing ([]), []) 602s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 602s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 602s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 602s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 602s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 602s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 602s ***** error rmmissing (ones (0,1,2)) 602s ***** error rmmissing () 602s ***** error rmmissing (ones(2,2,2)) 602s ***** error rmmissing ([1 2; 3 4], 5) 602s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 602s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 602s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 602s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 602s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 602s 31 tests, 31 passed, 0 known failure, 0 skipped 602s [inst/ranksum.m] 602s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ranksum.m 602s ***** test 602s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 602s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 602s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 602s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 602s assert (p, 0.004329004329004329, 1e-14); 602s assert (h, true); 602s assert (stats.ranksum, 21.5); 602s ***** test 602s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 602s 49 47 50 60 59 60 62 61 71]'; 602s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 602s 54 50 53 62 62 62 72 60 67]'; 602s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 602s assert (p, 0.1270832752950605, 1e-14); 602s assert (h, false); 602s assert (stats.ranksum, 837.5); 602s assert (stats.zval, -1.140287483634606, 1e-14); 602s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 602s "method", "exact"); 602s assert (p, 0.127343916432862, 1e-14); 602s assert (h, false); 602s assert (stats.ranksum, 837.5); 608s 2 tests, 2 passed, 0 known failure, 0 skipped 608s [inst/clusterdata.m] 608s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/clusterdata.m 608s ***** demo 608s randn ("seed", 1) # for reproducibility 608s r1 = randn (10, 2) * 0.25 + 1; 608s randn ("seed", 5) # for reproducibility 608s r2 = randn (20, 2) * 0.5 - 1; 608s X = [r1; r2]; 608s 608s wnl = warning ("off", "Octave:linkage_savemem", "local"); 608s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 608s scatter (X(:,1), X(:,2), 36, T, "filled"); 608s ***** error ... 608s clusterdata () 608s ***** error ... 608s clusterdata (1) 608s ***** error clusterdata ([1 1], "Bogus", 1) 608s ***** error clusterdata ([1 1], "Depth", 1) 608s 4 tests, 4 passed, 0 known failure, 0 skipped 608s [inst/loadmodel.m] 608s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/loadmodel.m 608s ***** error loadmodel () 608s ***** error ... 608s loadmodel ("fisheriris.mat") 608s ***** error ... 608s loadmodel ("fail_loadmodel.mdl") 608s ***** error ... 608s loadmodel ("fail_load_model.mdl") 608s 4 tests, 4 passed, 0 known failure, 0 skipped 608s [inst/Regression/RegressionGAM.m] 608s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/Regression/RegressionGAM.m 608s ***** demo 608s ## Train a RegressionGAM Model for synthetic values 608s f1 = @(x) cos (3 * x); 608s f2 = @(x) x .^ 3; 608s x1 = 2 * rand (50, 1) - 1; 608s x2 = 2 * rand (50, 1) - 1; 608s y = f1(x1) + f2(x2); 608s y = y + y .* 0.2 .* rand (50,1); 608s X = [x1, x2]; 608s a = fitrgam (X, y, "tol", 1e-3) 608s ***** demo 608s ## Declare two different functions 608s f1 = @(x) cos (3 * x); 608s f2 = @(x) x .^ 3; 608s 608s ## Generate 80 samples for f1 and f2 608s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 608s X1 = f1 (x); 608s X2 = f2 (x); 608s 608s ## Create a synthetic response by adding noise 608s rand ("seed", 3); 608s Ytrue = X1 + X2; 608s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 608s 608s ## Assemble predictor data 608s X = [X1, X2]; 608s 608s ## Train the GAM and test on the same data 608s a = fitrgam (X, Y, "order", [5, 5]); 608s [ypred, ySDsd, yInt] = predict (a, X); 608s 608s ## Plot the results 608s figure 608s [sortedY, indY] = sort (Ytrue); 608s plot (sortedY, "r-"); 608s xlim ([0, 80]); 608s hold on 608s plot (ypred(indY), "g+") 608s plot (yInt(indY,1), "k:") 608s plot (yInt(indY,2), "k:") 608s xlabel ("Predictor samples"); 608s ylabel ("Response"); 608s title ("actual vs predicted values for function f1(x) = cos (3x) "); 608s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 608s 608s ## Use 30% Holdout partitioning for training and testing data 608s C = cvpartition (80, "HoldOut", 0.3); 608s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 608s 608s ## Plot the results 608s figure 608s [sortedY, indY] = sort (Ytrue(test(C))); 608s plot (sortedY, 'r-'); 608s xlim ([0, sum(test(C))]); 608s hold on 608s plot (ypred(indY), "g+") 608s plot (yInt(indY,1),'k:') 608s plot (yInt(indY,2),'k:') 608s xlabel ("Predictor samples"); 608s ylabel ("Response"); 608s title ("actual vs predicted values for function f1(x) = cos (3x) "); 608s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 608s ***** test 608s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 608s y = [1; 2; 3; 4]; 608s a = RegressionGAM (x, y); 608s assert ({a.X, a.Y}, {x, y}) 608s assert ({a.BaseModel.Intercept}, {2.5000}) 608s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 608s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 608s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 608s assert ({a.Formula}, {[]}) 608s ***** test 608s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 608s y = [1; 2; 3; 4]; 608s pnames = {"A", "B", "C", "D"}; 608s formula = "Y ~ A + B + C + D + A:C"; 608s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 608s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 608s assert ({a.IntMatrix}, {intMat}) 608s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 608s assert ({a.Formula}, {formula}) 608s ***** error RegressionGAM () 608s ***** error RegressionGAM (ones(10,2)) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (5,1)) 608s ***** error ... 608s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 608s ***** error 608s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 608s ***** error 608s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 608s ***** error ... 608s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 608s ***** error ... 608s predict (RegressionGAM (ones(10,1), ones(10,1))) 608s ***** error ... 608s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 608s ***** error ... 608s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 608s 39 tests, 39 passed, 0 known failure, 0 skipped 608s [inst/kmeans.m] 608s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/kmeans.m 608s ***** demo 608s ## Generate a two-cluster problem 608s randn ("seed", 31) # for reproducibility 608s C1 = randn (100, 2) + 1; 608s randn ("seed", 32) # for reproducibility 608s C2 = randn (100, 2) - 1; 608s data = [C1; C2]; 608s 608s ## Perform clustering 608s rand ("seed", 1) # for reproducibility 608s [idx, centers] = kmeans (data, 2); 608s 608s ## Plot the result 608s figure; 608s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 608s hold on; 608s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 608s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 608s hold off; 608s ***** demo 608s ## Cluster data using k-means clustering, then plot the cluster regions 608s ## Load Fisher's iris data set and use the petal lengths and widths as 608s ## predictors 608s 608s load fisheriris 608s X = meas(:,3:4); 608s 608s figure; 608s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 608s title ("Fisher's Iris Data"); 608s xlabel ("Petal Lengths (cm)"); 608s ylabel ("Petal Widths (cm)"); 608s 608s ## Cluster the data. Specify k = 3 clusters 608s rand ("seed", 1) # for reproducibility 608s [idx, C] = kmeans (X, 3); 608s x1 = min (X(:,1)):0.01:max (X(:,1)); 608s x2 = min (X(:,2)):0.01:max (X(:,2)); 608s [x1G, x2G] = meshgrid (x1, x2); 608s XGrid = [x1G(:), x2G(:)]; 608s 608s idx2Region = kmeans (XGrid, 3, "MaxIter", 1, "Start", C); 608s figure; 608s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 608s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 608s hold on; 608s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 608s title ("Fisher's Iris Data"); 608s xlabel ("Petal Lengths (cm)"); 608s ylabel ("Petal Widths (cm)"); 608s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 608s hold off 608s ***** demo 608s ## Partition Data into Two Clusters 608s 608s randn ("seed", 1) # for reproducibility 608s r1 = randn (100, 2) * 0.75 + ones (100, 2); 608s randn ("seed", 2) # for reproducibility 608s r2 = randn (100, 2) * 0.5 - ones (100, 2); 608s X = [r1; r2]; 608s 608s figure; 608s plot (X(:,1), X(:,2), "."); 608s title ("Randomly Generated Data"); 608s rand ("seed", 1) # for reproducibility 608s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 608s "Replicates", 5, "Display", "final"); 608s figure; 608s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 608s hold on 608s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 608s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 608s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 608s title ("Cluster Assignments and Centroids"); 608s hold off 608s ***** demo 608s ## Assign New Data to Existing Clusters 608s 608s ## Generate a training data set using three distributions 608s randn ("seed", 5) # for reproducibility 608s r1 = randn (100, 2) * 0.75 + ones (100, 2); 608s randn ("seed", 7) # for reproducibility 608s r2 = randn (100, 2) * 0.5 - ones (100, 2); 608s randn ("seed", 9) # for reproducibility 608s r3 = randn (100, 2) * 0.75; 608s X = [r1; r2; r3]; 608s 608s ## Partition the training data into three clusters by using kmeans 608s 608s rand ("seed", 1) # for reproducibility 608s [idx, C] = kmeans (X, 3); 608s 608s ## Plot the clusters and the cluster centroids 608s 608s figure 608s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 608s hold on 608s plot (C(:,1), C(:,2), "kx"); 608s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 608s 608s ## Generate a test data set 608s randn ("seed", 25) # for reproducibility 608s r1 = randn (100, 2) * 0.75 + ones (100, 2); 608s randn ("seed", 27) # for reproducibility 608s r2 = randn (100, 2) * 0.5 - ones (100, 2); 608s randn ("seed", 29) # for reproducibility 608s r3 = randn (100, 2) * 0.75; 608s Xtest = [r1; r2; r3]; 608s 608s ## Classify the test data set using the existing clusters 608s ## Find the nearest centroid from each test data point by using pdist2 608s 608s D = pdist2 (C, Xtest, "euclidean"); 608s [group, ~] = find (D == min (D)); 608s 608s ## Plot the test data and label the test data using idx_test with gscatter 608s 608s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 608s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 608s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 608s "Data classified to Cluster 3", "Location", "NorthWest"); 608s title ("Assign New Data to Existing Clusters"); 608s ***** test 608s samples = 4; 608s dims = 3; 608s k = 2; 608s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 608s "emptyAction", "singleton"); 608s assert (size (cls), [samples, 1]); 608s assert (size (c), [k, dims]); 608s assert (size (d), [k, 1]); 608s assert (size (z), [samples, k]); 608s ***** test 608s samples = 4; 608s dims = 3; 608s k = 2; 608s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 608s "emptyAction", "singleton"); 608s assert (size (cls), [samples, 1]); 608s assert (size (c), [k, dims]); 608s assert (size (d), [k, 1]); 608s assert (size (z), [samples, k]); 608s ***** test 608s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 608s assert (cls, [1; 1]); 608s assert (c, [1.5, 0; NA, NA]); 608s ***** test 608s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 608s "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 608s ***** test 608s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 608s ***** test 608s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 608s ***** error kmeans (rand (3,2), 4); 608s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 608s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 608s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 608s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 608s ***** error kmeans (rand (3,4), 2, "start", "normal"); 608s ***** error kmeans (rand (4,3), 2, "replicates", i); 608s ***** error kmeans (rand (4,3), 2, "replicates", -1); 608s ***** error kmeans (rand (4,3), 2, "replicates", []); 608s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 608s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 608s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 608s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 608s ***** error kmeans (rand (4,3), 2, "maxiter", []); 608s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 608s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 608s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 608s 31 tests, 31 passed, 0 known failure, 0 skipped 608s [inst/slicesample.m] 608s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/slicesample.m 608s ***** demo 608s ## Define function to sample 608s d = 2; 608s mu = [-1; 2]; 608s rand ("seed", 5) # for reproducibility 608s Sigma = rand (d); 608s Sigma = (Sigma + Sigma'); 608s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 608s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 608s 608s ## Inputs 608s start = ones (1,2); 608s nsamples = 500; 608s K = 500; 608s m = 10; 608s rande ("seed", 4); rand ("seed", 5) # for reproducibility 608s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 608s figure; 608s hold on; 608s plot (smpl(:,1), smpl(:,2), 'x'); 608s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 608s z = reshape (pdf ([x(:), y(:)]), size(x)); 608s mesh (x, y, z, "facecolor", "None"); 608s 608s ## Using sample points to find the volume of half a sphere with radius of .5 608s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 608s int = mean (f (smpl) ./ pdf (smpl)); 608s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 608s trueerr = abs (2/3*pi*.25^(3/2)-int); 608s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 608s fprintf ("Monte Carlo integral error estimate %f\n", errest); 608s fprintf ("The actual error %f\n", trueerr); 608s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 608s ***** demo 608s ## Integrate truncated normal distribution to find normilization constant 608s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 608s nsamples = 1e3; 608s rande ("seed", 4); rand ("seed", 5) # for reproducibility 608s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 608s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 608s x = linspace (-3, 3, 1000); 608s area (x, f(x)); 608s xlabel ("x"); 608s ylabel ("f(x)"); 608s int = mean (f (smpl) ./ pdf (smpl)); 608s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 608s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 608s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 608s fprintf("Monte Carlo integral error estimate %f\n", errest); 608s fprintf("The actual error %f\n", trueerr); 608s ***** test 608s start = 0.5; 608s nsamples = 1e3; 608s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 608s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 608s assert (mean (smpl, 1), 1, .15); 608s assert (var (smpl, 1), 1, .25); 609s ***** error slicesample (); 609s ***** error slicesample (1); 609s ***** error slicesample (1, 1); 609s 4 tests, 4 passed, 0 known failure, 0 skipped 609s [inst/nanmax.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/nanmax.m 609s ***** demo 609s ## Find the column maximum values and their indices 609s ## for matrix data with missing values. 609s 609s x = magic (3); 609s x([1, 6:9]) = NaN 609s [y, ind] = nanmax (x) 609s ***** demo 609s ## Find the maximum of all the values in an array, ignoring missing values. 609s ## Create a 2-by-5-by-3 array x with some missing values. 609s 609s x = reshape (1:30, [2, 5, 3]); 609s x([10:12, 25]) = NaN 609s 609s ## Find the maximum of the elements of x. 609s 609s y = nanmax (x, [], 'all') 609s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 609s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 609s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 609s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 609s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 609s ***** shared x, y 609s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 609s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 609s y = x; 609s y(2,3,1) = 0.51; 609s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 609s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 609s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 609s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 609s ***** assert (nanmax (x, [], 'all'), 6.77) 609s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 609s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 609s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 609s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 609s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 609s ***** test 609s xx = repmat ([1:20;6:25], [5 2 6 3]); 609s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 609s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 609s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 609s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 609s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 609s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 609s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 609s ***** assert (nanmax (magic (3), [], 3), magic (3)) 609s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 609s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 609s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 609s ***** error ... 609s nanmax (y, [], [1, 1, 2]) 609s ***** error ... 609s [v, idx] = nanmax(x, y, [1 2]) 609s 24 tests, 24 passed, 0 known failure, 0 skipped 609s [inst/silhouette.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/silhouette.m 609s ***** demo 609s load fisheriris; 609s X = meas(:,3:4); 609s cidcs = kmeans (X, 3, "Replicates", 5); 609s silhouette (X, cidcs); 609s y_labels(cidcs([1 51 101])) = unique (species); 609s set (gca, "yticklabel", y_labels); 609s title ("Fisher's iris data"); 609s ***** error silhouette (); 609s ***** error silhouette ([1 2; 1 1]); 609s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 609s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 609s 4 tests, 4 passed, 0 known failure, 0 skipped 609s [inst/cdfcalc.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cdfcalc.m 609s ***** test 609s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 609s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 609s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 609s assert (xCDF, [2, 3, 4, 5, 6]'); 609s assert (n, 10); 609s ***** shared x 609s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 609s ***** error yCDF = cdfcalc (x); 609s ***** error [yCDF, xCDF] = cdfcalc (); 609s ***** error [yCDF, xCDF] = cdfcalc (x, x); 609s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 609s 5 tests, 5 passed, 0 known failure, 0 skipped 609s [inst/levene_test.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/levene_test.m 609s ***** error levene_test () 609s ***** error ... 609s levene_test (1, 2, 3, 4, 5); 609s ***** error levene_test (randn (50, 2), 0); 609s ***** error ... 609s levene_test (randn (50, 2), [1, 2, 3]); 609s ***** error ... 609s levene_test (randn (50, 1), ones (55, 1)); 609s ***** error ... 609s levene_test (randn (50, 1), ones (50, 2)); 609s ***** error ... 609s levene_test (randn (50, 2), [], 1.2); 609s ***** error ... 609s levene_test (randn (50, 2), "some_string"); 609s ***** error ... 609s levene_test (randn (50, 2), [], "alpha"); 609s ***** error ... 609s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 609s ***** error ... 609s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 609s ***** error ... 609s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 609s ***** warning ... 609s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades); 609s assert (h, 1); 609s assert (pval, 9.523239714592791e-07, 1e-14); 609s assert (W, 8.59529, 1e-5); 609s assert (df, [4, 595]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 609s assert (h, 1); 609s assert (pval, 9.523239714592791e-07, 1e-14); 609s assert (W, 8.59529, 1e-5); 609s assert (df, [4, 595]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades, [], "median"); 609s assert (h, 1); 609s assert (pval, 1.312093241723211e-06, 1e-14); 609s assert (W, 8.415969, 1e-6); 609s assert (df, [4, 595]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades(:,[1:3])); 609s assert (h, 1); 609s assert (pval, 0.004349390980463497, 1e-14); 609s assert (W, 5.52139, 1e-5); 609s assert (df, [2, 357]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 609s assert (h, 1); 609s assert (pval, 0.004355216763951453, 1e-14); 609s assert (W, 5.52001, 1e-5); 609s assert (df, [2, 357]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 609s assert (h, 0); 609s assert (pval, 0.1807494957440653, 2e-14); 609s assert (W, 1.80200, 1e-5); 609s assert (df, [1, 238]); 609s ***** test 609s load examgrades 609s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 609s assert (h, 0); 609s assert (pval, 0.1978225622063785, 2e-14); 609s assert (W, 1.66768, 1e-5); 609s assert (df, [1, 238]); 609s 20 tests, 20 passed, 0 known failure, 0 skipped 609s [inst/cl_multinom.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cl_multinom.m 609s ***** demo 609s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 609s ***** error cl_multinom (); 609s ***** error cl_multinom (1, 2, 3, 4, 5); 609s ***** error ... 609s cl_multinom (1, 2, 3, 4); 609s ***** error ... 609s cl_multinom (1, 2, 3, "some string"); 609s 4 tests, 4 passed, 0 known failure, 0 skipped 609s [inst/qqplot.m] 609s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/qqplot.m 609s ***** test 609s hf = figure ("visible", "off"); 609s unwind_protect 609s 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]); 609s unwind_protect_cleanup 609s close (hf); 609s end_unwind_protect 609s ***** error qqplot () 610s ***** error qqplot ({1}) 610s ***** error qqplot (ones (2,2)) 610s ***** error qqplot (1, "foobar") 610s ***** error qqplot ([1 2 3], "foobar") 610s 6 tests, 6 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/logifit.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/logifit.m 610s ***** demo 610s ## Sample 3 populations from different logistic distibutions 610s rand ("seed", 5) # for reproducibility 610s r1 = logirnd (2, 1, 2000, 1); 610s rand ("seed", 2) # for reproducibility 610s r2 = logirnd (5, 2, 2000, 1); 610s rand ("seed", 7) # for reproducibility 610s r3 = logirnd (9, 4, 2000, 1); 610s r = [r1, r2, r3]; 610s 610s ## Plot them normalized and fix their colors 610s hist (r, [-6:20], 1); 610s h = findobj (gca, "Type", "patch"); 610s set (h(1), "facecolor", "c"); 610s set (h(2), "facecolor", "g"); 610s set (h(3), "facecolor", "r"); 610s ylim ([0, 0.3]); 610s xlim ([-5, 20]); 610s hold on 610s 610s ## Estimate their MU and LAMBDA parameters 610s mu_sA = logifit (r(:,1)); 610s mu_sB = logifit (r(:,2)); 610s mu_sC = logifit (r(:,3)); 610s 610s ## Plot their estimated PDFs 610s x = [-5:0.5:20]; 610s y = logipdf (x, mu_sA(1), mu_sA(2)); 610s plot (x, y, "-pr"); 610s y = logipdf (x, mu_sB(1), mu_sB(2)); 610s plot (x, y, "-sg"); 610s y = logipdf (x, mu_sC(1), mu_sC(2)); 610s plot (x, y, "-^c"); 610s hold off 610s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 610s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 610s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 610s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 610s mu_sA(1), mu_sA(2)), ... 610s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 610s mu_sB(1), mu_sB(2)), ... 610s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 610s mu_sC(1), mu_sC(2))}) 610s title ("Three population samples from different logistic distibutions") 610s hold off 610s ***** test 610s paramhat = logifit ([1:50]); 610s paramhat_out = [25.5, 8.7724]; 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** test 610s paramhat = logifit ([1:5]); 610s paramhat_out = [3, 0.8645]; 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** test 610s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 610s paramhat_out = [3, 0.8645]; 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** test 610s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 610s paramhat_out = logifit ([1:5, 5]); 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** error logifit (ones (2,5)); 610s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 610s ***** error logifit ([1, 2, 3, 4, 5], 0); 610s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 610s ***** error ... 610s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 610s ***** error ... 610s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 610s ***** error ... 610s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 610s ***** error ... 610s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 610s ***** error ... 610s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 610s 13 tests, 13 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/lognfit.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/lognfit.m 610s ***** demo 610s ## Sample 3 populations from 3 different log-normal distibutions 610s randn ("seed", 1); # for reproducibility 610s r1 = lognrnd (0, 0.25, 1000, 1); 610s randn ("seed", 2); # for reproducibility 610s r2 = lognrnd (0, 0.5, 1000, 1); 610s randn ("seed", 3); # for reproducibility 610s r3 = lognrnd (0, 1, 1000, 1); 610s r = [r1, r2, r3]; 610s 610s ## Plot them normalized and fix their colors 610s hist (r, 30, 2); 610s h = findobj (gca, "Type", "patch"); 610s set (h(1), "facecolor", "c"); 610s set (h(2), "facecolor", "g"); 610s set (h(3), "facecolor", "r"); 610s hold on 610s 610s ## Estimate their mu and sigma parameters 610s mu_sigmaA = lognfit (r(:,1)); 610s mu_sigmaB = lognfit (r(:,2)); 610s mu_sigmaC = lognfit (r(:,3)); 610s 610s ## Plot their estimated PDFs 610s x = [0:0.1:6]; 610s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 610s plot (x, y, "-pr"); 610s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 610s plot (x, y, "-sg"); 610s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 610s plot (x, y, "-^c"); 610s ylim ([0, 2]) 610s xlim ([0, 6]) 610s hold off 610s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 610s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 610s "Normalized HIST of sample 3 with mu=0, σ=1", ... 610s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 610s mu_sigmaA(1), mu_sigmaA(2)), ... 610s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 610s mu_sigmaB(1), mu_sigmaB(2)), ... 610s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 610s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 610s title ("Three population samples from different log-normal distibutions") 610s hold off 610s ***** test 610s randn ("seed", 1); 610s x = lognrnd (3, 5, [1000, 1]); 610s [paramhat, paramci] = lognfit (x, 0.01); 610s assert (paramci(1,1) < 3); 610s assert (paramci(1,2) > 3); 610s assert (paramci(2,1) < 5); 610s assert (paramci(2,2) > 5); 610s ***** error ... 610s lognfit (ones (20,3)) 610s ***** error ... 610s lognfit ({1, 2, 3, 4, 5}) 610s ***** error ... 610s lognfit ([-1, 2, 3, 4, 5]) 610s ***** error lognfit (ones (20,1), 0) 610s ***** error lognfit (ones (20,1), -0.3) 610s ***** error lognfit (ones (20,1), 1.2) 610s ***** error lognfit (ones (20,1), [0.05, 0.1]) 610s ***** error lognfit (ones (20,1), 0.02+i) 610s ***** error ... 610s lognfit (ones (20,1), [], zeros(15,1)) 610s ***** error ... 610s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 610s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 610s 12 tests, 12 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/invgfit.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/invgfit.m 610s ***** demo 610s ## Sample 3 populations from different inverse Gaussian distibutions 610s rand ("seed", 5); randn ("seed", 5); # for reproducibility 610s r1 = invgrnd (1, 0.2, 2000, 1); 610s rand ("seed", 2); randn ("seed", 2); # for reproducibility 610s r2 = invgrnd (1, 3, 2000, 1); 610s rand ("seed", 7); randn ("seed", 7); # for reproducibility 610s r3 = invgrnd (3, 1, 2000, 1); 610s r = [r1, r2, r3]; 610s 610s ## Plot them normalized and fix their colors 610s hist (r, [0.1:0.1:3.2], 9); 610s h = findobj (gca, "Type", "patch"); 610s set (h(1), "facecolor", "c"); 610s set (h(2), "facecolor", "g"); 610s set (h(3), "facecolor", "r"); 610s ylim ([0, 3]); 610s xlim ([0, 3]); 610s hold on 610s 610s ## Estimate their MU and LAMBDA parameters 610s mu_lambdaA = invgfit (r(:,1)); 610s mu_lambdaB = invgfit (r(:,2)); 610s mu_lambdaC = invgfit (r(:,3)); 610s 610s ## Plot their estimated PDFs 610s x = [0:0.1:3]; 610s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 610s plot (x, y, "-pr"); 610s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 610s plot (x, y, "-sg"); 610s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 610s plot (x, y, "-^c"); 610s hold off 610s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 610s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 610s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 610s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 610s mu_lambdaA(1), mu_lambdaA(2)), ... 610s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 610s mu_lambdaB(1), mu_lambdaB(2)), ... 610s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 610s mu_lambdaC(1), mu_lambdaC(2))}) 610s title ("Three population samples from different inverse Gaussian distibutions") 610s hold off 610s ***** test 610s paramhat = invgfit ([1:50]); 610s paramhat_out = [25.5, 19.6973]; 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** test 610s paramhat = invgfit ([1:5]); 610s paramhat_out = [3, 8.1081]; 610s assert (paramhat, paramhat_out, 1e-4); 610s ***** error invgfit (ones (2,5)); 610s ***** error invgfit ([-1 2 3 4]); 610s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 610s ***** error invgfit ([1, 2, 3, 4, 5], 0); 610s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 610s ***** error ... 610s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 610s ***** error ... 610s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 610s ***** error ... 610s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 610s ***** error ... 610s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 610s ***** error ... 610s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 610s 12 tests, 12 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/poissfit.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/poissfit.m 610s ***** demo 610s ## Sample 3 populations from 3 different Poisson distibutions 610s randp ("seed", 2); # for reproducibility 610s r1 = poissrnd (1, 1000, 1); 610s randp ("seed", 2); # for reproducibility 610s r2 = poissrnd (4, 1000, 1); 610s randp ("seed", 3); # for reproducibility 610s r3 = poissrnd (10, 1000, 1); 610s r = [r1, r2, r3]; 610s 610s ## Plot them normalized and fix their colors 610s hist (r, [0:20], 1); 610s h = findobj (gca, "Type", "patch"); 610s set (h(1), "facecolor", "c"); 610s set (h(2), "facecolor", "g"); 610s set (h(3), "facecolor", "r"); 610s hold on 610s 610s ## Estimate their lambda parameter 610s lambdahat = poissfit (r); 610s 610s ## Plot their estimated PDFs 610s x = [0:20]; 610s y = poisspdf (x, lambdahat(1)); 610s plot (x, y, "-pr"); 610s y = poisspdf (x, lambdahat(2)); 610s plot (x, y, "-sg"); 610s y = poisspdf (x, lambdahat(3)); 610s plot (x, y, "-^c"); 610s xlim ([0, 20]) 610s ylim ([0, 0.4]) 610s legend ({"Normalized HIST of sample 1 with λ=1", ... 610s "Normalized HIST of sample 2 with λ=4", ... 610s "Normalized HIST of sample 3 with λ=10", ... 610s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 610s lambdahat(1)), ... 610s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 610s lambdahat(2)), ... 610s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 610s lambdahat(3))}) 610s title ("Three population samples from different Poisson distibutions") 610s hold off 610s ***** test 610s x = [1 3 2 4 5 4 3 4]; 610s [lhat, lci] = poissfit (x); 610s assert (lhat, 3.25) 610s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 610s ***** test 610s x = [1 3 2 4 5 4 3 4]; 610s [lhat, lci] = poissfit (x, 0.01); 610s assert (lhat, 3.25) 610s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 610s ***** test 610s x = [1 2 3 4 5]; 610s f = [1 1 2 3 1]; 610s [lhat, lci] = poissfit (x, [], f); 610s assert (lhat, 3.25) 610s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 610s ***** test 610s x = [1 2 3 4 5]; 610s f = [1 1 2 3 1]; 610s [lhat, lci] = poissfit (x, 0.01, f); 610s assert (lhat, 3.25) 610s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 610s ***** error poissfit ([1 2 -1 3]) 610s ***** error poissfit ([1 2 3], 0) 610s ***** error poissfit ([1 2 3], 1.2) 610s ***** error poissfit ([1 2 3], [0.02 0.05]) 610s ***** error 610s poissfit ([1 2 3], [], [1 5]) 610s ***** error 610s poissfit ([1 2 3], [], [1 5 -1]) 610s 10 tests, 10 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/wbllike.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/wbllike.m 610s ***** test 610s x = 1:50; 610s [nlogL, acov] = wbllike ([2.3, 1.2], x); 610s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 610s assert (nlogL, 945.9589180651594, 1e-12); 610s assert (acov, avar_out, 1e-4); 610s ***** test 610s x = 1:50; 610s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 610s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 610s assert (nlogL, 424.9879809704742, 6e-14); 610s assert (acov, avar_out, 1e-4); 610s ***** test 610s x = 1:50; 610s [nlogL, acov] = wbllike ([21, 15], x); 610s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 610s assert (nlogL, 1635190.328991511, 1e-8); 610s assert (acov, avar_out, 1e-8); 610s ***** error wbllike ([12, 15]); 610s ***** error wbllike ([12, 15, 3], [1:50]); 610s ***** error wbllike ([12, 3], ones (10, 2)); 610s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 610s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 610s ***** error ... 610s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 610s 9 tests, 9 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/gevlike.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gevlike.m 610s ***** test 610s x = 1; 610s k = 0.2; 610s sigma = 0.3; 610s mu = 0.5; 610s [L, C] = gevlike ([k sigma mu], x); 610s expected_L = 0.75942; 610s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 610s assert (L, expected_L, 0.001); 610s assert (C, inv (expected_C), 0.001); 610s ***** test 610s x = 1; 610s k = 0; 610s sigma = 0.3; 610s mu = 0.5; 610s [L, C] = gevlike ([k sigma mu], x); 610s expected_L = 0.65157; 610s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 610s assert (L, expected_L, 0.001); 610s assert (C, inv (expected_C), 0.001); 610s ***** test 610s x = -5:-1; 610s k = -0.2; 610s sigma = 0.3; 610s mu = 0.5; 610s [L, C] = gevlike ([k sigma mu], x); 610s expected_L = 3786.4; 610s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 610s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 610s 8.7297e-05, 1.2034e-05, -0.0019125]; 610s assert (L, expected_L, -0.001); 610s assert (C, expected_C, -0.001); 610s ***** test 610s x = -5:0; 610s k = -0.2; 610s sigma = 0.3; 610s mu = 0.5; 610s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 610s expected_L = 3786.4; 610s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 610s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 610s 8.7297e-05, 1.2034e-05, -0.0019125]; 610s assert (L, expected_L, -0.001); 610s assert (C, expected_C, -0.001); 610s ***** error gevlike (3.25) 610s ***** error gevlike ([1, 2, 3], ones (2)) 610s ***** error ... 610s gevlike ([1, 2], [1, 3, 5, 7]) 610s ***** error ... 610s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 610s ***** error ... 610s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 610s ***** error ... 610s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 610s ***** error ... 610s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 610s 11 tests, 11 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/tlslike.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/tlslike.m 610s ***** test 610s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 610s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 610s acov_out = [0.2525, 0.0670, 0.0288; ... 610s 0.0670, 0.5724, 0.1786; ... 610s 0.0288, 0.1786, 0.1789]; 610s assert (nlogL, 17.9979636579, 1e-10); 610s assert (acov, acov_out, 1e-4); 610s ***** error tlslike ([12, 15, 1]); 610s ***** error tlslike ([12, 15], [1:50]); 610s ***** error tlslike ([12, 3, 1], ones (10, 2)); 610s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 610s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 610s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 610s 7 tests, 7 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/burrlike.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/burrlike.m 610s ***** error burrlike (3.25) 610s ***** error burrlike ([1, 2, 3], ones (2)) 610s ***** error burrlike ([1, 2, 3], [-1, 3]) 610s ***** error ... 610s burrlike ([1, 2], [1, 3, 5, 7]) 610s ***** error ... 610s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 610s ***** error ... 610s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 610s ***** error ... 610s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 610s ***** error ... 610s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 610s 8 tests, 8 passed, 0 known failure, 0 skipped 610s [inst/dist_fit/burrfit.m] 610s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/burrfit.m 610s ***** demo 610s ## Sample 3 populations from different Burr type XII distibutions 610s rand ("seed", 4); # for reproducibility 610s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 610s rand ("seed", 2); # for reproducibility 610s r2 = burrrnd (1, 3, 1, 10000, 1); 610s rand ("seed", 9); # for reproducibility 610s r3 = burrrnd (0.5, 2, 3, 10000, 1); 610s r = [r1, r2, r3]; 610s 610s ## Plot them normalized and fix their colors 610s hist (r, [0.1:0.2:20], [18, 5, 3]); 610s h = findobj (gca, "Type", "patch"); 610s set (h(1), "facecolor", "c"); 610s set (h(2), "facecolor", "g"); 610s set (h(3), "facecolor", "r"); 610s ylim ([0, 3]); 610s xlim ([0, 5]); 610s hold on 610s 610s ## Estimate their α and β parameters 610s lambda_c_kA = burrfit (r(:,1)); 610s lambda_c_kB = burrfit (r(:,2)); 610s lambda_c_kC = burrfit (r(:,3)); 610s 610s ## Plot their estimated PDFs 610s x = [0.01:0.15:15]; 610s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 610s plot (x, y, "-pr"); 610s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 610s plot (x, y, "-sg"); 610s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 610s plot (x, y, "-^c"); 610s hold off 610s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 610s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 610s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 610s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 610s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 610s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 610s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 610s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 610s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 610s title ("Three population samples from different Burr type XII distibutions") 610s hold off 610s ***** test 610s l = 1; c = 2; k = 3; 610s r = burrrnd (l, c, k, 100000, 1); 610s lambda_c_kA = burrfit (r); 610s assert (lambda_c_kA(1), l, 0.2); 610s assert (lambda_c_kA(2), c, 0.2); 610s assert (lambda_c_kA(3), k, 0.3); 611s ***** test 611s l = 0.5; c = 1; k = 3; 611s r = burrrnd (l, c, k, 100000, 1); 611s lambda_c_kA = burrfit (r); 611s assert (lambda_c_kA(1), l, 0.2); 611s assert (lambda_c_kA(2), c, 0.2); 611s assert (lambda_c_kA(3), k, 0.3); 612s ***** test 612s l = 1; c = 3; k = 1; 612s r = burrrnd (l, c, k, 100000, 1); 612s lambda_c_kA = burrfit (r); 612s assert (lambda_c_kA(1), l, 0.2); 612s assert (lambda_c_kA(2), c, 0.2); 612s assert (lambda_c_kA(3), k, 0.3); 613s ***** test 613s l = 3; c = 2; k = 1; 613s r = burrrnd (l, c, k, 100000, 1); 613s lambda_c_kA = burrfit (r); 613s assert (lambda_c_kA(1), l, 0.2); 613s assert (lambda_c_kA(2), c, 0.2); 613s assert (lambda_c_kA(3), k, 0.3); 614s ***** test 614s l = 4; c = 2; k = 4; 614s r = burrrnd (l, c, k, 100000, 1); 614s lambda_c_kA = burrfit (r); 614s assert (lambda_c_kA(1), l, 0.2); 614s assert (lambda_c_kA(2), c, 0.2); 614s assert (lambda_c_kA(3), k, 0.3); 615s ***** error burrfit (ones (2,5)); 615s ***** error burrfit ([-1 2 3 4]); 615s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 615s ***** error burrfit ([1, 2, 3, 4, 5], 0); 615s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 615s ***** error ... 615s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 615s ***** error ... 615s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 615s ***** error 615s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 615s ***** error 615s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 615s ***** error ... 615s burrfit ([1:10], 0.05, [], [], 5) 615s 15 tests, 15 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/invglike.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/invglike.m 615s ***** test 615s nlogL = invglike ([25.5, 19.6973], [1:50]); 615s assert (nlogL, 219.1516, 1e-4); 615s ***** test 615s nlogL = invglike ([3, 8.1081], [1:5]); 615s assert (nlogL, 9.0438, 1e-4); 615s ***** error invglike (3.25) 615s ***** error invglike ([5, 0.2], ones (2)) 615s ***** error invglike ([5, 0.2], [-1, 3]) 615s ***** error ... 615s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 615s ***** error ... 615s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 615s ***** error ... 615s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 615s ***** error ... 615s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 615s 9 tests, 9 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/loglfit.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/loglfit.m 615s ***** demo 615s ## Sample 3 populations from different log-logistic distibutions 615s rand ("seed", 5) # for reproducibility 615s r1 = loglrnd (0, 1, 2000, 1); 615s rand ("seed", 2) # for reproducibility 615s r2 = loglrnd (0, 0.5, 2000, 1); 615s rand ("seed", 7) # for reproducibility 615s r3 = loglrnd (0, 0.125, 2000, 1); 615s r = [r1, r2, r3]; 615s 615s ## Plot them normalized and fix their colors 615s hist (r, [0.05:0.1:2.5], 10); 615s h = findobj (gca, "Type", "patch"); 615s set (h(1), "facecolor", "c"); 615s set (h(2), "facecolor", "g"); 615s set (h(3), "facecolor", "r"); 615s ylim ([0, 3.5]); 615s xlim ([0, 2.0]); 615s hold on 615s 615s ## Estimate their MU and LAMBDA parameters 615s a_bA = loglfit (r(:,1)); 615s a_bB = loglfit (r(:,2)); 615s a_bC = loglfit (r(:,3)); 615s 615s ## Plot their estimated PDFs 615s x = [0.01:0.1:2.01]; 615s y = loglpdf (x, a_bA(1), a_bA(2)); 615s plot (x, y, "-pr"); 615s y = loglpdf (x, a_bB(1), a_bB(2)); 615s plot (x, y, "-sg"); 615s y = loglpdf (x, a_bC(1), a_bC(2)); 615s plot (x, y, "-^c"); 615s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 615s "Normalized HIST of sample 2 with α=1 and β=2", ... 615s "Normalized HIST of sample 3 with α=1 and β=8", ... 615s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 615s a_bA(1), a_bA(2)), ... 615s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 615s a_bB(1), a_bB(2)), ... 615s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 615s a_bC(1), a_bC(2))}) 615s title ("Three population samples from different log-logistic distibutions") 615s hold off 615s ***** test 615s [paramhat, paramci] = loglfit ([1:50]); 615s paramhat_out = [3.09717, 0.468525]; 615s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 615s assert (paramhat, paramhat_out, 1e-5); 615s assert (paramci, paramci_out, 1e-5); 615s ***** test 615s paramhat = loglfit ([1:5]); 615s paramhat_out = [1.01124, 0.336449]; 615s assert (paramhat, paramhat_out, 1e-5); 615s ***** test 615s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 615s paramhat_out = [1.01124, 0.336449]; 615s assert (paramhat, paramhat_out, 1e-4); 615s ***** test 615s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 615s paramhat_out = loglfit ([1:5, 5]); 615s assert (paramhat, paramhat_out, 1e-4); 615s ***** error loglfit (ones (2,5)); 615s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 615s ***** error loglfit ([1, 2, 3, 4, 5], 0); 615s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 615s ***** error ... 615s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 615s ***** error ... 615s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 615s ***** error ... 615s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 615s ***** error ... 615s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 615s ***** error ... 615s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 615s 13 tests, 13 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/rayllike.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/rayllike.m 615s ***** test 615s x = [1 3 2 4 5 4 3 4]; 615s [nlogL, acov] = rayllike (3.25, x); 615s assert (nlogL, 14.7442, 1e-4) 615s ***** test 615s x = [1 2 3 4 5]; 615s f = [1 1 2 3 1]; 615s [nlogL, acov] = rayllike (3.25, x, [], f); 615s assert (nlogL, 14.7442, 1e-4) 615s ***** test 615s x = [1 2 3 4 5 6]; 615s f = [1 1 2 3 1 0]; 615s [nlogL, acov] = rayllike (3.25, x, [], f); 615s assert (nlogL, 14.7442, 1e-4) 615s ***** test 615s x = [1 2 3 4 5 6]; 615s c = [0 0 0 0 0 1]; 615s f = [1 1 2 3 1 0]; 615s [nlogL, acov] = rayllike (3.25, x, c, f); 615s assert (nlogL, 14.7442, 1e-4) 615s ***** error rayllike (1) 615s ***** error rayllike ([1 2 3], [1 2]) 615s ***** error ... 615s rayllike (3.25, ones (10, 2)) 615s ***** error ... 615s rayllike (3.25, [1 2 3 -4 5]) 615s ***** error ... 615s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 615s ***** error ... 615s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 615s ***** error ... 615s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 615s ***** error ... 615s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 615s ***** error ... 615s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 615s 13 tests, 13 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/betafit.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/betafit.m 615s ***** demo 615s ## Sample 2 populations from different Beta distibutions 615s randg ("seed", 1); # for reproducibility 615s r1 = betarnd (2, 5, 500, 1); 615s randg ("seed", 2); # for reproducibility 615s r2 = betarnd (2, 2, 500, 1); 615s r = [r1, r2]; 615s 615s ## Plot them normalized and fix their colors 615s hist (r, 12, 15); 615s h = findobj (gca, "Type", "patch"); 615s set (h(1), "facecolor", "c"); 615s set (h(2), "facecolor", "g"); 615s hold on 615s 615s ## Estimate their shape parameters 615s a_b_A = betafit (r(:,1)); 615s a_b_B = betafit (r(:,2)); 615s 615s ## Plot their estimated PDFs 615s x = [min(r(:)):0.01:max(r(:))]; 615s y = betapdf (x, a_b_A(1), a_b_A(2)); 615s plot (x, y, "-pr"); 615s y = betapdf (x, a_b_B(1), a_b_B(2)); 615s plot (x, y, "-sg"); 615s ylim ([0, 4]) 615s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 615s "Normalized HIST of sample 2 with α=2 and β=2", ... 615s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 615s a_b_A(1), a_b_A(2)), ... 615s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 615s a_b_B(1), a_b_B(2))}) 615s title ("Two population samples from different Beta distibutions") 615s hold off 615s ***** test 615s x = 0.01:0.02:0.99; 615s [paramhat, paramci] = betafit (x); 615s paramhat_out = [1.0199, 1.0199]; 615s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 615s assert (paramhat, paramhat_out, 1e-4); 615s assert (paramci, paramci_out, 1e-4); 615s ***** test 615s x = 0.01:0.02:0.99; 615s [paramhat, paramci] = betafit (x, 0.01); 615s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 615s assert (paramci, paramci_out, 1e-4); 615s ***** test 615s x = 0.00:0.02:1; 615s [paramhat, paramci] = betafit (x); 615s paramhat_out = [0.0875, 0.1913]; 615s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 615s assert (paramhat, paramhat_out, 1e-4); 615s assert (paramci, paramci_out, 1e-4); 615s ***** error betafit ([0.2, 0.5+i]); 615s ***** error betafit (ones (2,2) * 0.5); 615s ***** error betafit ([0.5, 1.2]); 615s ***** error betafit ([0.1, 0.1]); 615s ***** error betafit ([0.01:0.1:0.99], 1.2); 615s ***** error ... 615s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 615s ***** error ... 615s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 615s ***** error ... 615s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 615s ***** error ... 615s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 615s ***** error ... 615s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 615s 13 tests, 13 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/gamfit.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gamfit.m 615s ***** demo 615s ## Sample 3 populations from different Gamma distibutions 615s randg ("seed", 5); # for reproducibility 615s r1 = gamrnd (1, 2, 2000, 1); 615s randg ("seed", 2); # for reproducibility 615s r2 = gamrnd (2, 2, 2000, 1); 615s randg ("seed", 7); # for reproducibility 615s r3 = gamrnd (7.5, 1, 2000, 1); 615s r = [r1, r2, r3]; 615s 615s ## Plot them normalized and fix their colors 615s hist (r, 75, 4); 615s h = findobj (gca, "Type", "patch"); 615s set (h(1), "facecolor", "c"); 615s set (h(2), "facecolor", "g"); 615s set (h(3), "facecolor", "r"); 615s ylim ([0, 0.62]); 615s xlim ([0, 12]); 615s hold on 615s 615s ## Estimate their α and β parameters 615s a_bA = gamfit (r(:,1)); 615s a_bB = gamfit (r(:,2)); 615s a_bC = gamfit (r(:,3)); 615s 615s ## Plot their estimated PDFs 615s x = [0.01,0.1:0.2:18]; 615s y = gampdf (x, a_bA(1), a_bA(2)); 615s plot (x, y, "-pr"); 615s y = gampdf (x, a_bB(1), a_bB(2)); 615s plot (x, y, "-sg"); 615s y = gampdf (x, a_bC(1), a_bC(2)); 615s plot (x, y, "-^c"); 615s hold off 615s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 615s "Normalized HIST of sample 2 with α=2 and β=2", ... 615s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 615s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 615s a_bA(1), a_bA(2)), ... 615s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 615s a_bB(1), a_bB(2)), ... 615s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 615s a_bC(1), a_bC(2))}) 615s title ("Three population samples from different Gamma distibutions") 615s hold off 615s ***** shared x 615s 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]; 615s ***** test 615s [paramhat, paramci] = gamfit (x); 615s assert (paramhat, [3.4248, 0.9752], 1e-4); 615s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 615s ***** test 615s [paramhat, paramci] = gamfit (x, 0.01); 615s assert (paramhat, [3.4248, 0.9752], 1e-4); 615s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 615s ***** test 615s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 615s [paramhat, paramci] = gamfit (x, [], [], freq); 615s assert (paramhat, [3.3025, 1.0615], 1e-4); 615s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 615s ***** test 615s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 615s assert (paramhat, [4.4484, 0.9689], 1e-4); 615s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 615s ***** test 615s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 615s assert (paramhat, [4.4484, 0.9689], 1e-4); 615s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 615s ***** test 615s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 615s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 615s assert (paramhat, [4.7537, 0.9308], 1e-4); 615s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 615s ***** test 615s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 615s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 615s [paramhat, paramci] = gamfit (x, [], cens, freq); 615s assert (paramhat, [3.4736, 1.0847], 1e-4); 615s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 615s ***** test 615s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 615s assert (paramhat, [Inf, 0]); 615s assert (paramci, [Inf, 0; Inf, 0]); 615s ***** test 615s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 615s assert (paramhat, [NaN, NaN]); 615s assert (paramci, [NaN, NaN; NaN, NaN]); 615s ***** test 615s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 615s assert (paramhat, [Inf, 0]); 615s assert (paramci, [Inf, 0; Inf, 0]); 615s ***** assert (class (gamfit (single (x))), "single") 615s ***** error gamfit (ones (2)) 615s ***** error gamfit (x, 1) 615s ***** error gamfit (x, -1) 615s ***** error gamfit (x, {0.05}) 615s ***** error gamfit (x, "a") 615s ***** error gamfit (x, i) 615s ***** error gamfit (x, [0.01 0.02]) 615s ***** error 615s gamfit ([1 2 3], 0.05, [], [1 5]) 615s ***** error 615s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 615s ***** error ... 615s gamfit ([1:10], 0.05, [], [], 5) 615s ***** error gamfit ([1 2 3 -4]) 615s ***** error ... 615s gamfit ([1 2 0], [], [1 0 0]) 615s 23 tests, 23 passed, 0 known failure, 0 skipped 615s [inst/dist_fit/binolike.m] 615s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/binolike.m 615s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 615s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 615s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 615s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 615s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 615s ***** test 615s [nlogL, acov] = binolike ([3, 0.333], 3); 615s assert (acov(4), 0.0740, 1e-4) 616s ***** error binolike (3.25) 616s ***** error binolike ([5, 0.2], ones (2)) 616s ***** error ... 616s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 616s ***** error binolike ([1.5, 0.2], 1) 616s ***** error binolike ([-1, 0.2], 1) 616s ***** error binolike ([Inf, 0.2], 1) 616s ***** error binolike ([5, 1.2], [3, 5]) 616s ***** error binolike ([5, -0.2], [3, 5]) 616s ***** error ... 616s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 616s ***** error ... 616s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 616s ***** error binolike ([5, 0.2], [-1, 3]) 616s ***** error binolike ([5, 0.2], [3, 5, 7]) 616s 18 tests, 18 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/gplike.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gplike.m 616s ***** test 616s k = 0.8937; sigma = 1.3230; theta = 1; 616s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 616s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 616s [nlogL, acov] = gplike ([k, sigma, theta], x); 616s assert (nlogL, 21.736, 1e-3); 616s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 616s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 616s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 616s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 616s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 616s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 616s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 616s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 616s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 616s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 616s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 616s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 616s ***** error gplike () 616s ***** error gplike (1) 616s ***** error gplike ([1, 2, 0], []) 616s ***** error gplike ([1, 2, 0], ones (2)) 616s ***** error gplike (2, [1:10]) 616s ***** error gplike ([2, 3], [1:10]) 616s ***** error ... 616s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 616s ***** error ... 616s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 616s 20 tests, 20 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/unifit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/unifit.m 616s ***** demo 616s ## Sample 2 populations from different continuous uniform distibutions 616s rand ("seed", 5); # for reproducibility 616s r1 = unifrnd (2, 5, 2000, 1); 616s rand ("seed", 6); # for reproducibility 616s r2 = unifrnd (3, 9, 2000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 0:0.5:10, 2); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their probability of success 616s a_bA = unifit (r(:,1)); 616s a_bB = unifit (r(:,2)); 616s 616s ## Plot their estimated PDFs 616s x = [0:10]; 616s y = unifpdf (x, a_bA(1), a_bA(2)); 616s plot (x, y, "-pg"); 616s y = unifpdf (x, a_bB(1), a_bB(2)); 616s plot (x, y, "-sc"); 616s xlim ([1, 10]) 616s ylim ([0, 0.5]) 616s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 616s "Normalized HIST of sample 2 with a=3 and b=9", ... 616s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 616s a_bA(1), a_bA(2)), ... 616s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 616s a_bB(1), a_bB(2))}) 616s title ("Two population samples from different continuous uniform distibutions") 616s hold off 616s ***** test 616s x = 0:5; 616s [paramhat, paramci] = unifit (x); 616s assert (paramhat, [0, 5]); 616s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 616s ***** test 616s x = 0:5; 616s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 616s assert (paramhat, [0, 5]); 616s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 616s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 616s ***** error unifit () 616s ***** error unifit (-1, [1 2 3 3]) 616s ***** error unifit (1, 0) 616s ***** error unifit (1, 1.2) 616s ***** error unifit (1, [0.02 0.05]) 616s ***** error ... 616s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 616s ***** error ... 616s unifit ([1.5, 0.2], [], [1, -1]) 616s ***** error ... 616s unifit ([1.5, 0.2], [], [1, 1, 1]) 616s 11 tests, 11 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/raylfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/raylfit.m 616s ***** demo 616s ## Sample 3 populations from 3 different Rayleigh distibutions 616s rand ("seed", 2); # for reproducibility 616s r1 = raylrnd (1, 1000, 1); 616s rand ("seed", 2); # for reproducibility 616s r2 = raylrnd (2, 1000, 1); 616s rand ("seed", 3); # for reproducibility 616s r3 = raylrnd (4, 1000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, [0.5:0.5:10.5], 2); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s hold on 616s 616s ## Estimate their lambda parameter 616s sigmaA = raylfit (r(:,1)); 616s sigmaB = raylfit (r(:,2)); 616s sigmaC = raylfit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [0:0.1:10]; 616s y = raylpdf (x, sigmaA); 616s plot (x, y, "-pr"); 616s y = raylpdf (x, sigmaB); 616s plot (x, y, "-sg"); 616s y = raylpdf (x, sigmaC); 616s plot (x, y, "-^c"); 616s xlim ([0, 10]) 616s ylim ([0, 0.7]) 616s legend ({"Normalized HIST of sample 1 with σ=1", ... 616s "Normalized HIST of sample 2 with σ=2", ... 616s "Normalized HIST of sample 3 with σ=4", ... 616s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 616s sigmaA), ... 616s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 616s sigmaB), ... 616s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 616s sigmaC)}) 616s title ("Three population samples from different Rayleigh distibutions") 616s hold off 616s ***** test 616s x = [1 3 2 4 5 4 3 4]; 616s [shat, sci] = raylfit (x); 616s assert (shat, 2.4495, 1e-4) 616s assert (sci, [1.8243; 3.7279], 1e-4) 616s ***** test 616s x = [1 3 2 4 5 4 3 4]; 616s [shat, sci] = raylfit (x, 0.01); 616s assert (shat, 2.4495, 1e-4) 616s assert (sci, [1.6738; 4.3208], 1e-4) 616s ***** test 616s x = [1 2 3 4 5]; 616s f = [1 1 2 3 1]; 616s [shat, sci] = raylfit (x, [], [], f); 616s assert (shat, 2.4495, 1e-4) 616s assert (sci, [1.8243; 3.7279], 1e-4) 616s ***** test 616s x = [1 2 3 4 5]; 616s f = [1 1 2 3 1]; 616s [shat, sci] = raylfit (x, 0.01, [], f); 616s assert (shat, 2.4495, 1e-4) 616s assert (sci, [1.6738; 4.3208], 1e-4) 616s ***** test 616s x = [1 2 3 4 5 6]; 616s c = [0 0 0 0 0 1]; 616s f = [1 1 2 3 1 1]; 616s [shat, sci] = raylfit (x, 0.01, c, f); 616s assert (shat, 2.4495, 1e-4) 616s assert (sci, [1.6738; 4.3208], 1e-4) 616s ***** error raylfit (ones (2,5)); 616s ***** error raylfit ([1 2 -1 3]) 616s ***** error raylfit ([1 2 3], 0) 616s ***** error raylfit ([1 2 3], 1.2) 616s ***** error raylfit ([1 2 3], [0.02 0.05]) 616s ***** error ... 616s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 616s ***** error ... 616s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 616s ***** error ... 616s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 616s ***** error ... 616s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 616s ***** error 616s raylfit ([1 2 3], [], [], [1 5]) 616s ***** error 616s raylfit ([1 2 3], [], [], [1 5 -1]) 616s 16 tests, 16 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/unidfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/unidfit.m 616s ***** demo 616s ## Sample 2 populations from different discrete uniform distibutions 616s rand ("seed", 1); # for reproducibility 616s r1 = unidrnd (5, 1000, 1); 616s rand ("seed", 2); # for reproducibility 616s r2 = unidrnd (9, 1000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 0:0.5:20.5, 1); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their probability of success 616s NhatA = unidfit (r(:,1)); 616s NhatB = unidfit (r(:,2)); 616s 616s ## Plot their estimated PDFs 616s x = [0:10]; 616s y = unidpdf (x, NhatA); 616s plot (x, y, "-pg"); 616s y = unidpdf (x, NhatB); 616s plot (x, y, "-sc"); 616s xlim ([0, 10]) 616s ylim ([0, 0.4]) 616s legend ({"Normalized HIST of sample 1 with N=5", ... 616s "Normalized HIST of sample 2 with N=9", ... 616s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 616s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 616s title ("Two population samples from different discrete uniform distibutions") 616s hold off 616s ***** test 616s x = 0:5; 616s [Nhat, Nci] = unidfit (x); 616s assert (Nhat, 5); 616s assert (Nci, [5; 9]); 616s ***** test 616s x = 0:5; 616s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 616s assert (Nhat, 5); 616s assert (Nci, [5; 9]); 616s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 616s ***** error unidfit () 616s ***** error unidfit (-1, [1 2 3 3]) 616s ***** error unidfit (1, 0) 616s ***** error unidfit (1, 1.2) 616s ***** error unidfit (1, [0.02 0.05]) 616s ***** error ... 616s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 616s ***** error ... 616s unidfit ([1.5, 0.2], [], [1, 1, 1]) 616s ***** error ... 616s unidfit ([1.5, 0.2], [], [1, -1]) 616s 11 tests, 11 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/lognlike.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/lognlike.m 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = lognlike ([0, 0.25], x); 616s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 616s assert (nlogL, 3962.330333301793, 1e-10); 616s assert (avar, avar_out, 1e-7); 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 616s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 616s assert (nlogL, 2473.183051225747, 1e-10); 616s assert (avar, avar_out, 1e-7); 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = lognlike ([0, 0.5], x); 616s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 616s assert (nlogL, 1119.072424020455, 1e-12); 616s assert (avar, avar_out, 1e-6); 616s ***** test 616s x = 1:50; 616s censor = ones (1, 50); 616s censor([2, 4, 6, 8, 12, 14]) = 0; 616s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 616s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 616s assert (nlogL, 1091.746371145497, 1e-12); 616s assert (avar, avar_out, 1e-6); 616s ***** test 616s x = 1:50; 616s censor = ones (1, 50); 616s censor([2, 4, 6, 8, 12, 14]) = 0; 616s [nlogL, avar] = lognlike ([0, 1], x, censor); 616s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 616s assert (nlogL, 349.3969104144271, 1e-12); 616s assert (avar, avar_out, 1e-6); 616s ***** error ... 616s lognlike ([12, 15]); 616s ***** error lognlike ([12, 15], ones (2)); 616s ***** error ... 616s lognlike ([12, 15, 3], [1:50]); 616s ***** error ... 616s lognlike ([12, 15], [1:50], [1, 2, 3]); 616s ***** error ... 616s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 616s 10 tests, 10 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/nbinfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/nbinfit.m 616s ***** demo 616s ## Sample 2 populations from different negative binomial distibutions 616s randp ("seed", 5); randg ("seed", 5); # for reproducibility 616s r1 = nbinrnd (2, 0.15, 5000, 1); 616s randp ("seed", 8); randg ("seed", 8); # for reproducibility 616s r2 = nbinrnd (5, 0.2, 5000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, [0:51], 1); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their probability of success 616s r_psA = nbinfit (r(:,1)); 616s r_psB = nbinfit (r(:,2)); 616s 616s ## Plot their estimated PDFs 616s x = [0:40]; 616s y = nbinpdf (x, r_psA(1), r_psA(2)); 616s plot (x, y, "-pg"); 616s x = [min(r(:,2)):max(r(:,2))]; 616s y = nbinpdf (x, r_psB(1), r_psB(2)); 616s plot (x, y, "-sc"); 616s ylim ([0, 0.1]) 616s xlim ([0, 50]) 616s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 616s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 616s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 616s r_psA(1), r_psA(2)), ... 616s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 616s r_psB(1), r_psB(2))}) 616s title ("Two population samples from negative different binomial distibutions") 616s hold off 616s ***** test 616s [paramhat, paramci] = nbinfit ([1:50]); 616s assert (paramhat, [2.420857, 0.086704], 1e-6); 616s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 616s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 616s ***** test 616s [paramhat, paramci] = nbinfit ([1:20]); 616s assert (paramhat, [3.588233, 0.254697], 1e-6); 616s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 616s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 616s ***** test 616s [paramhat, paramci] = nbinfit ([1:10]); 616s assert (paramhat, [8.8067, 0.6156], 1e-4); 616s assert (paramci(:,1), [0; 30.7068], 1e-4); 616s assert (paramci(:,2), [0.0217; 1], 1e-4); 616s ***** test 616s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 616s assert (paramhat, [8.8067, 0.6156], 1e-4); 616s assert (paramci(:,1), [0; 30.7068], 1e-4); 616s assert (paramci(:,2), [0.0217; 1], 1e-4); 616s ***** test 616s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 616s assert (paramhat, [8.8067, 0.6156], 1e-4); 616s assert (paramci(:,1), [0; 30.7068], 1e-4); 616s assert (paramci(:,2), [0.0217; 1], 1e-4); 616s ***** error nbinfit ([-1 2 3 3]) 616s ***** error nbinfit (ones (2)) 616s ***** error nbinfit ([1 2 1.2 3]) 616s ***** error nbinfit ([1 2 3], 0) 616s ***** error nbinfit ([1 2 3], 1.2) 616s ***** error nbinfit ([1 2 3], [0.02 0.05]) 616s ***** error ... 616s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 616s ***** error ... 616s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 616s ***** error ... 616s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 616s ***** error ... 616s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 616s ***** error ... 616s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 616s 16 tests, 16 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/geofit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/geofit.m 616s ***** demo 616s ## Sample 2 populations from different geometric distibutions 616s rande ("seed", 1); # for reproducibility 616s r1 = geornd (0.15, 1000, 1); 616s rande ("seed", 2); # for reproducibility 616s r2 = geornd (0.5, 1000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 0:0.5:20.5, 1); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their probability of success 616s pshatA = geofit (r(:,1)); 616s pshatB = geofit (r(:,2)); 616s 616s ## Plot their estimated PDFs 616s x = [0:15]; 616s y = geopdf (x, pshatA); 616s plot (x, y, "-pg"); 616s y = geopdf (x, pshatB); 616s plot (x, y, "-sc"); 616s xlim ([0, 15]) 616s ylim ([0, 0.6]) 616s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 616s "Normalized HIST of sample 2 with ps=0.50", ... 616s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 616s mean (pshatA)), ... 616s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 616s mean (pshatB))}) 616s title ("Two population samples from different geometric distibutions") 616s hold off 616s ***** test 616s x = 0:5; 616s [pshat, psci] = geofit (x); 616s assert (pshat, 0.2857, 1e-4); 616s assert (psci, [0.092499; 0.478929], 1e-5); 616s ***** test 616s x = 0:5; 616s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 616s assert (pshat, 0.2857, 1e-4); 616s assert (psci, [0.092499; 0.478929], 1e-5); 616s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 616s ***** error geofit () 616s ***** error geofit (-1, [1 2 3 3]) 616s ***** error geofit (1, 0) 616s ***** error geofit (1, 1.2) 616s ***** error geofit (1, [0.02 0.05]) 616s ***** error ... 616s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 616s ***** error ... 616s geofit ([1.5, 0.2], [], [1, 1, 1]) 616s 10 tests, 10 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/evfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/evfit.m 616s ***** demo 616s ## Sample 3 populations from different extreme value distibutions 616s rand ("seed", 1); # for reproducibility 616s r1 = evrnd (2, 5, 400, 1); 616s rand ("seed", 12); # for reproducibility 616s r2 = evrnd (-5, 3, 400, 1); 616s rand ("seed", 13); # for reproducibility 616s r3 = evrnd (14, 8, 400, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 25, 0.4); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s ylim ([0, 0.28]) 616s xlim ([-30, 30]); 616s hold on 616s 616s ## Estimate their MU and SIGMA parameters 616s mu_sigmaA = evfit (r(:,1)); 616s mu_sigmaB = evfit (r(:,2)); 616s mu_sigmaC = evfit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [min(r(:)):max(r(:))]; 616s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 616s plot (x, y, "-pr"); 616s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 616s plot (x, y, "-sg"); 616s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 616s plot (x, y, "-^c"); 616s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 616s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 616s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 616s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 616s mu_sigmaA(1), mu_sigmaA(2)), ... 616s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 616s mu_sigmaB(1), mu_sigmaB(2)), ... 616s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 616s mu_sigmaC(1), mu_sigmaC(2))}) 616s title ("Three population samples from different extreme value distibutions") 616s hold off 616s ***** test 616s x = 1:50; 616s [paramhat, paramci] = evfit (x); 616s paramhat_out = [32.6811, 13.0509]; 616s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 616s assert (paramhat, paramhat_out, 1e-4); 616s assert (paramci, paramci_out, 1e-4); 616s ***** test 616s x = 1:50; 616s [paramhat, paramci] = evfit (x, 0.01); 616s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 616s assert (paramci, paramci_out, 1e-4); 616s ***** error evfit (ones (2,5)); 616s ***** error evfit (single (ones (1,5))); 616s ***** error evfit ([1, 2, 3, 4, NaN]); 616s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 616s ***** error 616s evfit ([1 2 3], 0.05, [], [1 5]) 616s ***** error 616s evfit ([1 2 3], 0.05, [], [1 5 -1]) 616s ***** error ... 616s evfit ([1:10], 0.05, [], [], 5) 616s 9 tests, 9 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/gumbellike.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gumbellike.m 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 616s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 616s assert (nlogL, 3.242264755689906e+17, 1e-14); 616s assert (avar, avar_out, 1e-3); 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 616s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 616s assert (nlogL, 481898704.0472211, 1e-6); 616s assert (avar, avar_out, 1e-3); 616s ***** test 616s x = 1:50; 616s [nlogL, avar] = gumbellike ([21, 15], x); 616s avar_out = [11.73913876598908, -5.9546128523121216; ... 616s -5.954612852312121, 3.708060045170236]; 616s assert (nlogL, 223.7612479380652, 1e-13); 616s assert (avar, avar_out, 1e-14); 616s ***** error gumbellike ([12, 15]); 616s ***** error gumbellike ([12, 15, 3], [1:50]); 616s ***** error gumbellike ([12, 3], ones (10, 2)); 616s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 616s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 616s 8 tests, 8 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/expfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/expfit.m 616s ***** demo 616s ## Sample 3 populations from 3 different exponential distibutions 616s rande ("seed", 1); # for reproducibility 616s r1 = exprnd (2, 4000, 1); 616s rande ("seed", 2); # for reproducibility 616s r2 = exprnd (5, 4000, 1); 616s rande ("seed", 3); # for reproducibility 616s r3 = exprnd (12, 4000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 48, 0.52); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s hold on 616s 616s ## Estimate their mu parameter 616s muhat = expfit (r); 616s 616s ## Plot their estimated PDFs 616s x = [0:max(r(:))]; 616s y = exppdf (x, muhat(1)); 616s plot (x, y, "-pr"); 616s y = exppdf (x, muhat(2)); 616s plot (x, y, "-sg"); 616s y = exppdf (x, muhat(3)); 616s plot (x, y, "-^c"); 616s ylim ([0, 0.6]) 616s xlim ([0, 40]) 616s legend ({"Normalized HIST of sample 1 with μ=2", ... 616s "Normalized HIST of sample 2 with μ=5", ... 616s "Normalized HIST of sample 3 with μ=12", ... 616s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 616s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 616s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 616s title ("Three population samples from different exponential distibutions") 616s hold off 616s ***** assert (expfit (1), 1) 616s ***** assert (expfit (1:3), 2) 616s ***** assert (expfit ([1:3]'), 2) 616s ***** assert (expfit (1:3, []), 2) 616s ***** assert (expfit (1:3, [], [], []), 2) 616s ***** assert (expfit (magic (3)), [5 5 5]) 616s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 616s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 616s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 616s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 616s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 616s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 616s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 616s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 616s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 616s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 616s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 616s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 616s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 616s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 616s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 616s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 616s [1.75 4.75 7.75]) 616s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 616s [1.75 4.75 7.75]) 616s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 616s [3.5 19/3 31/3]) 616s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 616s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 616s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 616s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 616s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 616s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 616s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 616s 1000*eps) 616s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 616s [0.953017262058213; 7.337731146400207], 1000*eps) 616s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 616s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 616s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 616s 1000*eps) 616s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 616s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 616s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 616s 1000*eps) 616s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 616s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 616s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 616s 1000*eps) 616s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 616s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 616s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 616s 1000*eps) 616s ***** test 616s x = reshape (1:8, [4 2]); 616s x(4) = NaN; 616s [muhat,muci] = expfit (x); 616s assert ({muhat, muci}, {[NaN, 6.5], ... 616s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 616s ***** test 616s x = magic (3); 616s censor = [0 1 0; 0 1 0; 0 1 0]; 616s freq = [1 1 0; 1 1 0; 1 1 0]; 616s [muhat,muci] = expfit (x, [], censor, freq); 616s assert ({muhat, muci}, {[5 NaN NaN], ... 616s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 616s ***** error expfit () 616s ***** error expfit (1,2,3,4,5) 616s ***** error [a b censor] = expfit (1) 616s ***** error expfit (1, [1 2]) 616s ***** error expfit ([-1 2 3 4 5]) 616s ***** error expfit ([1:5], [], "test") 616s ***** error expfit ([1:5], [], [], "test") 616s ***** error expfit ([1:5], [], [0 0 0 0]) 616s ***** error expfit ([1:5], [], [], [1 1 1 1]) 616s 47 tests, 47 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/hnlike.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/hnlike.m 616s ***** test 616s x = 1:20; 616s paramhat = hnfit (x, 0); 616s [nlogL, acov] = hnlike (paramhat, x); 616s assert (nlogL, 64.179177404891300, 1e-14); 616s ***** test 616s x = 1:20; 616s paramhat = hnfit (x, 0); 616s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 616s assert (nlogL, 64.179177404891300, 1e-14); 616s ***** error ... 616s hnlike ([12, 15]); 616s ***** error hnlike ([12, 15, 3], [1:50]); 616s ***** error hnlike ([3], [1:50]); 616s ***** error ... 616s hnlike ([0, 3], ones (2)); 616s ***** error ... 616s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 616s ***** error ... 616s hnlike ([1, 2], ones (10, 1), ones (8,1)) 616s ***** error ... 616s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 616s 9 tests, 9 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/wblfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/wblfit.m 616s ***** demo 616s ## Sample 3 populations from 3 different Weibull distibutions 616s rande ("seed", 1); # for reproducibility 616s r1 = wblrnd(2, 4, 2000, 1); 616s rande ("seed", 2); # for reproducibility 616s r2 = wblrnd(5, 2, 2000, 1); 616s rande ("seed", 5); # for reproducibility 616s r3 = wblrnd(1, 5, 2000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 30, [2.5 2.1 3.2]); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s ylim ([0, 2]); 616s xlim ([0, 10]); 616s hold on 616s 616s ## Estimate their lambda parameter 616s lambda_kA = wblfit (r(:,1)); 616s lambda_kB = wblfit (r(:,2)); 616s lambda_kC = wblfit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [0:0.1:15]; 616s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 616s plot (x, y, "-pr"); 616s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 616s plot (x, y, "-sg"); 616s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 616s plot (x, y, "-^c"); 616s hold off 616s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 616s "Normalized HIST of sample 2 with λ=5 and k=2", ... 616s "Normalized HIST of sample 3 with λ=1 and k=5", ... 616s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 616s lambda_kA(1), lambda_kA(2)), ... 616s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 616s lambda_kB(1), lambda_kB(2)), ... 616s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 616s lambda_kC(1), lambda_kC(2))}) 616s title ("Three population samples from different Weibull distibutions") 616s hold off 616s ***** test 616s x = 1:50; 616s [paramhat, paramci] = wblfit (x); 616s paramhat_out = [28.3636, 1.7130]; 616s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 616s assert (paramhat, paramhat_out, 1e-4); 616s assert (paramci, paramci_out, 1e-4); 616s ***** test 616s x = 1:50; 616s [paramhat, paramci] = wblfit (x, 0.01); 616s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 616s assert (paramci, paramci_out, 1e-4); 616s ***** error wblfit (ones (2,5)); 616s ***** error wblfit ([-1 2 3 4]); 616s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 616s ***** error wblfit ([1, 2, 3, 4, 5], 0); 616s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 616s ***** error ... 616s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 616s 13 tests, 13 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/binofit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/binofit.m 616s ***** demo 616s ## Sample 2 populations from different binomial distibutions 616s rand ("seed", 1); # for reproducibility 616s r1 = binornd (50, 0.15, 1000, 1); 616s rand ("seed", 2); # for reproducibility 616s r2 = binornd (100, 0.5, 1000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 23, 0.35); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their probability of success 616s pshatA = binofit (r(:,1), 50); 616s pshatB = binofit (r(:,2), 100); 616s 616s ## Plot their estimated PDFs 616s x = [min(r(:,1)):max(r(:,1))]; 616s y = binopdf (x, 50, mean (pshatA)); 616s plot (x, y, "-pg"); 616s x = [min(r(:,2)):max(r(:,2))]; 616s y = binopdf (x, 100, mean (pshatB)); 616s plot (x, y, "-sc"); 616s ylim ([0, 0.2]) 616s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 616s "Normalized HIST of sample 2 with ps=0.50", ... 616s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 616s mean (pshatA)), ... 616s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 616s mean (pshatB))}) 616s title ("Two population samples from different binomial distibutions") 616s hold off 616s ***** test 616s x = 0:3; 616s [pshat, psci] = binofit (x, 3); 616s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 616s assert (psci(1,:), [0, 0.7076], 1e-4); 616s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 616s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 616s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 616s ***** error ... 616s binofit ([1 2 3 4]) 616s ***** error ... 616s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 616s ***** error binofit (ones(2), [1, 2, 3, 3]) 616s ***** error ... 616s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 616s ***** error ... 616s binofit ([1, 4, 3, 2], [5, 5, 5]) 616s ***** error ... 616s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 616s ***** error binofit ([1, 2, 1], 3, 1.2); 616s ***** error binofit ([1, 2, 1], 3, 0); 616s ***** error binofit ([1, 2, 1], 3, "alpha"); 616s 10 tests, 10 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/nakafit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/nakafit.m 616s ***** demo 616s ## Sample 3 populations from different Nakagami distibutions 616s randg ("seed", 5) # for reproducibility 616s r1 = nakarnd (0.5, 1, 2000, 1); 616s randg ("seed", 2) # for reproducibility 616s r2 = nakarnd (5, 1, 2000, 1); 616s randg ("seed", 7) # for reproducibility 616s r3 = nakarnd (2, 2, 2000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, [0.05:0.1:3.5], 10); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s ylim ([0, 2.5]); 616s xlim ([0, 3.0]); 616s hold on 616s 616s ## Estimate their MU and LAMBDA parameters 616s mu_omegaA = nakafit (r(:,1)); 616s mu_omegaB = nakafit (r(:,2)); 616s mu_omegaC = nakafit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [0.01:0.1:3.01]; 616s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 616s plot (x, y, "-pr"); 616s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 616s plot (x, y, "-sg"); 616s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 616s plot (x, y, "-^c"); 616s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 616s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 616s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 616s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 616s mu_omegaA(1), mu_omegaA(2)), ... 616s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 616s mu_omegaB(1), mu_omegaB(2)), ... 616s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 616s mu_omegaC(1), mu_omegaC(2))}) 616s title ("Three population samples from different Nakagami distibutions") 616s hold off 616s ***** test 616s paramhat = nakafit ([1:50]); 616s paramhat_out = [0.7355, 858.5]; 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** test 616s paramhat = nakafit ([1:5]); 616s paramhat_out = [1.1740, 11]; 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** test 616s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 616s paramhat_out = [1.1740, 11]; 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** test 616s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 616s paramhat_out = nakafit ([1:5, 5]); 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** error nakafit (ones (2,5)); 616s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 616s ***** error nakafit ([1, 2, 3, 4, 5], 0); 616s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 616s ***** error ... 616s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 616s 15 tests, 15 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/bisafit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/bisafit.m 616s ***** demo 616s ## Sample 3 populations from different Birnbaum-Saunders distibutions 616s rand ("seed", 5); # for reproducibility 616s r1 = bisarnd (1, 0.5, 2000, 1); 616s rand ("seed", 2); # for reproducibility 616s r2 = bisarnd (2, 0.3, 2000, 1); 616s rand ("seed", 7); # for reproducibility 616s r3 = bisarnd (4, 0.5, 2000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 80, 4.2); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s ylim ([0, 1.1]); 616s xlim ([0, 8]); 616s hold on 616s 616s ## Estimate their α and β parameters 616s beta_gammaA = bisafit (r(:,1)); 616s beta_gammaB = bisafit (r(:,2)); 616s beta_gammaC = bisafit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [0:0.1:8]; 616s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 616s plot (x, y, "-pr"); 616s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 616s plot (x, y, "-sg"); 616s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 616s plot (x, y, "-^c"); 616s hold off 616s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 616s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 616s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 616s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 616s beta_gammaA(1), beta_gammaA(2)), ... 616s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 616s beta_gammaB(1), beta_gammaB(2)), ... 616s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 616s beta_gammaC(1), beta_gammaC(2))}) 616s title ("Three population samples from different Birnbaum-Saunders distibutions") 616s hold off 616s ***** test 616s paramhat = bisafit ([1:50]); 616s paramhat_out = [16.2649, 1.0156]; 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** test 616s paramhat = bisafit ([1:5]); 616s paramhat_out = [2.5585, 0.5839]; 616s assert (paramhat, paramhat_out, 1e-4); 616s ***** error bisafit (ones (2,5)); 616s ***** error bisafit ([-1 2 3 4]); 616s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 616s ***** error bisafit ([1, 2, 3, 4, 5], 0); 616s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 616s ***** error ... 616s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 616s ***** error ... 616s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 616s ***** error ... 616s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 616s ***** error ... 616s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 616s ***** error ... 616s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 616s 12 tests, 12 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/logilike.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/logilike.m 616s ***** test 616s nlogL = logilike ([25.5, 8.7725], [1:50]); 616s assert (nlogL, 206.6769, 1e-4); 616s ***** test 616s nlogL = logilike ([3, 0.8645], [1:5]); 616s assert (nlogL, 9.0699, 1e-4); 616s ***** error logilike (3.25) 616s ***** error logilike ([5, 0.2], ones (2)) 616s ***** error ... 616s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 616s ***** error ... 616s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 616s ***** error ... 616s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 616s ***** error ... 616s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 616s 8 tests, 8 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/gevfit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gevfit.m 616s ***** demo 616s ## Sample 2 populations from 2 different exponential distibutions 616s rand ("seed", 1); # for reproducibility 616s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 616s rand ("seed", 2); # for reproducibility 616s r2 = gevrnd (0, 1, -4, 5000, 1); 616s r = [r1, r2]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 50, 5); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s hold on 616s 616s ## Estimate their k, sigma, and mu parameters 616s k_sigma_muA = gevfit (r(:,1)); 616s k_sigma_muB = gevfit (r(:,2)); 616s 616s ## Plot their estimated PDFs 616s x = [-10:0.5:20]; 616s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 616s plot (x, y, "-pr"); 616s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 616s plot (x, y, "-sg"); 616s ylim ([0, 0.7]) 616s xlim ([-7, 5]) 616s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 616s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 616s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 616s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 616s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 616s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 616s title ("Two population samples from different exponential distibutions") 616s hold off 616s ***** test 616s x = 1:50; 616s [pfit, pci] = gevfit (x); 616s pfit_out = [-0.4407, 15.1923, 21.5309]; 616s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 616s assert (pfit, pfit_out, 1e-3); 616s assert (pci, pci_out, 1e-3); 616s ***** test 616s x = 1:2:50; 616s [pfit, pci] = gevfit (x); 616s pfit_out = [-0.4434, 15.2024, 21.0532]; 616s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 616s assert (pfit, pfit_out, 1e-3); 616s assert (pci, pci_out, 1e-3); 616s ***** error gevfit (ones (2,5)); 616s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 616s ***** error gevfit ([1, 2, 3, 4, 5], 0); 616s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 616s ***** error ... 616s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 616s ***** error ... 616s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 616s ***** error ... 616s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 616s ***** error ... 616s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 616s ***** error ... 616s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 616s 11 tests, 11 passed, 0 known failure, 0 skipped 616s [inst/dist_fit/ricefit.m] 616s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/ricefit.m 616s ***** demo 616s ## Sample 3 populations from different Gamma distibutions 616s randg ("seed", 5); # for reproducibility 616s randp ("seed", 6); 616s r1 = ricernd (1, 2, 3000, 1); 616s randg ("seed", 2); # for reproducibility 616s randp ("seed", 8); 616s r2 = ricernd (2, 4, 3000, 1); 616s randg ("seed", 7); # for reproducibility 616s randp ("seed", 9); 616s r3 = ricernd (7.5, 1, 3000, 1); 616s r = [r1, r2, r3]; 616s 616s ## Plot them normalized and fix their colors 616s hist (r, 75, 4); 616s h = findobj (gca, "Type", "patch"); 616s set (h(1), "facecolor", "c"); 616s set (h(2), "facecolor", "g"); 616s set (h(3), "facecolor", "r"); 616s ylim ([0, 0.7]); 616s xlim ([0, 12]); 616s hold on 616s 616s ## Estimate their α and β parameters 616s s_sigmaA = ricefit (r(:,1)); 616s s_sigmaB = ricefit (r(:,2)); 616s s_sigmaC = ricefit (r(:,3)); 616s 616s ## Plot their estimated PDFs 616s x = [0.01,0.1:0.2:18]; 616s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 616s plot (x, y, "-pr"); 616s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 616s plot (x, y, "-sg"); 616s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 616s plot (x, y, "-^c"); 616s hold off 616s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 616s "Normalized HIST of sample 2 with s=2 and σ=4", ... 616s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 616s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 616s s_sigmaA(1), s_sigmaA(2)), ... 616s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 616s s_sigmaB(1), s_sigmaB(2)), ... 616s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 616s s_sigmaC(1), s_sigmaC(2))}) 616s title ("Three population samples from different Rician distibutions") 616s hold off 616s ***** test 616s [paramhat, paramci] = ricefit ([1:50]); 616s assert (paramhat, [15.3057, 17.6668], 1e-4); 616s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 616s ***** test 616s [paramhat, paramci] = ricefit ([1:50], 0.01); 616s assert (paramhat, [15.3057, 17.6668], 1e-4); 616s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 616s ***** test 616s [paramhat, paramci] = ricefit ([1:5]); 616s assert (paramhat, [2.3123, 1.6812], 1e-4); 616s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 616s ***** test 616s [paramhat, paramci] = ricefit ([1:5], 0.01); 616s assert (paramhat, [2.3123, 1.6812], 1e-4); 616s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 616s ***** test 616s freq = [1 1 1 1 5]; 616s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 616s assert (paramhat, [3.5181, 1.5565], 1e-4); 616s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 617s ***** test 617s censor = [1 0 0 0 0]; 617s [paramhat, paramci] = ricefit ([1:5], [], censor); 617s assert (paramhat, [3.2978, 1.1527], 1e-4); 617s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 617s ***** assert (class (ricefit (single ([1:50]))), "single") 617s ***** error ricefit (ones (2)) 617s ***** error ricefit ([1:50], 1) 617s ***** error ricefit ([1:50], -1) 617s ***** error ricefit ([1:50], {0.05}) 617s ***** error ricefit ([1:50], "k") 617s ***** error ricefit ([1:50], i) 617s ***** error ricefit ([1:50], [0.01 0.02]) 617s ***** error ricefit ([1:50], [], [1 1]) 617s ***** error ricefit ([1:50], [], [], [1 1]) 617s ***** error ... 617s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 617s ***** error ricefit ([1 2 3 -4]) 617s ***** error ricefit ([1 2 0], [], [1 0 0]) 617s 19 tests, 19 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/normfit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/normfit.m 617s ***** demo 617s ## Sample 3 populations from 3 different normal distibutions 617s randn ("seed", 1); # for reproducibility 617s r1 = normrnd (2, 5, 5000, 1); 617s randn ("seed", 2); # for reproducibility 617s r2 = normrnd (5, 2, 5000, 1); 617s randn ("seed", 3); # for reproducibility 617s r3 = normrnd (9, 4, 5000, 1); 617s r = [r1, r2, r3]; 617s 617s ## Plot them normalized and fix their colors 617s hist (r, 15, 0.4); 617s h = findobj (gca, "Type", "patch"); 617s set (h(1), "facecolor", "c"); 617s set (h(2), "facecolor", "g"); 617s set (h(3), "facecolor", "r"); 617s hold on 617s 617s ## Estimate their mu and sigma parameters 617s [muhat, sigmahat] = normfit (r); 617s 617s ## Plot their estimated PDFs 617s x = [min(r(:)):max(r(:))]; 617s y = normpdf (x, muhat(1), sigmahat(1)); 617s plot (x, y, "-pr"); 617s y = normpdf (x, muhat(2), sigmahat(2)); 617s plot (x, y, "-sg"); 617s y = normpdf (x, muhat(3), sigmahat(3)); 617s plot (x, y, "-^c"); 617s ylim ([0, 0.5]) 617s xlim ([-20, 20]) 617s hold off 617s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 617s "Normalized HIST of sample 2 with mu=5, σ=2", ... 617s "Normalized HIST of sample 3 with mu=9, σ=4", ... 617s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 617s muhat(1), sigmahat(1)), ... 617s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 617s muhat(2), sigmahat(2)), ... 617s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 617s muhat(3), sigmahat(3))}, "location", "northwest") 617s title ("Three population samples from different normal distibutions") 617s hold off 617s ***** test 617s load lightbulb 617s idx = find (lightbulb(:,2) == 0); 617s censoring = lightbulb(idx,3) == 1; 617s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 617s assert (muHat, 9496.59586737857, 1e-11); 617s assert (sigmaHat, 3064.021012796456, 2e-12); 617s ***** test 617s randn ("seed", 234); 617s x = normrnd (3, 5, [1000, 1]); 617s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 617s assert (muCI(1) < 3); 617s assert (muCI(2) > 3); 617s assert (sigmaCI(1) < 5); 617s assert (sigmaCI(2) > 5); 617s ***** error ... 617s normfit (ones (3,3,3)) 617s ***** error ... 617s normfit (ones (20,3), [], zeros (20,1)) 617s ***** error normfit (ones (20,1), 0) 617s ***** error normfit (ones (20,1), -0.3) 617s ***** error normfit (ones (20,1), 1.2) 617s ***** error normfit (ones (20,1), [0.05 0.1]) 617s ***** error normfit (ones (20,1), 0.02+i) 617s ***** error ... 617s normfit (ones (20,1), [], zeros(15,1)) 617s ***** error ... 617s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 617s ***** error ... 617s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 617s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 617s 13 tests, 13 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/poisslike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/poisslike.m 617s ***** test 617s x = [1 3 2 4 5 4 3 4]; 617s [nlogL, avar] = poisslike (3.25, x); 617s assert (nlogL, 13.9533, 1e-4) 617s ***** test 617s x = [1 2 3 4 5]; 617s f = [1 1 2 3 1]; 617s [nlogL, avar] = poisslike (3.25, x, f); 617s assert (nlogL, 13.9533, 1e-4) 617s ***** error poisslike (1) 617s ***** error poisslike ([1 2 3], [1 2]) 617s ***** error ... 617s poisslike (3.25, ones (10, 2)) 617s ***** error ... 617s poisslike (3.25, [1 2 3 -4 5]) 617s ***** error ... 617s poisslike (3.25, ones (10, 1), ones (8,1)) 617s ***** error ... 617s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/gpfit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gpfit.m 617s ***** demo 617s ## Sample 2 populations from different generalized Pareto distibutions 617s ## Assume location parameter θ is known 617s theta = 0; 617s rand ("seed", 5); # for reproducibility 617s r1 = gprnd (1, 2, theta, 20000, 1); 617s rand ("seed", 2); # for reproducibility 617s r2 = gprnd (3, 1, theta, 20000, 1); 617s r = [r1, r2]; 617s 617s ## Plot them normalized and fix their colors 617s hist (r, [0.1:0.2:100], 5); 617s h = findobj (gca, "Type", "patch"); 617s set (h(1), "facecolor", "r"); 617s set (h(2), "facecolor", "c"); 617s ylim ([0, 1]); 617s xlim ([0, 5]); 617s hold on 617s 617s ## Estimate their α and β parameters 617s k_sigmaA = gpfit (r(:,1), theta); 617s k_sigmaB = gpfit (r(:,2), theta); 617s 617s ## Plot their estimated PDFs 617s x = [0.01, 0.1:0.2:18]; 617s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 617s plot (x, y, "-pc"); 617s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 617s plot (x, y, "-sr"); 617s hold off 617s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 617s "Normalized HIST of sample 2 with k=2 and σ=2", ... 617s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 617s k_sigmaA(1), k_sigmaA(2)), ... 617s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 617s k_sigmaB(1), k_sigmaB(2))}) 617s title ("Three population samples from different generalized Pareto distibutions") 617s text (2, 0.7, "Known location parameter θ = 0") 617s hold off 617s ***** test 617s k = 0.8937; sigma = 1.3230; theta = 1; 617s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 617s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 617s [hat, ci] = gpfit (x, theta); 617s assert (hat, [k, sigma, theta], 1e-4); 617s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 617s ***** error gpfit () 617s ***** error gpfit (1) 617s ***** error gpfit ([0.2, 0.5+i], 0); 617s ***** error gpfit (ones (2,2) * 0.5, 0); 617s ***** error ... 617s gpfit ([0.5, 1.2], [0, 1]); 617s ***** error ... 617s gpfit ([0.5, 1.2], 5+i); 617s ***** error ... 617s gpfit ([1:5], 2); 617s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 617s ***** error gpfit ([0.01:0.1:0.99], 0, i); 617s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 617s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 617s ***** error 617s gpfit ([1 2 3], 0, [], [1 5]) 617s ***** error 617s gpfit ([1 2 3], 0, [], [1 5 -1]) 617s ***** error ... 617s gpfit ([1:10], 1, 0.05, [], 5) 617s 15 tests, 15 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/tlsfit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/tlsfit.m 617s ***** demo 617s ## Sample 3 populations from 3 different location-scale T distibutions 617s randn ("seed", 1); # for reproducibility 617s randg ("seed", 2); # for reproducibility 617s r1 = tlsrnd (-4, 3, 1, 2000, 1); 617s randn ("seed", 3); # for reproducibility 617s randg ("seed", 4); # for reproducibility 617s r2 = tlsrnd (0, 3, 1, 2000, 1); 617s randn ("seed", 5); # for reproducibility 617s randg ("seed", 6); # for reproducibility 617s r3 = tlsrnd (5, 5, 4, 2000, 1); 617s r = [r1, r2, r3]; 617s 617s ## Plot them normalized and fix their colors 617s hist (r, [-21:21], [1, 1, 1]); 617s h = findobj (gca, "Type", "patch"); 617s set (h(1), "facecolor", "c"); 617s set (h(2), "facecolor", "g"); 617s set (h(3), "facecolor", "r"); 617s ylim ([0, 0.25]); 617s xlim ([-20, 20]); 617s hold on 617s 617s ## Estimate their lambda parameter 617s mu_sigma_nuA = tlsfit (r(:,1)); 617s mu_sigma_nuB = tlsfit (r(:,2)); 617s mu_sigma_nuC = tlsfit (r(:,3)); 617s 617s ## Plot their estimated PDFs 617s x = [-20:0.1:20]; 617s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 617s plot (x, y, "-pr"); 617s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 617s plot (x, y, "-sg"); 617s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 617s plot (x, y, "-^c"); 617s hold off 617s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 617s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 617s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 617s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 617s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 617s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 617s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 617s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 617s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 617s title ("Three population samples from different location-scale T distibutions") 617s hold off 617s ***** test 617s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 617s [paramhat, paramci] = tlsfit (x); 617s paramhat_out = [0.035893, 0.862711, 0.649261]; 617s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 617s assert (paramhat, paramhat_out, 1e-6); 617s assert (paramci, paramci_out, 1e-5); 617s ***** test 617s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 617s [paramhat, paramci] = tlsfit (x, 0.01); 617s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 617s assert (paramci, paramci_out, 1e-4); 617s ***** error tlsfit (ones (2,5)); 617s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 617s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 617s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 617s ***** error ... 617s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 617s 12 tests, 12 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/logllike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/logllike.m 617s ***** test 617s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 617s assert (nlogL, 211.2965, 1e-4); 617s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 617s ***** test 617s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 617s assert (nlogL, 9.2206, 1e-4); 617s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 617s ***** error logllike (3.25) 617s ***** error logllike ([5, 0.2], ones (2)) 617s ***** error ... 617s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 617s ***** error ... 617s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 617s ***** error ... 617s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 617s ***** error ... 617s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/hnfit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/hnfit.m 617s ***** demo 617s ## Sample 2 populations from different half-normal distibutions 617s rand ("seed", 1); # for reproducibility 617s r1 = hnrnd (0, 5, 5000, 1); 617s rand ("seed", 2); # for reproducibility 617s r2 = hnrnd (0, 2, 5000, 1); 617s r = [r1, r2]; 617s 617s ## Plot them normalized and fix their colors 617s hist (r, [0.5:20], 1); 617s h = findobj (gca, "Type", "patch"); 617s set (h(1), "facecolor", "c"); 617s set (h(2), "facecolor", "g"); 617s hold on 617s 617s ## Estimate their shape parameters 617s mu_sigmaA = hnfit (r(:,1), 0); 617s mu_sigmaB = hnfit (r(:,2), 0); 617s 617s ## Plot their estimated PDFs 617s x = [0:0.2:10]; 617s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 617s plot (x, y, "-pr"); 617s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 617s plot (x, y, "-sg"); 617s xlim ([0, 10]) 617s ylim ([0, 0.5]) 617s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 617s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 617s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 617s mu_sigmaA(1), mu_sigmaA(2)), ... 617s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 617s mu_sigmaB(1), mu_sigmaB(2))}) 617s title ("Two population samples from different half-normal distibutions") 617s hold off 617s ***** test 617s x = 1:20; 617s [paramhat, paramci] = hnfit (x, 0); 617s assert (paramhat, [0, 11.9791], 1e-4); 617s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 617s ***** test 617s x = 1:20; 617s [paramhat, paramci] = hnfit (x, 0, 0.01); 617s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 617s ***** error hnfit () 617s ***** error hnfit (1) 617s ***** error hnfit ([0.2, 0.5+i], 0); 617s ***** error hnfit (ones (2,2) * 0.5, 0); 617s ***** error ... 617s hnfit ([0.5, 1.2], [0, 1]); 617s ***** error ... 617s hnfit ([0.5, 1.2], 5+i); 617s ***** error ... 617s hnfit ([1:5], 2); 617s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 617s ***** error hnfit ([0.01:0.1:0.99], 0, i); 617s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 617s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 617s ***** error 617s hnfit ([1 2 3], 0, [], [1 5]) 617s ***** error 617s hnfit ([1 2 3], 0, [], [1 5 -1]) 617s 15 tests, 15 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/ricelike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/ricelike.m 617s ***** test 617s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 617s assert (nlogL, 204.5230311010569, 1e-12); 617s ***** test 617s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 617s assert (nlogL, 8.65562164930058, 1e-12); 617s ***** error ricelike (3.25) 617s ***** error ricelike ([5, 0.2], ones (2)) 617s ***** error ... 617s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 617s ***** error ... 617s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 617s ***** error ... 617s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 617s ***** error ... 617s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 617s ***** error ... 617s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 617s 9 tests, 9 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/gevfit_lmom.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gevfit_lmom.m 617s ***** xtest <31070> 617s data = 1:50; 617s [pfit, pci] = gevfit_lmom (data); 617s expected_p = [-0.28 15.01 20.22]'; 617s assert (pfit, expected_p, 0.1); 617s 1 test, 1 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/explike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/explike.m 617s ***** test 617s x = 12; 617s beta = 5; 617s [L, V] = explike (beta, x); 617s expected_L = 4.0094; 617s expected_V = 6.5789; 617s assert (L, expected_L, 0.001); 617s assert (V, expected_V, 0.001); 617s ***** test 617s x = 1:5; 617s beta = 2; 617s [L, V] = explike (beta, x); 617s expected_L = 10.9657; 617s expected_V = 0.4; 617s assert (L, expected_L, 0.001); 617s assert (V, expected_V, 0.001); 617s ***** error explike () 617s ***** error explike (2) 617s ***** error explike ([12, 3], [1:50]) 617s ***** error explike (3, ones (10, 2)) 617s ***** error ... 617s explike (3, [1:50], [1, 2, 3]) 617s ***** error ... 617s explike (3, [1:50], [], [1, 2, 3]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/evlike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/evlike.m 617s ***** test 617s x = 1:50; 617s [nlogL, acov] = evlike ([2.3, 1.2], x); 617s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 617s assert (nlogL, 3.242264755689906e+17, 1e-14); 617s assert (acov, avar_out, 1e-3); 617s ***** test 617s x = 1:50; 617s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 617s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 617s assert (nlogL, 481898704.0472211, 1e-6); 617s assert (acov, avar_out, 1e-3); 617s ***** test 617s x = 1:50; 617s [nlogL, acov] = evlike ([21, 15], x); 617s avar_out = [11.73913876598908, -5.9546128523121216; ... 617s -5.954612852312121, 3.708060045170236]; 617s assert (nlogL, 223.7612479380652, 1e-13); 617s assert (acov, avar_out, 1e-14); 617s ***** error evlike ([12, 15]) 617s ***** error evlike ([12, 15, 3], [1:50]) 617s ***** error evlike ([12, 3], ones (10, 2)) 617s ***** error ... 617s evlike ([12, 15], [1:50], [1, 2, 3]) 617s ***** error ... 617s evlike ([12, 15], [1:50], [], [1, 2, 3]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/gamlike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gamlike.m 617s ***** test 617s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 617s assert (nlogL, 19.4426, 1e-4); 617s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 617s ***** test 617s [nlogL, acov] = gamlike([2, 3], [5:45]); 617s assert (nlogL, 305.8070, 1e-4); 617s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 617s ***** test 617s [nlogL, acov] = gamlike([2, 13], [5:45]); 617s assert (nlogL, 163.2261, 1e-4); 617s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 617s ***** error ... 617s gamlike ([12, 15]) 617s ***** error gamlike ([12, 15, 3], [1:50]) 617s ***** error gamlike ([12, 3], ones (10, 2)) 617s ***** error ... 617s gamlike ([12, 15], [1:50], [1, 2, 3]) 617s ***** error ... 617s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/normlike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/normlike.m 617s ***** error normlike ([12, 15]); 617s ***** error normlike ([12, 15], ones (2)); 617s ***** error ... 617s normlike ([12, 15, 3], [1:50]); 617s ***** error ... 617s normlike ([12, 15], [1:50], [1, 2, 3]); 617s ***** error ... 617s normlike ([12, 15], [1:50], [], [1, 2, 3]); 617s ***** error ... 617s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 617s ***** test 617s x = 1:50; 617s [nlogL, avar] = normlike ([2.3, 1.2], x); 617s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 617s assert (nlogL, 13014.95883783327, 1e-10); 617s assert (avar, avar_out, 1e-4); 617s ***** test 617s x = 1:50; 617s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 617s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 617s assert (nlogL, 2854.802587833265, 1e-10); 617s assert (avar, avar_out, 1e-4); 617s ***** test 617s x = 1:50; 617s [nlogL, avar] = normlike ([21, 15], x); 617s avar_out = [5.460474308300396, -1.600790513833993; ... 617s -1.600790513833993, 2.667984189723321]; 617s assert (nlogL, 206.738325604233, 1e-12); 617s assert (avar, avar_out, 1e-14); 617s ***** test 617s x = 1:50; 617s censor = ones (1, 50); 617s censor([2, 4, 6, 8, 12, 14]) = 0; 617s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 617s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 617s assert (nlogL, Inf); 617s assert (avar, [NaN, NaN; NaN, NaN]); 617s ***** test 617s x = 1:50; 617s censor = ones (1, 50); 617s censor([2, 4, 6, 8, 12, 14]) = 0; 617s [nlogL, avar] = normlike ([21, 15], x, censor); 617s avar_out = [24.4824488866131, -10.6649544179636; ... 617s -10.6649544179636, 6.22827849965737]; 617s assert (nlogL, 86.9254371829733, 1e-12); 617s assert (avar, avar_out, 8e-14); 617s 11 tests, 11 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/nbinlike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/nbinlike.m 617s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 617s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 617s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 617s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 617s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 617s ***** error nbinlike (3.25) 617s ***** error nbinlike ([5, 0.2], ones (2)) 617s ***** error nbinlike ([5, 0.2], [-1, 3]) 617s ***** error ... 617s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 617s ***** error nbinlike ([-5, 0.2], [1:15]) 617s ***** error nbinlike ([0, 0.2], [1:15]) 617s ***** error nbinlike ([5, 1.2], [3, 5]) 617s ***** error nbinlike ([5, -0.2], [3, 5]) 617s ***** error ... 617s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 617s ***** error ... 617s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 617s ***** error ... 617s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 617s 16 tests, 16 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/gumbelfit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/gumbelfit.m 617s ***** demo 617s ## Sample 3 populations from different Gumbel distibutions 617s rand ("seed", 1); # for reproducibility 617s r1 = gumbelrnd (2, 5, 400, 1); 617s rand ("seed", 11); # for reproducibility 617s r2 = gumbelrnd (-5, 3, 400, 1); 617s rand ("seed", 16); # for reproducibility 617s r3 = gumbelrnd (14, 8, 400, 1); 617s r = [r1, r2, r3]; 617s 617s ## Plot them normalized and fix their colors 617s hist (r, 25, 0.32); 617s h = findobj (gca, "Type", "patch"); 617s set (h(1), "facecolor", "c"); 617s set (h(2), "facecolor", "g"); 617s set (h(3), "facecolor", "r"); 617s ylim ([0, 0.28]) 617s xlim ([-11, 50]); 617s hold on 617s 617s ## Estimate their MU and BETA parameters 617s mu_betaA = gumbelfit (r(:,1)); 617s mu_betaB = gumbelfit (r(:,2)); 617s mu_betaC = gumbelfit (r(:,3)); 617s 617s ## Plot their estimated PDFs 617s x = [min(r(:)):max(r(:))]; 617s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 617s plot (x, y, "-pr"); 617s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 617s plot (x, y, "-sg"); 617s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 617s plot (x, y, "-^c"); 617s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 617s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 617s "Normalized HIST of sample 3 with μ=14 and β=8", ... 617s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 617s mu_betaA(1), mu_betaA(2)), ... 617s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 617s mu_betaB(1), mu_betaB(2)), ... 617s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 617s mu_betaC(1), mu_betaC(2))}) 617s title ("Three population samples from different Gumbel distibutions") 617s hold off 617s ***** test 617s x = 1:50; 617s [paramhat, paramci] = gumbelfit (x); 617s paramhat_out = [18.3188, 13.0509]; 617s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 617s assert (paramhat, paramhat_out, 1e-4); 617s assert (paramci, paramci_out, 1e-4); 617s ***** test 617s x = 1:50; 617s [paramhat, paramci] = gumbelfit (x, 0.01); 617s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 617s assert (paramci, paramci_out, 1e-4); 617s ***** error gumbelfit (ones (2,5)); 617s ***** error ... 617s gumbelfit (single (ones (1,5))); 617s ***** error ... 617s gumbelfit ([1, 2, 3, 4, NaN]); 617s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 617s ***** error ... 617s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 617s ***** error ... 617s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 617s ***** error 617s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 617s ***** error ... 617s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 617s 10 tests, 10 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/nakalike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/nakalike.m 617s ***** test 617s nlogL = nakalike ([0.735504, 858.5], [1:50]); 617s assert (nlogL, 202.8689, 1e-4); 617s ***** test 617s nlogL = nakalike ([1.17404, 11], [1:5]); 617s assert (nlogL, 8.6976, 1e-4); 617s ***** test 617s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 617s assert (nlogL, 8.6976, 1e-4); 617s ***** test 617s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 617s assert (nlogL, 8.6976, 1e-4); 617s ***** error nakalike (3.25) 617s ***** error nakalike ([5, 0.2], ones (2)) 617s ***** error ... 617s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 617s ***** error ... 617s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 617s ***** error ... 617s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 617s ***** error ... 617s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 617s ***** error ... 617s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 617s 11 tests, 11 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/betalike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/betalike.m 617s ***** test 617s x = 0.01:0.02:0.99; 617s [nlogL, avar] = betalike ([2.3, 1.2], x); 617s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 617s assert (nlogL, 17.873477715879040, 3e-14); 617s assert (avar, avar_out, 1e-7); 617s ***** test 617s x = 0.01:0.02:0.99; 617s [nlogL, avar] = betalike ([1, 4], x); 617s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 617s assert (nlogL, 79.648061114839550, 1e-13); 617s assert (avar, avar_out, 1e-7); 617s ***** test 617s x = 0.00:0.02:1; 617s [nlogL, avar] = betalike ([1, 4], x); 617s avar_out = [0.00000801564765, 0.00000131397245; ... 617s 0.00000131397245, 0.00070827639442]; 617s assert (nlogL, 573.2008434477486, 1e-10); 617s assert (avar, avar_out, 1e-14); 617s ***** error ... 617s betalike ([12, 15]); 617s ***** error betalike ([12, 15, 3], [1:50]); 617s ***** error ... 617s betalike ([12, 15], ones (10, 1), ones (8,1)) 617s ***** error ... 617s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 617s ***** error ... 617s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 617s 8 tests, 8 passed, 0 known failure, 0 skipped 617s [inst/dist_fit/bisalike.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fit/bisalike.m 617s ***** test 617s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 617s assert (nlogL, 215.5905, 1e-4); 617s ***** test 617s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 617s assert (nlogL, 8.9950, 1e-4); 617s ***** error bisalike (3.25) 617s ***** error bisalike ([5, 0.2], ones (2)) 617s ***** error bisalike ([5, 0.2], [-1, 3]) 617s ***** error ... 617s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 617s ***** error ... 617s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 617s ***** error ... 617s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 617s ***** error ... 617s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 617s 9 tests, 9 passed, 0 known failure, 0 skipped 617s [inst/stepwisefit.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/stepwisefit.m 617s ***** test 617s % Sample data from Draper and Smith (n = 13, k = 4) 617s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 617s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 617s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 617s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 617s 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]'; 617s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 617s assert(X_use, [4 1]) 617s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 617s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 617s assert(X_use, [4 1]) 617s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 617s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 617s assert(X_use, [4 1]) 617s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 617s 1 test, 1 passed, 0 known failure, 0 skipped 617s [inst/tiedrank.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/tiedrank.m 617s ***** test 617s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 617s assert (r, [1, 2.5, 4, 5, 2.5]); 617s assert (tieadj, 3); 617s ***** test 617s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 617s assert (r, [1; 2.5; 4; 5; 2.5]); 617s assert (tieadj, 3); 617s ***** test 617s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 617s assert (r, [1, 2.5, 4, 5, 2.5]); 617s assert (tieadj, [1; 0; 18]); 617s ***** test 617s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 617s assert (r, [1, 2.5, 2, 1, 2.5]); 617s assert (tieadj, 3); 617s ***** test 617s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 617s assert (r, [1, 2.5, 2, 1, 2.5]); 617s assert (tieadj, [1; 0; 18]); 617s ***** error tiedrank (ones (2)) 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], "A") 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], [true, true]) 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], 0, "A") 617s ***** error ... 617s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 617s 12 tests, 12 passed, 0 known failure, 0 skipped 617s [inst/regression_ftest.m] 617s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/regression_ftest.m 617s ***** error regression_ftest (); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 618s ***** error ... 618s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 618s ***** error ... 618s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 618s 18 tests, 18 passed, 0 known failure, 0 skipped 618s [inst/datasample.m] 618s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/datasample.m 618s ***** error datasample(); 618s ***** error datasample(1); 618s ***** error datasample({1, 2, 3}, 1); 618s ***** error datasample([1 2], -1); 618s ***** error datasample([1 2], 1.5); 618s ***** error datasample([1 2], [1 1]); 618s ***** error datasample([1 2], 'g', [1 1]); 618s ***** error datasample([1 2], 1, -1); 618s ***** error datasample([1 2], 1, 1.5); 618s ***** error datasample([1 2], 1, [1 1]); 618s ***** error datasample([1 2], 1, 1, "Replace", -2); 618s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 618s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 618s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 618s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 618s ***** test 618s dat = randn (10, 4); 618s assert (size (datasample (dat, 3, 1)), [3 4]); 618s ***** test 618s dat = randn (10, 4); 618s assert (size (datasample (dat, 3, 2)), [10 3]); 618s 17 tests, 17 passed, 0 known failure, 0 skipped 618s [inst/fitcgam.m] 618s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitcgam.m 618s ***** demo 618s ## Train a GAM classifier for binary classification 618s ## using specific data and plot the decision boundaries. 618s 618s ## Define specific data 618s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 618s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 618s Y = [0; 0; 0; 0; 0; ... 618s 1; 1; 1; 1; 1]; 618s 618s ## Train the GAM model 618s obj = fitcgam (X, Y, "Interactions", "all"); 618s 618s ## Create a grid of values for prediction 618s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 618s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 618s [x1G, x2G] = meshgrid (x1, x2); 618s XGrid = [x1G(:), x2G(:)]; 618s pred = predict (obj, XGrid); 618s 618s ## Plot decision boundaries and data points 618s predNumeric = str2double (pred); 618s gidx = predNumeric > 0.5; 618s 618s figure 618s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 618s hold on 618s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 618s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 618s xlabel("Feature 1"); 618s ylabel("Feature 2"); 618s title("Generalized Additive Model (GAM) Decision Boundary"); 618s legend({"Class 1 Region", "Class 0 Region", ... 618s "Class 1 Samples", "Class 0 Samples"}, ... 618s "location", "northwest") 618s axis tight 618s hold off 618s ***** test 618s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 618s y = [0; 0; 1; 1]; 618s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 618s a = fitcgam (x, y, "PredictorNames", PredictorNames); 618s assert (class (a), "ClassificationGAM"); 618s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 618s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 618s assert (a.ClassNames, {'0'; '1'}) 618s assert (a.PredictorNames, PredictorNames) 618s assert (a.BaseModel.Intercept, 0) 619s ***** test 619s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 619s y = [1; 0; 1; 0; 1]; 619s a = fitcgam (x, y, "interactions", "all"); 619s assert (class (a), "ClassificationGAM"); 619s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 619s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 619s assert (a.ClassNames, {'1'; '0'}) 619s assert (a.PredictorNames, {'x1', 'x2'}) 619s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 620s ***** test 620s load fisheriris 620s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 620s X = meas(inds, :); 620s Y = species(inds, :)'; 620s Y = strcmp (Y, 'virginica')'; 620s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 620s assert (class (a), "ClassificationGAM"); 620s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 620s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 620s assert (a.ClassNames, {'0'; '1'}) 620s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 620s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 620s assert (a.ModelwInt.Intercept, 0) 623s ***** error fitcgam () 623s ***** error fitcgam (ones (4,1)) 623s ***** error 623s fitcgam (ones (4,2), ones (4, 1), "K") 623s ***** error 623s fitcgam (ones (4,2), ones (3, 1)) 623s ***** error 623s fitcgam (ones (4,2), ones (3, 1), "K", 2) 623s 8 tests, 8 passed, 0 known failure, 0 skipped 623s [inst/hmmgenerate.m] 623s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hmmgenerate.m 623s ***** test 623s len = 25; 623s transprob = [0.8, 0.2; 0.4, 0.6]; 623s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 623s [sequence, states] = hmmgenerate (len, transprob, outprob); 623s assert (length (sequence), len); 623s assert (length (states), len); 623s assert (min (sequence) >= 1); 623s assert (max (sequence) <= columns (outprob)); 623s assert (min (states) >= 1); 623s assert (max (states) <= rows (transprob)); 623s ***** test 623s len = 25; 623s transprob = [0.8, 0.2; 0.4, 0.6]; 623s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 623s symbols = {"A", "B", "C"}; 623s statenames = {"One", "Two"}; 623s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 623s "symbols", symbols, "statenames", statenames); 623s assert (length (sequence), len); 623s assert (length (states), len); 623s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 623s strcmp (sequence, "C") == ones (1, len)); 623s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 623s 2 tests, 2 passed, 0 known failure, 0 skipped 623s [inst/randsample.m] 623s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/randsample.m 623s ***** test 623s n = 20; 623s k = 5; 623s x = randsample(n, k); 623s assert (size(x), [1 k]); 623s x = randsample(n, k, true); 623s assert (size(x), [1 k]); 623s x = randsample(n, k, false); 623s assert (size(x), [1 k]); 623s x = randsample(n, k, true, ones(n, 1)); 623s assert (size(x), [1 k]); 623s x = randsample(1:n, k); 623s assert (size(x), [1 k]); 623s x = randsample(1:n, k, true); 623s assert (size(x), [1 k]); 623s x = randsample(1:n, k, false); 623s assert (size(x), [1 k]); 623s x = randsample(1:n, k, true, ones(n, 1)); 623s assert (size(x), [1 k]); 623s x = randsample((1:n)', k); 623s assert (size(x), [k 1]); 623s x = randsample((1:n)', k, true); 623s assert (size(x), [k 1]); 623s x = randsample((1:n)', k, false); 623s assert (size(x), [k 1]); 623s x = randsample((1:n)', k, true, ones(n, 1)); 623s assert (size(x), [k 1]); 623s n = 10; 623s k = 100; 623s x = randsample(n, k, true, 1:n); 623s assert (size(x), [1 k]); 623s x = randsample((1:n)', k, true); 623s assert (size(x), [k 1]); 623s x = randsample(k, k, false, 1:k); 623s assert (size(x), [1 k]); 623s 1 test, 1 passed, 0 known failure, 0 skipped 623s [inst/mhsample.m] 623s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/mhsample.m 623s ***** demo 623s ## Define function to sample 623s d = 2; 623s mu = [-1; 2]; 623s rand ("seed", 5) # for reproducibility 623s Sigma = rand (d); 623s Sigma = (Sigma + Sigma'); 623s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 623s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 623s ## Inputs 623s start = ones (1, 2); 623s nsamples = 500; 623s sym = true; 623s K = 500; 623s m = 10; 623s rand ("seed", 8) # for reproducibility 623s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 623s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 623s "symmetric", sym, "burnin", K, "thin", m); 623s figure; 623s hold on; 623s plot (smpl(:, 1), smpl(:, 2), 'x'); 623s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 623s z = reshape (pdf ([x(:), y(:)]), size(x)); 623s mesh (x, y, z, "facecolor", "None"); 623s ## Using sample points to find the volume of half a sphere with radius of .5 623s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 623s int = mean (f (smpl) ./ pdf (smpl)); 623s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 623s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 623s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 623s printf ("Monte Carlo integral error estimate %f\n", errest); 623s printf ("The actual error %f\n", trueerr); 623s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 623s ***** demo 623s ## Integrate truncated normal distribution to find normilization constant 623s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 623s nsamples = 1e3; 623s rand ("seed", 5) # for reproducibility 623s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 623s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 623s "symmetric", true, "thin", 4); 623s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 623s x = linspace (-3, 3, 1000); 623s area(x, f(x)); 623s xlabel ('x'); 623s ylabel ('f(x)'); 623s int = mean (f (smpl) ./ pdf (smpl)); 623s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 623s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 623s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 623s printf ("Monte Carlo integral error estimate %f\n", errest); 623s printf ("The actual error %f\n", trueerr); 623s ***** test 623s nchain = 1e4; 623s start = rand (nchain, 1); 623s nsamples = 1e3; 623s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 623s proppdf = @(x, y) 1/3; 623s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 623s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 623s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 623s "burnin", 0); 623s assert (mean (mean (smpl, 1), 3), 1, .01); 623s assert (mean (var (smpl, 1), 3), 1, .01) 626s ***** error mhsample (); 626s ***** error mhsample (1); 626s ***** error mhsample (1, 1); 626s ***** error mhsample (1, 1, "pdf", @(x)x); 626s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 626s 6 tests, 6 passed, 0 known failure, 0 skipped 626s [inst/ztest2.m] 626s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ztest2.m 626s ***** error ztest2 (); 626s ***** error ztest2 (1); 626s ***** error ztest2 (1, 2); 626s ***** error ztest2 (1, 2, 3); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha") 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha", 0); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha", 1.2); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha", "val"); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "tail", "val"); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 626s ***** error ... 626s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 626s 11 tests, 11 passed, 0 known failure, 0 skipped 626s [inst/probit.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/probit.m 627s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 627s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 627s ***** error probit () 627s ***** error probit (1, 2) 627s 4 tests, 4 passed, 0 known failure, 0 skipped 627s [inst/fishertest.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fishertest.m 627s ***** demo 627s ## A Fisher's exact test example 627s 627s x = [3, 1; 1, 3] 627s [h, p, stats] = fishertest(x) 627s ***** assert (fishertest ([3, 4; 5, 7]), false); 627s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 627s ***** test 627s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 627s assert (pval, 1, 1e-14); 627s assert (stats.OddsRatio, 1.05); 627s CI = [0.159222057151289, 6.92429189601808]; 627s assert (stats.ConfidenceInterval, CI, 1e-14) 627s ***** test 627s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 627s assert (pval, 0.08080808080808080, 1e-14); 627s assert (stats.OddsRatio, 0); 627s assert (stats.ConfidenceInterval, [-Inf, Inf]) 627s ***** error fishertest (); 627s ***** error fishertest (1, 2, 3, 4, 5, 6); 627s ***** error ... 627s fishertest (ones (2, 2, 2)); 627s ***** error ... 627s fishertest ([1, 2; -3, 4]); 627s ***** error ... 627s fishertest ([1, 2; 3, 4+i]); 627s ***** error ... 627s fishertest ([1, 2; 3, 4.2]); 627s ***** error ... 627s fishertest ([NaN, 2; 3, 4]); 627s ***** error ... 627s fishertest ([1, Inf; 3, 4]); 627s ***** error ... 627s fishertest (ones (2) * 1e8); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "alpha", 0); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "alpha", 1.2); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "alpha", "val"); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "tail", "val"); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 627s ***** error ... 627s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 627s 19 tests, 19 passed, 0 known failure, 0 skipped 627s [inst/inconsistent.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/inconsistent.m 627s ***** error inconsistent () 627s ***** error inconsistent ([1 2 1], 2, 3) 627s ***** error inconsistent (ones (2, 2)) 627s ***** error inconsistent ([1 2 1], -1) 627s ***** error inconsistent ([1 2 1], 1.3) 627s ***** error inconsistent ([1 2 1], [1 1]) 627s ***** error inconsistent (ones (2, 3)) 627s ***** test 627s load fisheriris; 627s Z = linkage(meas, 'average', 'chebychev'); 627s assert (cond (inconsistent (Z)), 39.9, 1e-3); 627s 8 tests, 8 passed, 0 known failure, 0 skipped 627s [inst/ff2n.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ff2n.m 627s ***** error ff2n (); 627s ***** error ff2n (2, 5); 627s ***** error ff2n (2.5); 627s ***** error ff2n (0); 627s ***** error ff2n (-3); 627s ***** error ff2n (3+2i); 627s ***** error ff2n (Inf); 627s ***** error ff2n (NaN); 627s ***** test 627s A = ff2n (3); 627s assert (A, fullfact (3)); 627s ***** test 627s A = ff2n (8); 627s assert (A, fullfact (8)); 627s 10 tests, 10 passed, 0 known failure, 0 skipped 627s [inst/plsregress.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/plsregress.m 627s ***** demo 627s ## Perform Partial Least-Squares Regression 627s 627s ## Load the spectra data set and use the near infrared (NIR) spectral 627s ## intensities (NIR) as the predictor and the corresponding octave 627s ## ratings (octave) as the response. 627s load spectra 627s 627s ## Perform PLS regression with 10 components 627s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 627s 627s ## Plot the percentage of explained variance in the response variable 627s ## (PCTVAR) as a function of the number of components. 627s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 627s xlim ([1, 10]); 627s xlabel ("Number of PLS components"); 627s ylabel ("Percentage of Explained Variance in octane"); 627s title ("Explained Variance per PLS components"); 627s 627s ## Compute the fitted response and display the residuals. 627s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 627s residuals = octane - octane_fitted; 627s figure 627s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 627s xlabel ("Observations"); 627s ylabel ("Residuals"); 627s title ("Residuals in octane's fitted responce"); 627s ***** demo 627s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 627s 627s ## Load the spectra data set and use the near infrared (NIR) spectral 627s ## intensities (NIR) as the predictor and the corresponding octave 627s ## ratings (octave) as the response. Variables with a VIP score greater than 627s ## 1 are considered important for the projection of the PLS regression model. 627s load spectra 627s 627s ## Perform PLS regression with 10 components 627s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 627s plsregress (NIR, octane, 10); 627s 627s ## Calculate the normalized PLS weights 627s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 627s 627s ## Calculate the VIP scores for 10 components 627s nobs = size (xload, 1); 627s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 627s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 627s 627s ## Find variables with a VIP score greater than or equal to 1 627s VIPidx = find (VIPscore >= 1); 627s 627s ## Plot the VIP scores 627s scatter (1:length (VIPscore), VIPscore, "xb"); 627s hold on 627s scatter (VIPidx, VIPscore (VIPidx), "xr"); 627s plot ([1, length(VIPscore)], [1, 1], "--k"); 627s hold off 627s axis ("tight"); 627s xlabel ("Predictor Variables"); 627s ylabel ("VIP scores"); 627s title ("VIP scores for each predictror variable with 10 components"); 627s ***** test 627s load spectra 627s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 627s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 627s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 627s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 627s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 627s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 627s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 627s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 627s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 627s assert (xload(1,:), xload1_out, 1e-4); 627s assert (yload, yload_out, 1e-4); 627s assert (xscore(1,:), xscore1_out, 1e-4); 627s assert (yscore(1,:), yscore1_out, 1e-4); 627s ***** test 627s load spectra 627s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 627s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 627s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 627s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 627s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 627s assert (xload(1,:), xload1_out, 1e-4); 627s assert (yload, yload_out, 1e-4); 627s assert (xscore(1,:), xscore1_out, 1e-4); 627s assert (yscore(1,:), yscore1_out, 1e-4); 627s ***** error 627s plsregress (1) 627s ***** error plsregress (1, "asd") 627s ***** error plsregress (1, {1,2,3}) 627s ***** error plsregress ("asd", 1) 627s ***** error plsregress ({1,2,3}, 1) 627s ***** error ... 627s plsregress (ones (20,3), ones (15,1)) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 0) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), -5) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3.2) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), [2, 3]) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 4) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 627s ***** error ... 627s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 627s ***** error plsregress (1, 2) 627s 24 tests, 24 passed, 0 known failure, 0 skipped 627s [inst/vartestn.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/vartestn.m 627s ***** demo 627s ## Test the null hypothesis that the variances are equal across the five 627s ## columns of data in the students’ exam grades matrix, grades. 627s 627s load examgrades 627s vartestn (grades) 627s ***** demo 627s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 627s ## equal across different model years. 627s 627s load carsmall 627s vartestn (MPG, Model_Year) 627s ***** demo 627s ## Use Levene’s test to test the null hypothesis that the variances in miles 627s ## per gallon (MPG) are equal across different model years. 627s 627s load carsmall 627s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 627s ***** demo 627s ## Test the null hypothesis that the variances are equal across the five 627s ## columns of data in the students’ exam grades matrix, grades, using the 627s ## Brown-Forsythe test. Suppress the display of the summary table of 627s ## statistics and the box plot. 627s 627s load examgrades 627s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 627s ***** error vartestn (); 627s ***** error vartestn (1); 627s ***** error ... 627s vartestn ([1, 2, 3, 4, 5, 6, 7]); 627s ***** error ... 627s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 627s ***** error ... 627s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 627s ***** error ... 627s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 627s ***** error ... 627s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 627s ***** error ... 627s vartestn (ones (50,3), "Display", "some"); 627s ***** error ... 627s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 627s ***** error ... 627s vartestn (ones (50,3), [], "som"); 627s ***** error ... 627s vartestn (ones (50,3), [], "some", "some"); 627s ***** error ... 627s vartestn (ones (50,3), [1, 2], "Display", "off"); 627s ***** test 627s load examgrades 627s [p, stat] = vartestn (grades, "Display", "off"); 627s assert (p, 7.908647337018238e-08, 1e-14); 627s assert (stat.chisqstat, 38.7332, 1e-4); 627s assert (stat.df, 4); 627s ***** test 627s load examgrades 627s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 627s assert (p, 9.523239714592791e-07, 1e-14); 627s assert (stat.fstat, 8.5953, 1e-4); 627s assert (stat.df, [4, 595]); 627s ***** test 627s load examgrades 627s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 627s assert (p, 7.219514351897161e-07, 1e-14); 627s assert (stat.fstat, 8.7503, 1e-4); 627s assert (stat.df, [4, 595]); 627s ***** test 627s load examgrades 627s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 627s assert (p, 1.312093241723211e-06, 1e-14); 627s assert (stat.fstat, 8.4160, 1e-4); 627s assert (stat.df, [4, 595]); 627s ***** test 627s load examgrades 627s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 627s assert (p, 8.235660885480556e-07, 1e-14); 627s assert (stat.fstat, 8.6766, 1e-4); 627s assert (stat.df, [4, 595]); 627s 17 tests, 17 passed, 0 known failure, 0 skipped 627s [inst/princomp.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/princomp.m 627s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 627s ***** test 627s x=[7 4 3 627s 4 1 8 627s 6 3 5 627s 8 6 1 627s 8 5 7 627s 7 2 9 627s 5 3 3 627s 9 5 8 627s 7 4 5 627s 8 2 2]; 627s R = corrcoef (x); 627s [V, lambda] = eig (R); 627s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 627s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 627s ## contribution of first 2 PCs to each original variable 627s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 627s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 627s F = zscore(x)*B; 627s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 627s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 627s ***** test 627s x=[1,2,3;2,1,3]'; 627s [COEFF,SCORE,latent,tsquare] = princomp(x); 627s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 627s m(:,1) = m(:,1)*sign(COEFF(1,1)); 627s m(:,2) = m(:,2)*sign(COEFF(1,2)); 627s ***** assert(COEFF,m(1:2,:),10*eps); 627s ***** assert(SCORE,-m,10*eps); 627s ***** assert(latent,[1.5;.5],10*eps); 627s ***** assert(tsquare,[4;4;4]/3,10*eps); 627s ***** test 627s x=x'; 627s [COEFF,SCORE,latent,tsquare] = princomp(x); 627s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 627s m(:,1) = m(:,1)*sign(COEFF(1,1)); 627s m(:,2) = m(:,2)*sign(COEFF(1,2)); 627s m(:,3) = m(:,3)*sign(COEFF(3,3)); 627s ***** assert(COEFF,m,10*eps); 627s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 627s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 627s ***** assert(latent,[1;0;0],10*eps); 627s ***** assert(tsquare,[0.5;0.5],10*eps) 627s ***** test 627s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 627s ***** assert(COEFF,m(:, 1),10*eps); 627s ***** assert(SCORE,-m(1:2,1),10*eps); 627s ***** assert(latent,[1],10*eps); 627s ***** assert(tsquare,[0.5;0.5],10*eps) 627s 19 tests, 19 passed, 0 known failure, 0 skipped 627s [inst/ridge.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/ridge.m 627s ***** demo 627s ## Perform ridge regression for a range of ridge parameters and observe 627s ## how the coefficient estimates change based on the acetylene dataset. 627s 627s load acetylene 627s 627s X = [x1, x2, x3]; 627s 627s x1x2 = x1 .* x2; 627s x1x3 = x1 .* x3; 627s x2x3 = x2 .* x3; 627s 627s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 627s 627s k = 0:1e-5:5e-3; 627s 627s b = ridge (y, D, k); 627s 627s figure 627s plot (k, b, "LineWidth", 2) 627s ylim ([-100, 100]) 627s grid on 627s xlabel ("Ridge Parameter") 627s ylabel ("Standardized Coefficient") 627s title ("Ridge Trace") 627s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 627s 627s ***** demo 627s 627s load carbig 627s X = [Acceleration Weight Displacement Horsepower]; 627s y = MPG; 627s 627s n = length(y); 627s 627s rand("seed",1); % For reproducibility 627s 627s c = cvpartition(n,'HoldOut',0.3); 627s idxTrain = training(c,1); 627s idxTest = ~idxTrain; 627s 627s idxTrain = training(c,1); 627s idxTest = ~idxTrain; 627s 627s k = 5; 627s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 627s 627s % Predict MPG values for the test data using the model. 627s yhat = b(1) + X(idxTest,:)*b(2:end); 627s scatter(y(idxTest),yhat) 627s 627s hold on 627s plot(y(idxTest),y(idxTest),"r") 627s xlabel('Actual MPG') 627s ylabel('Predicted MPG') 627s hold off 627s 627s ***** test 627s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 627s assert (b, [0.5533; 0.5533], 1e-4); 627s ***** test 627s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 627s assert (b, [0.4841; 0.4841], 1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0); 627s assert (b,[10.2273;1.97128;-0.601818],1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0.0005); 627s assert (b,[10.2233;1.9712;-0.6056],1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0.001); 627s assert (b,[10.2194;1.9711;-0.6094],1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0.002); 627s assert (b,[10.2116;1.9709;-0.6169],1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0.005); 627s assert (b,[10.1882;1.9704;-0.6393],1e-4); 627s ***** test 627s load acetylene 627s x = [x1, x2, x3]; 627s b = ridge (y, x, 0.01); 627s assert (b,[10.1497;1.9695;-0.6761],1e-4); 627s ***** error ridge (1) 627s ***** error ridge (1, 2) 627s ***** error ridge (ones (3), ones (3), 2) 627s ***** error ridge ([1, 2], ones (2), 2) 627s ***** error ridge ([], ones (3), 2) 627s ***** error ridge (ones (5,1), [], 2) 627s ***** error ... 627s ridge ([1; 2; 3; 4; 5], ones (3), 3) 627s ***** error ... 627s ridge ([1; 2; 3], ones (3), 3, 2) 627s ***** error ... 627s ridge ([1; 2; 3], ones (3), 3, "some") 627s 17 tests, 17 passed, 0 known failure, 0 skipped 627s [inst/cmdscale.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cmdscale.m 627s ***** shared m, n, X, D 627s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 627s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 627s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 627s 2 tests, 2 passed, 0 known failure, 0 skipped 627s [inst/cholcov.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/cholcov.m 627s ***** demo 627s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 627s T = cholcov (C1) 627s C2 = T'*T 627s ***** test 627s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 627s T = cholcov (C1); 627s assert (C1, T'*T, 1e-15 * ones (size (C1))); 627s 1 test, 1 passed, 0 known failure, 0 skipped 627s [inst/anova1.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/anova1.m 627s ***** demo 627s x = meshgrid (1:6); 627s randn ("seed", 15); # for reproducibility 627s x = x + normrnd (0, 1, 6, 6); 627s anova1 (x, [], 'off'); 627s ***** demo 627s x = meshgrid (1:6); 627s randn ("seed", 15); # for reproducibility 627s x = x + normrnd (0, 1, 6, 6); 627s [p, atab] = anova1(x); 627s ***** demo 627s x = ones (50, 4) .* [-2, 0, 1, 5]; 627s randn ("seed", 13); # for reproducibility 627s x = x + normrnd (0, 2, 50, 4); 627s groups = {"A", "B", "C", "D"}; 627s anova1 (x, groups); 627s ***** demo 627s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 627s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 627s anova1 (y(:), g(:), "on", "unequal"); 627s ***** test 627s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 627s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 627s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 627s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 627s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 627s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 627s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 627s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 627s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 627s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 627s group = [1:10] .* ones (10,10); 627s group = group(:); 627s [p, tbl] = anova1 (data, group, "off"); 627s assert (p, 0.022661, 1e-6); 627s assert (tbl{2,5}, 2.2969, 1e-4); 627s assert (tbl{2,3}, 9, 0); 627s assert (tbl{4,2}, 0.003903, 1e-6); 627s data = reshape (data, 10, 10); 627s [p, tbl, stats] = anova1 (data, [], "off"); 627s assert (p, 0.022661, 1e-6); 627s assert (tbl{2,5}, 2.2969, 1e-4); 627s assert (tbl{2,3}, 9, 0); 627s assert (tbl{4,2}, 0.003903, 1e-6); 627s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 627s N = 10 * ones (1, 10); 627s assert (stats.means, means, 1e-6); 627s assert (length (stats.gnames), 10, 0); 627s assert (stats.n, N, 0); 627s ***** test 627s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 627s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 627s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 627s assert (p, 0.00004163, 1e-6); 627s assert (tbl{2,5}, 22.573418, 1e-6); 627s assert (tbl{2,3}, 2, 0); 627s assert (tbl{3,3}, 14, 0); 627s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 627s assert (p, 0.00208877, 1e-8); 627s assert (tbl{2,5}, 15.523192, 1e-6); 627s assert (tbl{2,3}, 2, 0); 627s assert (tbl{2,4}, 7.5786897, 1e-6); 627s 2 tests, 2 passed, 0 known failure, 0 skipped 627s [inst/sigma_pts.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/sigma_pts.m 627s ***** demo 627s K = [1 0.5; 0.5 1]; # covaraince matrix 627s # calculate and build associated ellipse 627s [R,S,~] = svd (K); 627s theta = atan2 (R(2,1), R(1,1)); 627s v = sqrt (diag (S)); 627s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 627s t = linspace (0, 2*pi, 100).'; 627s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 627s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 627s 627s figure(1); clf; hold on 627s # Plot ellipse and axes 627s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 627s plot (xe,ye,'-r'); 627s 627s col = 'rgb'; 627s l = [-1.8 -1 1.5]; 627s for li = 1:3 627s p = sigma_pts (2, [], K, l(li)); 627s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 627s p(1,1), p(1,2), ['o' col(li)]); 627s h(li) = tmp(1); 627s endfor 627s hold off 627s axis image 627s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 627s ***** test 627s p = sigma_pts (5); 627s assert (mean (p), zeros(1,5), sqrt(eps)); 627s assert (cov (p), eye(5), sqrt(eps)); 627s ***** test 627s m = randn(1, 5); 627s p = sigma_pts (5, m); 627s assert (mean (p), m, sqrt(eps)); 627s assert (cov (p), eye(5), sqrt(eps)); 627s ***** test 627s x = linspace (0,1,5); 627s K = exp (- (x.' - x).^2/ 0.5); 627s p = sigma_pts (5, [], K); 627s assert (mean (p), zeros(1,5), sqrt(eps)); 627s assert (cov (p), K, sqrt(eps)); 627s ***** error sigma_pts(2,1); 627s ***** error sigma_pts(2,[],1); 627s ***** error sigma_pts(2,1,1); 627s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 627s 7 tests, 7 passed, 0 known failure, 0 skipped 627s [inst/violin.m] 627s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/violin.m 627s ***** demo 627s clf 627s x = zeros (9e2, 10); 627s for i=1:10 627s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 627s endfor 627s h = violin (x, "color", "c"); 627s axis tight 627s set (h.violin, "linewidth", 2); 627s set (gca, "xgrid", "on"); 627s xlabel ("Variables") 627s ylabel ("Values") 627s ***** demo 627s clf 627s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 627s subplot (1,2,1) 627s title ("Grade 3 heights - vertical"); 627s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 627s violin (data, "Nbins", 10); 627s axis tight 627s 627s subplot(1,2,2) 627s title ("Grade 3 heights - horizontal"); 627s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 627s violin (data, "horizontal", "Nbins", 10); 627s axis tight 627s ***** demo 627s clf 627s data = exprnd (0.1, 500,4); 627s violin (data, "nbins", {5,10,50,100}); 627s axis ([0 5 0 max(data(:))]) 627s ***** demo 627s clf 627s data = exprnd (0.1, 500,4); 627s violin (data, "color", jet(4)); 627s axis ([0 5 0 max(data(:))]) 627s ***** demo 627s clf 627s data = repmat(exprnd (0.1, 500,1), 1, 4); 627s violin (data, "width", linspace (0.1,0.5,4)); 627s axis ([0 5 0 max(data(:))]) 627s ***** demo 627s clf 627s data = repmat(exprnd (0.1, 500,1), 1, 4); 627s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 627s axis ([0 5 0 max(data(:))]) 627s ***** test 627s hf = figure ("visible", "off"); 627s unwind_protect 627s data = exprnd (0.1, 500,4); 627s violin (data, "color", jet(4)); 627s axis ([0 5 0 max(data(:))]) 627s unwind_protect_cleanup 627s close (hf); 627s end_unwind_protect 628s ***** test 628s hf = figure ("visible", "off"); 628s unwind_protect 628s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 628s subplot (1,2,1) 628s title ("Grade 3 heights - vertical"); 628s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 628s violin (data, "Nbins", 10); 628s axis tight 628s unwind_protect_cleanup 628s close (hf); 628s end_unwind_protect 628s ***** test 628s hf = figure ("visible", "off"); 628s unwind_protect 628s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 628s subplot (1,2,1) 628s title ("Grade 3 heights - vertical"); 628s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 628s violin (data, "Nbins", 10); 628s axis tight 628s subplot(1,2,2) 628s title ("Grade 3 heights - horizontal"); 628s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 628s violin (data, "horizontal", "Nbins", 10); 628s axis tight 628s unwind_protect_cleanup 628s close (hf); 628s end_unwind_protect 628s ***** test 628s hf = figure ("visible", "off"); 628s unwind_protect 628s data = repmat(exprnd (0.1, 500,1), 1, 4); 628s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 628s axis ([0 5 0 max(data(:))]) 628s unwind_protect_cleanup 628s close (hf); 628s end_unwind_protect 628s ***** test 628s hf = figure ("visible", "off"); 628s unwind_protect 628s data = repmat(exprnd (0.1, 500,1), 1, 4); 628s violin (data, "width", linspace (0.1,0.5,4)); 628s axis ([0 5 0 max(data(:))]) 628s unwind_protect_cleanup 628s close (hf); 628s end_unwind_protect 629s 5 tests, 5 passed, 0 known failure, 0 skipped 629s [inst/chi2test.m] 629s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/chi2test.m 629s ***** error chi2test (); 629s ***** error chi2test ([1, 2, 3, 4, 5]); 629s ***** error chi2test ([1, 2; 2, 1+3i]); 629s ***** error chi2test ([NaN, 6; 34, 12]); 629s ***** error ... 629s p = chi2test (ones (3, 3), "mutual", []); 629s ***** error ... 629s p = chi2test (ones (3, 3, 3), "testtype", 2); 629s ***** error ... 629s p = chi2test (ones (3, 3, 3), "mutual"); 629s ***** error ... 629s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 629s ***** error ... 629s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 629s ***** error ... 629s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 629s ***** warning p = chi2test (ones (2)); 629s ***** warning p = chi2test (ones (3, 2)); 629s ***** warning p = chi2test (0.4 * ones (3)); 629s ***** test 629s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 629s p = chi2test (x); 629s assert (p, 0.017787, 1e-6); 629s ***** test 629s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 629s [p, chisq] = chi2test (x); 629s assert (chisq, 11.9421, 1e-4); 629s ***** test 629s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 629s [p, chisq, df] = chi2test (x); 629s assert (df, 4); 629s ***** test 629s ***** shared x 629s x(:,:,1) = [59, 32; 9,16]; 629s x(:,:,2) = [55, 24;12,33]; 629s x(:,:,3) = [107,80;17,56];%! 629s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 629s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 629s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 629s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 629s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 629s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 629s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 629s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 629s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 629s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 629s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 629s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 629s ***** test 629s [pval, chisq, df, E] = chi2test (x); 629s assert (chisq, 64.0982, 1e-4); 629s assert (df, 7); 629s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 629s ***** test 629s [pval, chisq, df, E] = chi2test (x, "joint", 2); 629s assert (chisq, 56.0943, 1e-4); 629s assert (df, 5); 629s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 629s ***** test 629s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 629s assert (chisq, 146.6058, 1e-4); 629s assert (df, 9); 629s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 629s ***** test 629s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 629s assert (chisq, 52.2509, 1e-4); 629s assert (df, 3); 629s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 629s ***** test 629s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 629s assert (chisq, 1.6034, 1e-4); 629s assert (df, 2); 629s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 629s 34 tests, 34 passed, 0 known failure, 0 skipped 629s [inst/correlation_test.m] 629s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/correlation_test.m 629s ***** error correlation_test (); 629s ***** error correlation_test (1); 629s ***** error ... 629s correlation_test ([1 2 NaN]', [2 3 4]'); 629s ***** error ... 629s correlation_test ([1 2 Inf]', [2 3 4]'); 629s ***** error ... 629s correlation_test ([1 2 3+i]', [2 3 4]'); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 NaN]'); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 Inf]'); 629s ***** error ... 629s correlation_test ([1 2 3]', [3 4 3+i]'); 629s ***** error ... 629s correlation_test ([1 2 3]', [3 4 4 5]'); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 629s ***** error ... 629s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 629s ***** test 629s x = [6 7 7 9 10 12 13 14 15 17]; 629s y = [19 22 27 25 30 28 30 29 25 32]; 629s [h, pval, stats] = correlation_test (x, y); 629s assert (stats.corrcoef, corr (x', y'), 1e-14); 629s assert (pval, 0.0223, 1e-4); 629s ***** test 629s x = [6 7 7 9 10 12 13 14 15 17]'; 629s y = [19 22 27 25 30 28 30 29 25 32]'; 629s [h, pval, stats] = correlation_test (x, y); 629s assert (stats.corrcoef, corr (x, y), 1e-14); 629s assert (pval, 0.0223, 1e-4); 629s 20 tests, 20 passed, 0 known failure, 0 skipped 629s [inst/normalise_distribution.m] 629s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/normalise_distribution.m 629s ***** test 629s v = normalise_distribution ([1 2 3], [], 1); 629s assert (v, [0 0 0]) 629s ***** test 629s v = normalise_distribution ([1 2 3], [], 2); 629s assert (v, norminv ([1 3 5] / 6), 3 * eps) 629s ***** test 629s v = normalise_distribution ([1 2 3]', [], 2); 629s assert (v, [0 0 0]') 629s ***** test 629s v = normalise_distribution ([1 2 3]', [], 1); 629s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 629s ***** test 629s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 629s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 629s ***** test 629s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 629s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 629s ***** test 629s A = randn ( 10 ); 629s N = normalise_distribution (A, @normcdf); 629s assert (A, N, 10000 * eps) 629s ***** test 629s A = exprnd (1, 100); 629s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 629s assert (mean (vec (N)), 0, 0.1) 629s assert (std (vec (N)), 1, 0.1) 629s ***** test 629s A = rand (1000,1); 629s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 629s assert (mean (vec (N)), 0, 0.2) 629s assert (std (vec (N)), 1, 0.1) 629s ***** test 629s A = [rand(1000,1), randn(1000, 1)]; 629s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 629s assert (mean (N), [0, 0], 0.2) 629s assert (std (N), [1, 1], 0.1) 629s ***** test 629s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 629s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 629s assert (mean (N, 2), [0, 0, 0]', 0.2); 629s assert (std (N, [], 2), [1, 1, 1]', 0.1); 629s ***** xtest 629s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 629s N = normalise_distribution (A); 629s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 629s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 629s ***** test 629s ***** error normalise_distribution (zeros (3, 4), ... 629s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 629s 14 tests, 14 passed, 0 known failure, 0 skipped 629s [inst/kstest.m] 629s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/kstest.m 629s ***** demo 629s ## Use the stock return data set to test the null hypothesis that the data 629s ## come from a standard normal distribution against the alternative 629s ## hypothesis that the population CDF of the data is larger that the 629s ## standard normal CDF. 629s 629s load stockreturns; 629s x = stocks(:,2); 629s [h, p, k, c] = kstest (x, "Tail", "larger") 629s 629s ## Compute the empirical CDF and plot against the standard normal CDF 629s [f, x_values] = ecdf (x); 629s h1 = plot (x_values, f); 629s hold on; 629s h2 = plot (x_values, normcdf (x_values), 'r--'); 629s set (h1, "LineWidth", 2); 629s set (h2, "LineWidth", 2); 629s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 629s "Location", "southeast"); 629s title ("Empirical CDF of stock return data against standard normal CDF") 629s ***** error kstest () 629s ***** error kstest (ones (2, 4)) 629s ***** error kstest ([2, 3, 5, 3+3i]) 629s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "tail") 629s ***** error ... 629s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "tail", 0) 629s ***** error ... 629s kstest ([2,3,4,5,6], "tail", "whatever") 629s ***** error ... 629s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 629s ***** error ... 629s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 629s ***** error ... 629s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5)) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 629s ***** error ... 629s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 629s ***** test 629s load examgrades 629s [h, p] = kstest (grades(:,1)); 629s assert (h, true); 629s assert (p, 7.58603305206105e-107, 1e-14); 629s ***** test 629s load examgrades 629s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 629s assert (h, false); 629s assert (p, 0.5612, 1e-4); 629s ***** test 629s load examgrades 629s x = grades(:,1); 629s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 629s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 629s assert (h, true); 629s assert (p, 0.0021, 1e-4); 630s ***** test 630s load stockreturns 630s x = stocks(:,3); 630s [h,p,k,c] = kstest (x, "Tail", "larger"); 630s assert (h, true); 630s assert (p, 5.085438806199252e-05, 1e-14); 630s assert (k, 0.2197, 1e-4); 630s assert (c, 0.1207, 1e-4); 630s 21 tests, 21 passed, 0 known failure, 0 skipped 630s [inst/x2fx.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/x2fx.m 630s ***** test 630s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 630s D = x2fx(X,'quadratic'); 630s assert (D(1,:) , [1, 1, 10, 10, 1, 100]); 630s assert (D(2,:) , [1, 2, 20, 40, 4, 400]); 630s ***** test 630s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 630s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 630s D = x2fx(X,model); 630s assert (D(1,:) , [1, 1, 10, 10, 1]); 630s assert (D(2,:) , [1, 2, 20, 40, 4]); 630s assert (D(4,:) , [1, 4, 20, 80, 16]); 630s ***** error x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 630s ***** error x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 630s ***** error x2fx ([1, 10; 2, 20; 3, 10], "whatever"); 630s 5 tests, 5 passed, 0 known failure, 0 skipped 630s [inst/harmmean.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/harmmean.m 630s ***** test 630s x = [0:10]; 630s y = [x;x+5;x+10]; 630s assert (harmmean (x), 0); 630s m = [0 8.907635160795225 14.30854471766802]; 630s assert (harmmean (y, 2), m', 4e-14); 630s assert (harmmean (y, "all"), 0); 630s y(2,4) = NaN; 630s m(2) = 9.009855936313949; 630s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 630s assert (harmmean (y', "omitnan"), m, 4e-14); 630s z = y + 20; 630s assert (harmmean (z, "all"), NaN); 630s assert (harmmean (z, "all", "includenan"), NaN); 630s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 630s m = [24.59488458841874 NaN 34.71244385944397]; 630s assert (harmmean (z'), m, 4e-14); 630s assert (harmmean (z', "includenan"), m, 4e-14); 630s m(2) = 29.84104075528277; 630s assert (harmmean (z', "omitnan"), m, 4e-14); 630s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 630s ***** test 630s x = repmat ([1:20;6:25], [5 2 6 3]); 630s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 630s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 630s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 630s assert (size (harmmean (x, [1 4 3])), [1 40]); 630s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 630s ***** test 630s x = repmat ([1:20;6:25], [5 2 6 3]); 630s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 630s assert (harmmean (x, [3 2]), m, 4e-14); 630s x(2,5,6,3) = NaN; 630s m(2,3) = NaN; 630s assert (harmmean (x, [3 2]), m, 4e-14); 630s m(2,3) = 13.06617961315406; 630s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 630s ***** error harmmean ("char") 630s ***** error harmmean ([1 -1 3]) 630s ***** error ... 630s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 630s ***** error ... 630s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 630s ***** error ... 630s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 630s 8 tests, 8 passed, 0 known failure, 0 skipped 630s [inst/multcompare.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/multcompare.m 630s ***** demo 630s 630s ## Demonstration using balanced one-way ANOVA from anova1 630s 630s x = ones (50, 4) .* [-2, 0, 1, 5]; 630s randn ("seed", 1); # for reproducibility 630s x = x + normrnd (0, 2, 50, 4); 630s groups = {"A", "B", "C", "D"}; 630s [p, tbl, stats] = anova1 (x, groups, "off"); 630s multcompare (stats); 630s ***** demo 630s 630s ## Demonstration using unbalanced one-way ANOVA example from anovan 630s 630s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 630s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 630s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 630s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 630s 25.694 ]'; 630s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 630s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 630s 630s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 630s "ControlGroup", 1, "display", "on") 630s 630s ***** demo 630s 630s ## Demonstration using factorial ANCOVA example from anovan 630s 630s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 630s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 630s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 630s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 630s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 630s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 630s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 630s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 630s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 630s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 630s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 630s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 630s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 630s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 630s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 630s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 630s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 630s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 630s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 630s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 630s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 630s 630s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 630s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 630s "sstype", "h", "display", "off", "contrasts", ... 630s {"simple","poly",""}); 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 630s "display", "on") 630s 630s ***** demo 630s 630s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 630s ## squares to account for heteroskedasticity. 630s 630s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 630s 2, 2, 2, 2, 2, 2, 2, 2, ... 630s 3, 3, 3, 3, 3, 3, 3, 3]'; 630s 630s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 630s 10, 25, 66, 43, 47, 56, 6, 39, ... 630s 11, 39, 26, 35, 25, 14, 24, 17]'; 630s 630s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 630s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 630s b = polyfit (fitted, abs (STATS.resid), 1); 630s v = polyval (b, fitted); # Variance as a function of the fitted values 630s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 630s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 630s ***** demo 630s 630s ## Demonstration of p-value adjustments to control the false discovery rate 630s ## Data from Westfall (1997) JASA. 92(437):299-306 630s 630s p = [.005708; .023544; .024193; .044895; ... 630s .048805; .221227; .395867; .693051; .775755]; 630s 630s padj = multcompare(p,'ctype','fdr') 630s ***** test 630s 630s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 630s 630s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 630s 630s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 630s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 630s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 630s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 630s 25.694 ]'; 630s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 630s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 630s 630s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 630s "display", "off"); 630s assert (C(1,6), 2.85812420217898e-05, 1e-09); 630s assert (C(2,6), 5.22936741204085e-07, 1e-09); 630s assert (C(3,6), 2.12794763209146e-08, 1e-09); 630s assert (C(4,6), 7.82091664406946e-15, 1e-09); 630s assert (C(5,6), 0.546591417210693, 1e-09); 630s assert (C(6,6), 0.0845897945254446, 1e-09); 630s assert (C(7,6), 9.47436557975328e-08, 1e-09); 630s assert (C(8,6), 0.188873478781067, 1e-09); 630s assert (C(9,6), 4.08974010364197e-08, 1e-09); 630s assert (C(10,6), 4.44427348175241e-06, 1e-09); 630s assert (M(1,1), 10, 1e-09); 630s assert (M(2,1), 18, 1e-09); 630s assert (M(3,1), 19, 1e-09); 630s assert (M(4,1), 21.0001428571429, 1e-09); 630s assert (M(5,1), 29.0001111111111, 1e-09); 630s assert (M(1,2), 1.0177537954095, 1e-09); 630s assert (M(2,2), 1.28736803631001, 1e-09); 630s assert (M(3,2), 1.0177537954095, 1e-09); 630s assert (M(4,2), 1.0880245732889, 1e-09); 630s assert (M(5,2), 0.959547480416536, 1e-09); 630s 630s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 630s "display", "off"); 630s assert (C(1,6), 4.08303457454140e-05, 1e-09); 630s assert (C(2,6), 1.04587348240817e-06, 1e-09); 630s assert (C(3,6), 1.06397381604573e-07, 1e-09); 630s assert (C(4,6), 7.82091664406946e-14, 1e-09); 630s assert (C(5,6), 5.46591417210693e-01, 1e-09); 630s assert (C(6,6), 1.05737243156806e-01, 1e-09); 630s assert (C(7,6), 2.36859139493832e-07, 1e-09); 630s assert (C(8,6), 2.09859420867852e-01, 1e-09); 630s assert (C(9,6), 1.36324670121399e-07, 1e-09); 630s assert (C(10,6), 7.40712246958735e-06, 1e-09); 630s 630s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 630s "display", "off"); 630s assert (C(1,6), 1.14324968087159e-04, 1e-09); 630s assert (C(2,6), 3.13762044722451e-06, 1e-09); 630s assert (C(3,6), 1.91515286888231e-07, 1e-09); 630s assert (C(4,6), 7.82091664406946e-14, 1e-09); 630s assert (C(5,6), 5.46591417210693e-01, 1e-09); 630s assert (C(6,6), 2.53769383576334e-01, 1e-09); 630s assert (C(7,6), 6.63205590582730e-07, 1e-09); 630s assert (C(8,6), 3.77746957562134e-01, 1e-09); 630s assert (C(9,6), 3.27179208291358e-07, 1e-09); 630s assert (C(10,6), 2.22213674087620e-05, 1e-09); 630s 630s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 630s "display", "off"); 630s assert (C(1,6), 1.14324968087159e-04, 1e-09); 630s assert (C(2,6), 3.13762044722451e-06, 1e-09); 630s assert (C(3,6), 1.91515286888231e-07, 1e-09); 630s assert (C(4,6), 7.82091664406946e-14, 1e-09); 630s assert (C(5,6), 5.46591417210693e-01, 1e-09); 630s assert (C(6,6), 2.53769383576334e-01, 1e-09); 630s assert (C(7,6), 6.63205590582730e-07, 1e-09); 630s assert (C(8,6), 3.77746957562134e-01, 1e-09); 630s assert (C(9,6), 3.27179208291358e-07, 1e-09); 630s assert (C(10,6), 2.22213674087620e-05, 1e-09); 630s 630s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 630s "display", "off"); 630s assert (C(1,6), 0.00108105386141085, 1e-09); 630s assert (C(2,6), 2.7779386789517e-05, 1e-09); 630s assert (C(3,6), 1.3599854038198e-06, 1e-09); 630s assert (C(4,6), 7.58830197867751e-13, 1e-09); 630s assert (C(5,6), 0.984039948220281, 1e-09); 630s assert (C(6,6), 0.539077018557706, 1e-09); 630s assert (C(7,6), 5.59475764460574e-06, 1e-09); 630s assert (C(8,6), 0.771173490574105, 1e-09); 630s assert (C(9,6), 2.52838425729905e-06, 1e-09); 630s assert (C(10,6), 0.000200719143889168, 1e-09); 630s 630s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 630s 630s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 630s "display", "off"); 630s assert (C(1,6), 2.85812420217898e-04, 1e-09); 630s assert (C(2,6), 5.22936741204085e-06, 1e-09); 630s assert (C(3,6), 2.12794763209146e-07, 1e-09); 630s assert (C(4,6), 7.82091664406946e-14, 1e-09); 630s assert (C(5,6), 1.00000000000000e+00, 1e-09); 630s assert (C(6,6), 8.45897945254446e-01, 1e-09); 630s assert (C(7,6), 9.47436557975328e-07, 1e-09); 630s assert (C(8,6), 1.00000000000000e+00, 1e-09); 630s assert (C(9,6), 4.08974010364197e-07, 1e-09); 630s assert (C(10,6), 4.44427348175241e-05, 1e-09); 630s 630s ## Test for anova1 ("equal")- comparison of results from Matlab 630s 630s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 630s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 2.85812420217898e-05, 1e-09); 630s assert (C(2,6), 5.22936741204085e-07, 1e-09); 630s assert (C(3,6), 2.12794763209146e-08, 1e-09); 630s assert (C(4,6), 7.82091664406946e-15, 1e-09); 630s assert (C(5,6), 0.546591417210693, 1e-09); 630s assert (C(6,6), 0.0845897945254446, 1e-09); 630s assert (C(7,6), 9.47436557975328e-08, 1e-09); 630s assert (C(8,6), 0.188873478781067, 1e-09); 630s assert (C(9,6), 4.08974010364197e-08, 1e-09); 630s assert (C(10,6), 4.44427348175241e-06, 1e-09); 630s assert (M(1,1), 10, 1e-09); 630s assert (M(2,1), 18, 1e-09); 630s assert (M(3,1), 19, 1e-09); 630s assert (M(4,1), 21.0001428571429, 1e-09); 630s assert (M(5,1), 29.0001111111111, 1e-09); 630s assert (M(1,2), 1.0177537954095, 1e-09); 630s assert (M(2,2), 1.28736803631001, 1e-09); 630s assert (M(3,2), 1.0177537954095, 1e-09); 630s assert (M(4,2), 1.0880245732889, 1e-09); 630s assert (M(5,2), 0.959547480416536, 1e-09); 630s 630s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 630s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 630s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 0.001247025266382, 1e-09); 630s assert (C(2,6), 0.000018037115146, 1e-09); 630s assert (C(3,6), 0.000002974595187, 1e-09); 630s assert (C(4,6), 0.000000000786046, 1e-09); 630s assert (C(5,6), 0.5693192886650109, 1e-09); 630s assert (C(6,6), 0.110501699029776, 1e-09); 630s assert (C(7,6), 0.000131226488700, 1e-09); 630s assert (C(8,6), 0.1912101409715992, 1e-09); 630s assert (C(9,6), 0.000005385256394, 1e-09); 630s assert (C(10,6), 0.000074089106171, 1e-09); 630s ***** test 630s 630s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 630s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 630s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 630s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 630s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 630s "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 1.49311100811177e-05, 1e-09); 630s assert (C(2,6), 2.20506904243535e-07, 1e-09); 630s assert (C(3,6), 0.00449897860490058, 1e-09); 630s assert (M(1,1), 6.25, 1e-09); 630s assert (M(2,1), 4.75, 1e-09); 630s assert (M(3,1), 4, 1e-09); 630s assert (M(1,2), 0.152145154862547, 1e-09); 630s assert (M(2,2), 0.152145154862547, 1e-09); 630s assert (M(3,2), 0.152145154862547, 1e-09); 630s ***** test 630s 630s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 630s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 630s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 630s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 630s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 630s "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 0.000020799832702, 1e-09); 630s assert (C(2,6), 0.000000035812410, 1e-09); 630s assert (C(3,6), 0.003038942449215, 1e-09); 630s ***** test 630s 630s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 630s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 630s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 630s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 630s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 630s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 630s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 630s "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 0.261031111511073, 1e-09); 630s assert (C(2,6), 0.065879755907745, 1e-09); 630s assert (C(3,6), 0.241874613529270, 1e-09); 630s ***** shared visibility_setting 630s visibility_setting = get (0, "DefaultFigureVisible"); 630s ***** test 630s set (0, "DefaultFigureVisible", "off"); 630s 630s ## Test for kruskalwallis - comparison with results from MATLAB 630s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 630s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 630s group = [1:3] .* ones (10,3); 630s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 630s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 0.000163089828959986, 1e-09); 630s assert (C(2,6), 0.630298044801257, 1e-09); 630s assert (C(3,6), 0.00100567660695682, 1e-09); 630s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 630s assert (C(1,6), 0.000489269486879958, 1e-09); 630s assert (C(2,6), 1, 1e-09); 630s assert (C(3,6), 0.00301702982087047, 1e-09); 630s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 630s assert (C(1,6), 0.000819054880289573, 1e-09); 630s assert (C(2,6), 0.890628039849261, 1e-09); 630s assert (C(3,6), 0.00447816059021654, 1e-09); 630s set (0, "DefaultFigureVisible", visibility_setting); 630s ***** test 630s set (0, "DefaultFigureVisible", "off"); 630s ## Test for friedman - comparison with results from MATLAB 630s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 630s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 630s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 630s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 0.227424558028569, 1e-09); 630s assert (C(2,6), 0.0327204848315735, 1e-09); 630s assert (C(3,6), 0.353160353315988, 1e-09); 630s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 630s assert (C(1,6), 0.682273674085708, 1e-09); 630s assert (C(2,6), 0.0981614544947206, 1e-09); 630s assert (C(3,6), 1, 1e-09); 630s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 630s assert (C(1,6), 0.482657360384373, 1e-09); 630s assert (C(2,6), 0.102266573027672, 1e-09); 630s assert (C(3,6), 0.649836502233148, 1e-09); 630s set (0, "DefaultFigureVisible", visibility_setting); 630s ***** test 630s set (0, "DefaultFigureVisible", "off"); 630s ## Test for fitlm - same comparisons as for first anovan example 630s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 630s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 630s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 630s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 630s 25.694 ]'; 630s 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]'; 630s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 630s "contrasts","simple"); 630s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 630s assert (C(1,6), 2.85812420217898e-05, 1e-09); 630s assert (C(2,6), 5.22936741204085e-07, 1e-09); 630s assert (C(3,6), 2.12794763209146e-08, 1e-09); 630s assert (C(4,6), 7.82091664406946e-15, 1e-09); 630s assert (C(5,6), 0.546591417210693, 1e-09); 630s assert (C(6,6), 0.0845897945254446, 1e-09); 630s assert (C(7,6), 9.47436557975328e-08, 1e-09); 630s assert (C(8,6), 0.188873478781067, 1e-09); 630s assert (C(9,6), 4.08974010364197e-08, 1e-09); 630s assert (C(10,6), 4.44427348175241e-06, 1e-09); 630s assert (M(1,1), 10, 1e-09); 630s assert (M(2,1), 18, 1e-09); 630s assert (M(3,1), 19, 1e-09); 630s assert (M(4,1), 21.0001428571429, 1e-09); 630s assert (M(5,1), 29.0001111111111, 1e-09); 630s assert (M(1,2), 1.0177537954095, 1e-09); 630s assert (M(2,2), 1.28736803631001, 1e-09); 630s assert (M(3,2), 1.0177537954095, 1e-09); 630s assert (M(4,2), 1.0880245732889, 1e-09); 630s assert (M(5,2), 0.959547480416536, 1e-09); 630s set (0, "DefaultFigureVisible", visibility_setting); 630s ***** test 630s ## Test p-value adjustments compared to R stats package function p.adjust 630s ## Data from Westfall (1997) JASA. 92(437):299-306 630s p = [.005708; .023544; .024193; .044895; ... 630s .048805; .221227; .395867; .693051; .775755]; 630s padj = multcompare (p); 630s assert (padj(1), 0.051372, 1e-06); 630s assert (padj(2), 0.188352, 1e-06); 630s assert (padj(3), 0.188352, 1e-06); 630s assert (padj(4), 0.269370, 1e-06); 630s assert (padj(5), 0.269370, 1e-06); 630s assert (padj(6), 0.884908, 1e-06); 630s assert (padj(7), 1.000000, 1e-06); 630s assert (padj(8), 1.000000, 1e-06); 630s assert (padj(9), 1.000000, 1e-06); 630s padj = multcompare(p,'ctype','holm'); 630s assert (padj(1), 0.051372, 1e-06); 630s assert (padj(2), 0.188352, 1e-06); 630s assert (padj(3), 0.188352, 1e-06); 630s assert (padj(4), 0.269370, 1e-06); 630s assert (padj(5), 0.269370, 1e-06); 630s assert (padj(6), 0.884908, 1e-06); 630s assert (padj(7), 1.000000, 1e-06); 630s assert (padj(8), 1.000000, 1e-06); 630s assert (padj(9), 1.000000, 1e-06); 630s padj = multcompare(p,'ctype','hochberg'); 630s assert (padj(1), 0.051372, 1e-06); 630s assert (padj(2), 0.169351, 1e-06); 630s assert (padj(3), 0.169351, 1e-06); 630s assert (padj(4), 0.244025, 1e-06); 630s assert (padj(5), 0.244025, 1e-06); 630s assert (padj(6), 0.775755, 1e-06); 630s assert (padj(7), 0.775755, 1e-06); 630s assert (padj(8), 0.775755, 1e-06); 630s assert (padj(9), 0.775755, 1e-06); 630s padj = multcompare(p,'ctype','fdr'); 630s assert (padj(1), 0.0513720, 1e-07); 630s assert (padj(2), 0.0725790, 1e-07); 630s assert (padj(3), 0.0725790, 1e-07); 630s assert (padj(4), 0.0878490, 1e-07); 630s assert (padj(5), 0.0878490, 1e-07); 630s assert (padj(6), 0.3318405, 1e-07); 630s assert (padj(7), 0.5089719, 1e-07); 630s assert (padj(8), 0.7757550, 1e-07); 630s assert (padj(9), 0.7757550, 1e-07); 630s 8 tests, 8 passed, 0 known failure, 0 skipped 630s [inst/nansum.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/nansum.m 630s ***** assert (nansum ([2 4 NaN 7]), 13) 630s ***** assert (nansum ([2 4 NaN Inf]), Inf) 630s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 630s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 630s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN])), single ([8 13 9])) 630s ***** assert (nansum (single ([1 NaN 3; NaN 5 6; 7 8 NaN]), "double"), [8 13 9]) 630s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 630s ***** assert (nansum (uint8 ([2 4 1 7]), "native"), uint8 (14)) 630s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 630s 9 tests, 9 passed, 0 known failure, 0 skipped 630s [inst/evalclusters.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/evalclusters.m 630s ***** demo 630s load fisheriris; 630s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 630s plot (eva) 630s ***** error evalclusters () 630s ***** error evalclusters ([1 1;0 1]) 630s ***** error evalclusters ([1 1;0 1], "kmeans") 630s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 630s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 630s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 630s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 630s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 630s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 630s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 630s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 630s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 630s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 630s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 630s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 630s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 630s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 630s "distance", "a") 630s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 630s "distance", "a") 630s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 630s "clusterpriors", "equal") 630s ***** error evalclusters ([1 1;0 1], [1; 2], ... 630s "silhouette", "clusterpriors", "xxx") 630s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 630s ***** test 630s load fisheriris; 630s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 630s assert (isa (eva, "CalinskiHarabaszEvaluation")); 630s assert (eva.NumObservations, 150); 630s assert (eva.OptimalK, 3); 630s assert (eva.InspectedK, [1 2 3 4 5 6]); 630s 22 tests, 22 passed, 0 known failure, 0 skipped 630s [inst/regress.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/regress.m 630s ***** test 630s % Longley data from the NIST Statistical Reference Dataset 630s Z = [ 60323 83.0 234289 2356 1590 107608 1947 630s 61122 88.5 259426 2325 1456 108632 1948 630s 60171 88.2 258054 3682 1616 109773 1949 630s 61187 89.5 284599 3351 1650 110929 1950 630s 63221 96.2 328975 2099 3099 112075 1951 630s 63639 98.1 346999 1932 3594 113270 1952 630s 64989 99.0 365385 1870 3547 115094 1953 630s 63761 100.0 363112 3578 3350 116219 1954 630s 66019 101.2 397469 2904 3048 117388 1955 630s 67857 104.6 419180 2822 2857 118734 1956 630s 68169 108.4 442769 2936 2798 120445 1957 630s 66513 110.8 444546 4681 2637 121950 1958 630s 68655 112.6 482704 3813 2552 123366 1959 630s 69564 114.2 502601 3931 2514 125368 1960 630s 69331 115.7 518173 4806 2572 127852 1961 630s 70551 116.9 554894 4007 2827 130081 1962 ]; 630s % Results certified by NIST using 500 digit arithmetic 630s % b and standard error in b 630s V = [ -3482258.63459582 890420.383607373 630s 15.0618722713733 84.9149257747669 630s -0.358191792925910E-01 0.334910077722432E-01 630s -2.02022980381683 0.488399681651699 630s -1.03322686717359 0.214274163161675 630s -0.511041056535807E-01 0.226073200069370 630s 1829.15146461355 455.478499142212 ]; 630s Rsq = 0.995479004577296; 630s F = 330.285339234588; 630s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 630s alpha = 0.05; 630s [b, bint, r, rint, stats] = regress (y, X, alpha); 630s assert(b,V(:,1),4e-6); 630s assert(stats(1),Rsq,1e-12); 630s assert(stats(2),F,3e-8); 630s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 630s warning: matrix singular to machine precision, rcond = 3.50566e-20 630s warning: called from 630s regress at line 131 column 7 630s __test__ at line 33 column 28 630s test at line 682 column 11 630s /tmp/tmp.gzRsVyCRjZ at line 2118 column 31 630s 630s 1 test, 1 passed, 0 known failure, 0 skipped 630s [inst/hist3.m] 630s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/hist3.m 630s ***** demo 630s X = [ 630s 1 1 630s 1 1 630s 1 10 630s 1 10 630s 5 5 630s 5 5 630s 5 5 630s 5 5 630s 5 5 630s 7 3 630s 7 3 630s 7 3 630s 10 10 630s 10 10]; 630s hist3 (X) 630s ***** test 630s N_exp = [ 0 0 0 5 20 630s 0 0 10 15 0 630s 0 15 10 0 0 630s 20 5 0 0 0]; 630s 630s n = 100; 630s x = [1:n]'; 630s y = [n:-1:1]'; 630s D = [x y]; 630s N = hist3 (D, [4 5]); 630s assert (N, N_exp); 630s ***** test 630s N_exp = [0 0 0 0 1 630s 0 0 0 0 1 630s 0 0 0 0 1 630s 1 1 1 1 93]; 630s 630s n = 100; 630s x = [1:n]'; 630s y = [n:-1:1]'; 630s D = [x y]; 630s C{1} = [1 1.7 3 4]; 630s C{2} = [1:5]; 630s N = hist3 (D, C); 630s assert (N, N_exp); 630s ***** test 630s D = [1 1; 3 1; 3 3; 3 1]; 630s [c, nn] = hist3 (D, {0:4, 0:4}); 630s exp_c = zeros (5); 630s exp_c([7 9 19]) = [1 2 1]; 630s assert (c, exp_c); 630s assert (nn, {0:4, 0:4}); 630s ***** test 630s for i = 10 630s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 630s endfor 630s ***** test 630s edge_1 = linspace (0, 10, 10); 630s edge_2 = linspace (0, 50, 10); 630s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 630s exp_c = zeros (10, 10); 630s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 630s assert (c, exp_c); 630s 630s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 630s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 631s ***** shared X 631s X = [ 631s 5 2 631s 5 3 631s 1 4 631s 5 3 631s 4 4 631s 1 2 631s 2 3 631s 3 3 631s 5 4 631s 5 3]; 631s ***** test 631s N = zeros (10); 631s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 631s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 631s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 631s ***** test 631s N = zeros (5, 7); 631s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 631s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 631s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 631s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 631s ***** test 631s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 631s C = {(2:5), (2.5:1:4.5)}; 631s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 631s ***** test 631s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 631s C = {(1.2:3.2), (0:5)}; 631s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 631s assert (nthargout ([1 2], @hist3, X, C), {N C}) 631s ***** test 631s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 631s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 631s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 631s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 631s assert (C, C_exp, eps*10^2) 631s ***** test 631s Xv = repmat ([1:10]', [1 2]); 631s 631s ## Test Centers 631s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 631s 631s N_exp = eye (6); 631s N_exp([1 end]) = 3; 631s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 631s 631s N_exp = zeros (8, 6); 631s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 631s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 631s 631s ## Test Edges 631s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 631s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 631s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 631s 631s N_exp = zeros (14); 631s N_exp(3:12, 3:12) = eye (10); 631s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 631s 631s ## Test for Nbins 631s assert (hist3 (Xv), eye (10)) 631s assert (hist3 (Xv, [10 10]), eye (10)) 631s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 631s assert (hist3 (Xv, [5 5]), eye (5) * 2) 631s 631s N_exp = zeros (7, 5); 631s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 631s assert (hist3 (Xv, [7 5]), N_exp) 631s ***** test # bug #51059 631s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 631s [c, nn] = hist3 (D, {0:4, 0:4}); 631s exp_c = zeros (5); 631s exp_c([7 9 19]) = [1 2 1]; 631s assert (c, exp_c) 631s assert (nn, {0:4, 0:4}) 631s ***** test 631s [c, nn] = hist3 ([1 8]); 631s exp_c = zeros (10, 10); 631s exp_c(6, 6) = 1; 631s exp_nn = {-4:5, 3:12}; 631s assert (c, exp_c) 631s assert (nn, exp_nn, eps) 631s 631s [c, nn] = hist3 ([1 8], [10 11]); 631s exp_c = zeros (10, 11); 631s exp_c(6, 6) = 1; 631s exp_nn = {-4:5, 3:13}; 631s assert (c, exp_c) 631s assert (nn, exp_nn, eps) 631s ***** test 631s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 631s exp_c = zeros (10, 10); 631s exp_c(2, 1) = 1; 631s exp_c(8, 10) = 1; 631s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 631s assert (c, exp_c) 631s assert (nn, exp_nn, eps*100) 631s ***** test 631s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 631s exp_c = zeros (10, 10); 631s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 631s assert (c, exp_c) 631s assert (nn, exp_nn, eps*100) 631s ***** test 631s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 631s exp_c = zeros (10, 10); 631s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 631s assert (c, exp_c) 631s assert (nn, exp_nn, eps*100) 631s 16 tests, 16 passed, 0 known failure, 0 skipped 631s [inst/dist_wrap/fitdist.m] 631s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/fitdist.m 631s ***** test 631s x = betarnd (1, 1, 100, 1); 631s pd = fitdist (x, "Beta"); 631s [phat, pci] = betafit (x); 631s assert ([pd.a, pd.b], phat); 631s assert (paramci (pd), pci); 631s ***** test 631s x1 = betarnd (1, 1, 100, 1); 631s x2 = betarnd (5, 2, 100, 1); 631s pd = fitdist ([x1; x2], "Beta", "By", [ones(100,1); 2*ones(100,1)]); 631s [phat, pci] = betafit (x1); 631s assert ([pd(1).a, pd(1).b], phat); 631s assert (paramci (pd(1)), pci); 631s [phat, pci] = betafit (x2); 631s assert ([pd(2).a, pd(2).b], phat); 631s assert (paramci (pd(2)), pci); 631s ***** test 631s N = 1; 631s x = binornd (N, 0.5, 100, 1); 631s pd = fitdist (x, "binomial"); 631s [phat, pci] = binofit (sum (x), numel (x)); 631s assert ([pd.N, pd.p], [N, phat]); 631s assert (paramci (pd), pci); 631s ***** test 631s N = 3; 631s x = binornd (N, 0.4, 100, 1); 631s pd = fitdist (x, "binomial", "ntrials", N); 631s [phat, pci] = binofit (sum (x), numel (x) * N); 631s assert ([pd.N, pd.p], [N, phat]); 631s assert (paramci (pd), pci); 631s ***** test 631s N = 1; 631s x1 = binornd (N, 0.5, 100, 1); 631s x2 = binornd (N, 0.7, 100, 1); 631s pd = fitdist ([x1; x2], "binomial", "By", [ones(100,1); 2*ones(100,1)]); 631s [phat, pci] = binofit (sum (x1), numel (x1)); 631s assert ([pd(1).N, pd(1).p], [N, phat]); 631s assert (paramci (pd(1)), pci); 631s [phat, pci] = binofit (sum (x2), numel (x2)); 631s assert ([pd(2).N, pd(2).p], [N, phat]); 631s assert (paramci (pd(2)), pci); 631s ***** test 631s N = 5; 631s x1 = binornd (N, 0.5, 100, 1); 631s x2 = binornd (N, 0.8, 100, 1); 631s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 631s "By", [ones(100,1); 2*ones(100,1)]); 631s [phat, pci] = binofit (sum (x1), numel (x1) * N); 631s assert ([pd(1).N, pd(1).p], [N, phat]); 631s assert (paramci (pd(1)), pci); 631s [phat, pci] = binofit (sum (x2), numel (x2) * N); 631s assert ([pd(2).N, pd(2).p], [N, phat]); 631s assert (paramci (pd(2)), pci); 631s ***** test 631s x = bisarnd (1, 1, 100, 1); 631s pd = fitdist (x, "BirnbaumSaunders"); 631s [phat, pci] = bisafit (x); 631s assert ([pd.beta, pd.gamma], phat); 631s assert (paramci (pd), pci); 631s ***** test 631s x1 = bisarnd (1, 1, 100, 1); 631s x2 = bisarnd (5, 2, 100, 1); 631s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 631s [phat, pci] = bisafit (x1); 631s assert ([pd(1).beta, pd(1).gamma], phat); 631s assert (paramci (pd(1)), pci); 631s [phat, pci] = bisafit (x2); 631s assert ([pd(2).beta, pd(2).gamma], phat); 631s assert (paramci (pd(2)), pci); 631s ***** test 631s x = burrrnd (1, 2, 1, 100, 1); 631s pd = fitdist (x, "Burr"); 631s [phat, pci] = burrfit (x); 631s assert ([pd.alpha, pd.c, pd.k], phat); 631s assert (paramci (pd), pci); 631s ***** xtest 631s x1 = burrrnd (1, 2, 1, 100, 1); 631s x2 = burrrnd (1, 0.5, 2, 100, 1); 631s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 631s [phat, pci] = burrfit (x1); 631s assert ([pd(1).alpha, pd(1).c, pd(1).k], phat); 631s assert (paramci (pd(1)), pci); 631s [phat, pci] = burrfit (x2); 631s assert ([pd(2).alpha, pd(2).c, pd(2).k], phat); 631s assert (paramci (pd(2)), pci); 632s ***** test 632s x = exprnd (1, 100, 1); 632s pd = fitdist (x, "exponential"); 632s [muhat, muci] = expfit (x); 632s assert ([pd.mu], muhat); 632s assert (paramci (pd), muci); 632s ***** test 632s x1 = exprnd (1, 100, 1); 632s x2 = exprnd (5, 100, 1); 632s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 632s [muhat, muci] = expfit (x1); 632s assert ([pd(1).mu], muhat); 632s assert (paramci (pd(1)), muci); 632s [muhat, muci] = expfit (x2); 632s assert ([pd(2).mu], muhat); 632s assert (paramci (pd(2)), muci); 632s ***** test 632s x = evrnd (1, 1, 100, 1); 632s pd = fitdist (x, "ev"); 632s [phat, pci] = evfit (x); 632s assert ([pd.mu, pd.sigma], phat); 632s assert (paramci (pd), pci); 632s ***** test 632s x1 = evrnd (1, 1, 100, 1); 632s x2 = evrnd (5, 2, 100, 1); 632s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 632s [phat, pci] = evfit (x1); 632s assert ([pd(1).mu, pd(1).sigma], phat); 632s assert (paramci (pd(1)), pci); 632s [phat, pci] = evfit (x2); 632s assert ([pd(2).mu, pd(2).sigma], phat); 632s assert (paramci (pd(2)), pci); 632s ***** test 632s x = gamrnd (1, 1, 100, 1); 632s pd = fitdist (x, "Gamma"); 632s [phat, pci] = gamfit (x); 632s assert ([pd.a, pd.b], phat); 632s assert (paramci (pd), pci); 632s ***** test 632s x1 = gamrnd (1, 1, 100, 1); 632s x2 = gamrnd (5, 2, 100, 1); 632s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 632s [phat, pci] = gamfit (x1); 632s assert ([pd(1).a, pd(1).b], phat); 632s assert (paramci (pd(1)), pci); 632s [phat, pci] = gamfit (x2); 632s assert ([pd(2).a, pd(2).b], phat); 632s assert (paramci (pd(2)), pci); 632s ***** test 632s rand ("seed", 4); # for reproducibility 632s x = gevrnd (-0.5, 1, 2, 1000, 1); 632s pd = fitdist (x, "generalizedextremevalue"); 632s [phat, pci] = gevfit (x); 632s assert ([pd.k, pd.sigma, pd.mu], phat); 632s assert (paramci (pd), pci); 632s ***** test 632s rand ("seed", 5); # for reproducibility 632s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 632s rand ("seed", 9); # for reproducibility 632s x2 = gevrnd (0, 1, -4, 1000, 1); 632s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 632s [phat, pci] = gevfit (x1); 632s assert ([pd(1).k, pd(1).sigma, pd(1).mu], phat); 632s assert (paramci (pd(1)), pci); 632s [phat, pci] = gevfit (x2); 632s assert ([pd(2).k, pd(2).sigma, pd(2).mu], phat); 632s assert (paramci (pd(2)), pci); 632s ***** test 632s x = gprnd (1, 1, 1, 100, 1); 632s pd = fitdist (x, "GeneralizedPareto"); 632s [phat, pci] = gpfit (x, 1); 632s assert ([pd.k, pd.sigma, pd.theta], phat); 632s assert (paramci (pd), pci); 632s ***** test 632s x = gprnd (1, 1, 2, 100, 1); 632s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 632s [phat, pci] = gpfit (x, 2); 632s assert ([pd.k, pd.sigma, pd.theta], phat); 632s assert (paramci (pd), pci); 632s ***** test 632s x1 = gprnd (1, 1, 1, 100, 1); 632s x2 = gprnd (0, 2, 1, 100, 1); 632s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 632s [phat, pci] = gpfit (x1, 1); 632s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 632s assert (paramci (pd(1)), pci); 632s [phat, pci] = gpfit (x2, 1); 632s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 632s assert (paramci (pd(2)), pci); 633s ***** test 633s x1 = gprnd (3, 2, 2, 100, 1); 633s x2 = gprnd (2, 3, 2, 100, 1); 633s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 633s "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = gpfit (x1, 2); 633s assert ([pd(1).k, pd(1).sigma, pd(1).theta], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = gpfit (x2, 2); 633s assert ([pd(2).k, pd(2).sigma, pd(2).theta], phat); 633s assert (paramci (pd(2)), pci); 633s ***** test 633s x = hnrnd (0, 1, 100, 1); 633s pd = fitdist (x, "HalfNormal"); 633s [phat, pci] = hnfit (x, 0); 633s assert ([pd.mu, pd.sigma], phat); 633s assert (paramci (pd), pci); 633s ***** test 633s x = hnrnd (1, 1, 100, 1); 633s pd = fitdist (x, "HalfNormal", "mu", 1); 633s [phat, pci] = hnfit (x, 1); 633s assert ([pd.mu, pd.sigma], phat); 633s assert (paramci (pd), pci); 633s ***** test 633s x1 = hnrnd (0, 1, 100, 1); 633s x2 = hnrnd (0, 2, 100, 1); 633s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = hnfit (x1, 0); 633s assert ([pd(1).mu, pd(1).sigma], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = hnfit (x2, 0); 633s assert ([pd(2).mu, pd(2).sigma], phat); 633s assert (paramci (pd(2)), pci); 633s ***** test 633s x1 = hnrnd (2, 1, 100, 1); 633s x2 = hnrnd (2, 2, 100, 1); 633s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 633s "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = hnfit (x1, 2); 633s assert ([pd(1).mu, pd(1).sigma], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = hnfit (x2, 2); 633s assert ([pd(2).mu, pd(2).sigma], phat); 633s assert (paramci (pd(2)), pci); 633s ***** test 633s x = invgrnd (1, 1, 100, 1); 633s pd = fitdist (x, "InverseGaussian"); 633s [phat, pci] = invgfit (x); 633s assert ([pd.mu, pd.lambda], phat); 633s assert (paramci (pd), pci); 633s ***** test 633s x1 = invgrnd (1, 1, 100, 1); 633s x2 = invgrnd (5, 2, 100, 1); 633s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = invgfit (x1); 633s assert ([pd(1).mu, pd(1).lambda], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = invgfit (x2); 633s assert ([pd(2).mu, pd(2).lambda], phat); 633s assert (paramci (pd(2)), pci); 633s ***** test 633s x = logirnd (1, 1, 100, 1); 633s pd = fitdist (x, "logistic"); 633s [phat, pci] = logifit (x); 633s assert ([pd.mu, pd.sigma], phat); 633s assert (paramci (pd), pci); 633s ***** test 633s x1 = logirnd (1, 1, 100, 1); 633s x2 = logirnd (5, 2, 100, 1); 633s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = logifit (x1); 633s assert ([pd(1).mu, pd(1).sigma], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = logifit (x2); 633s assert ([pd(2).mu, pd(2).sigma], phat); 633s assert (paramci (pd(2)), pci); 633s ***** test 633s x = loglrnd (1, 1, 100, 1); 633s pd = fitdist (x, "loglogistic"); 633s [phat, pci] = loglfit (x); 633s assert ([pd.mu, pd.sigma], phat); 633s assert (paramci (pd), pci); 633s ***** test 633s x1 = loglrnd (1, 1, 100, 1); 633s x2 = loglrnd (5, 2, 100, 1); 633s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 633s [phat, pci] = loglfit (x1); 633s assert ([pd(1).mu, pd(1).sigma], phat); 633s assert (paramci (pd(1)), pci); 633s [phat, pci] = loglfit (x2); 633s assert ([pd(2).mu, pd(2).sigma], phat); 633s assert (paramci (pd(2)), pci); 634s ***** test 634s x = lognrnd (1, 1, 100, 1); 634s pd = fitdist (x, "lognormal"); 634s [phat, pci] = lognfit (x); 634s assert ([pd.mu, pd.sigma], phat); 634s assert (paramci (pd), pci); 634s ***** test 634s x1 = lognrnd (1, 1, 100, 1); 634s x2 = lognrnd (5, 2, 100, 1); 634s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 634s [phat, pci] = lognfit (x1); 634s assert ([pd(1).mu, pd(1).sigma], phat); 634s assert (paramci (pd(1)), pci); 634s [phat, pci] = lognfit (x2); 634s assert ([pd(2).mu, pd(2).sigma], phat); 634s assert (paramci (pd(2)), pci); 634s ***** test 634s x = nakarnd (2, 0.5, 100, 1); 634s pd = fitdist (x, "Nakagami"); 634s [phat, pci] = nakafit (x); 634s assert ([pd.mu, pd.omega], phat); 634s assert (paramci (pd), pci); 634s ***** test 634s x1 = nakarnd (2, 0.5, 100, 1); 634s x2 = nakarnd (5, 0.8, 100, 1); 634s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 634s [phat, pci] = nakafit (x1); 634s assert ([pd(1).mu, pd(1).omega], phat); 634s assert (paramci (pd(1)), pci); 634s [phat, pci] = nakafit (x2); 634s assert ([pd(2).mu, pd(2).omega], phat); 634s assert (paramci (pd(2)), pci); 634s ***** test 634s randp ("seed", 123); 634s randg ("seed", 321); 634s x = nbinrnd (2, 0.5, 100, 1); 634s pd = fitdist (x, "negativebinomial"); 634s [phat, pci] = nbinfit (x); 634s assert ([pd.R, pd.P], phat); 634s assert (paramci (pd), pci); 634s ***** test 634s randp ("seed", 345); 634s randg ("seed", 543); 634s x1 = nbinrnd (2, 0.5, 100, 1); 634s randp ("seed", 432); 634s randg ("seed", 234); 634s x2 = nbinrnd (5, 0.8, 100, 1); 634s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 634s [phat, pci] = nbinfit (x1); 634s assert ([pd(1).R, pd(1).P], phat); 634s assert (paramci (pd(1)), pci); 634s [phat, pci] = nbinfit (x2); 634s assert ([pd(2).R, pd(2).P], phat); 634s assert (paramci (pd(2)), pci); 634s ***** test 634s x = normrnd (1, 1, 100, 1); 634s pd = fitdist (x, "normal"); 634s [muhat, sigmahat, muci, sigmaci] = normfit (x); 634s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 634s assert (paramci (pd), [muci, sigmaci]); 634s ***** test 634s x1 = normrnd (1, 1, 100, 1); 634s x2 = normrnd (5, 2, 100, 1); 634s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 634s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 634s assert ([pd(1).mu, pd(1).sigma], [muhat, sigmahat]); 634s assert (paramci (pd(1)), [muci, sigmaci]); 634s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 634s assert ([pd(2).mu, pd(2).sigma], [muhat, sigmahat]); 634s assert (paramci (pd(2)), [muci, sigmaci]); 634s ***** test 634s x = poissrnd (1, 100, 1); 634s pd = fitdist (x, "poisson"); 634s [phat, pci] = poissfit (x); 634s assert (pd.lambda, phat); 634s assert (paramci (pd), pci); 635s ***** test 635s x1 = poissrnd (1, 100, 1); 635s x2 = poissrnd (5, 100, 1); 635s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 635s [phat, pci] = poissfit (x1); 635s assert (pd(1).lambda, phat); 635s assert (paramci (pd(1)), pci); 635s [phat, pci] = poissfit (x2); 635s assert (pd(2).lambda, phat); 635s assert (paramci (pd(2)), pci); 635s ***** test 635s x = raylrnd (1, 100, 1); 635s pd = fitdist (x, "rayleigh"); 635s [phat, pci] = raylfit (x); 635s assert (pd.sigma, phat); 635s assert (paramci (pd), pci); 635s ***** test 635s x1 = raylrnd (1, 100, 1); 635s x2 = raylrnd (5, 100, 1); 635s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 635s [phat, pci] = raylfit (x1); 635s assert ( pd(1).sigma, phat); 635s assert (paramci (pd(1)), pci); 635s [phat, pci] = raylfit (x2); 635s assert (pd(2).sigma, phat); 635s assert (paramci (pd(2)), pci); 635s ***** test 635s x = ricernd (1, 1, 100, 1); 635s pd = fitdist (x, "rician"); 635s [phat, pci] = ricefit (x); 635s assert ([pd.s, pd.sigma], phat); 635s assert (paramci (pd), pci); 635s ***** test 635s x1 = ricernd (1, 1, 100, 1); 635s x2 = ricernd (5, 2, 100, 1); 635s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 635s [phat, pci] = ricefit (x1); 635s assert ([pd(1).s, pd(1).sigma], phat); 635s assert (paramci (pd(1)), pci); 635s [phat, pci] = ricefit (x2); 635s assert ([pd(2).s, pd(2).sigma], phat); 635s assert (paramci (pd(2)), pci); 635s ***** warning ... 635s fitdist ([1 2 3 4 5], "Stable"); 635s ***** test 635s x = tlsrnd (0, 1, 1, 100, 1); 635s pd = fitdist (x, "tlocationscale"); 635s [phat, pci] = tlsfit (x); 635s assert ([pd.mu, pd.sigma, pd.nu], phat); 635s assert (paramci (pd), pci); 635s ***** test 635s x1 = tlsrnd (0, 1, 1, 100, 1); 635s x2 = tlsrnd (5, 2, 1, 100, 1); 635s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 635s [phat, pci] = tlsfit (x1); 635s assert ([pd(1).mu, pd(1).sigma, pd(1).nu], phat); 635s assert (paramci (pd(1)), pci); 635s [phat, pci] = tlsfit (x2); 635s assert ([pd(2).mu, pd(2).sigma, pd(2).nu], phat); 635s assert (paramci (pd(2)), pci); 635s ***** test 635s x = [1 2 3 4 5]; 635s pd = fitdist (x, "weibull"); 635s [phat, pci] = wblfit (x); 635s assert ([pd.lambda, pd.k], phat); 635s assert (paramci (pd), pci); 635s ***** test 635s x = [1 2 3 4 5 6 7 8 9 10]; 635s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 635s [phat, pci] = wblfit (x(1:5)); 635s assert ([pd(1).lambda, pd(1).k], phat); 635s assert (paramci (pd(1)), pci); 635s [phat, pci] = wblfit (x(6:10)); 635s assert ([pd(2).lambda, pd(2).k], phat); 635s assert (paramci (pd(2)), pci); 635s ***** error fitdist (1) 635s ***** error fitdist (1, ["as";"sd"]) 635s ***** error fitdist (1, "some") 635s ***** error ... 635s fitdist (ones (2), "normal") 635s ***** error ... 635s fitdist ([i, 2, 3], "normal") 635s ***** error ... 635s fitdist (["a", "s", "d"], "normal") 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "By") 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 635s ***** error ... 635s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "alpha", i) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "ntrials", 0) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "options", 0) 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 635s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 635s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 635s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 635s ***** error ... 635s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 635s ***** error ... 635s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 635s ***** error ... 635s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 635s ***** error ... 635s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 635s 77 tests, 77 passed, 0 known failure, 0 skipped 635s [inst/dist_wrap/pdf.m] 635s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/pdf.m 635s ***** shared x 635s x = [1:5]; 635s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 635s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 635s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 635s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 635s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 635s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 635s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 635s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 635s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 635s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 635s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 635s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 635s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 635s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 635s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 635s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 635s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 635s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 635s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 635s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 635s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 635s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 635s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 635s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 635s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 636s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 636s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 636s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 636s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 636s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 636s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 636s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 636s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 636s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 636s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 636s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 636s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 636s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 636s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 636s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 636s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 636s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 636s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 636s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 636s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 636s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 636s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 636s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 636s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 636s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 636s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 636s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 636s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 636s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 636s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 636s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 636s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 636s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 636s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 636s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 636s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 636s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 636s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 636s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 636s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 636s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 636s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 636s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 636s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 636s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 636s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 636s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 636s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 636s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 636s ***** error pdf (1) 636s ***** error pdf ({"beta"}) 636s ***** error pdf ("beta", {[1 2 3 4 5]}) 636s ***** error pdf ("beta", "text") 636s ***** error pdf ("beta", 1+i) 636s ***** error ... 636s pdf ("Beta", x, "a", 2) 636s ***** error ... 636s pdf ("Beta", x, 5, "") 636s ***** error ... 636s pdf ("Beta", x, 5, {2}) 636s ***** error pdf ("chi2", x) 636s ***** error pdf ("Beta", x, 5) 636s ***** error pdf ("Burr", x, 5) 636s ***** error pdf ("Burr", x, 5, 2) 636s 86 tests, 86 passed, 0 known failure, 0 skipped 636s [inst/dist_wrap/mle.m] 636s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/mle.m 636s ***** error mle (ones (2)) 636s ***** error mle ("text") 636s ***** error mle ([1, 2, 3, i, 5]) 636s ***** error ... 636s mle ([1:50], "distribution") 636s ***** error ... 636s mle ([1:50], "censoring", logical ([1,0,1,0])) 636s ***** error ... 636s mle ([1:50], "frequency", [1,0,1,0]) 636s ***** error ... 636s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 636s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 636s ***** error mle ([1:50], "alpha", 1) 636s ***** error mle ([1:50], "alpha", -1) 636s ***** error mle ([1:50], "alpha", i) 636s ***** error ... 636s mle ([1:50], "ntrials", -1) 636s ***** error ... 636s mle ([1:50], "ntrials", [20, 50]) 636s ***** error ... 636s mle ([1:50], "ntrials", [20.3]) 636s ***** error ... 636s mle ([1:50], "ntrials", 3i) 636s ***** error ... 636s mle ([1:50], "options", 4) 636s ***** error ... 636s mle ([1:50], "options", struct ("x", 3)) 636s ***** error mle ([1:50], "NAME", "value") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 2 1 0], "distribution", "bernoulli") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "bino") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 -1 0], "distribution", "gp") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 -1 0], "distribution", "hn") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 636s ***** error mle ([1:50], "distribution", "value") 636s ***** error ... 636s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 636s 36 tests, 36 passed, 0 known failure, 0 skipped 636s [inst/dist_wrap/makedist.m] 636s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/makedist.m 636s ***** test 636s pd = makedist ("beta"); 636s assert (class (pd), "BetaDistribution"); 636s assert (pd.a, 1); 636s assert (pd.b, 1); 636s ***** test 636s pd = makedist ("beta", "a", 5); 636s assert (pd.a, 5); 636s assert (pd.b, 1); 636s ***** test 636s pd = makedist ("beta", "b", 5); 636s assert (pd.a, 1); 636s assert (pd.b, 5); 636s ***** test 636s pd = makedist ("beta", "a", 3, "b", 5); 636s assert (pd.a, 3); 636s assert (pd.b, 5); 636s ***** test 636s pd = makedist ("binomial"); 636s assert (class (pd), "BinomialDistribution"); 636s assert (pd.N, 1); 636s assert (pd.p, 0.5); 636s ***** test 636s pd = makedist ("binomial", "N", 5); 636s assert (pd.N, 5); 636s assert (pd.p, 0.5); 636s ***** test 636s pd = makedist ("binomial", "p", 0.2); 636s assert (pd.N, 1); 636s assert (pd.p, 0.2); 636s ***** test 636s pd = makedist ("binomial", "N", 3, "p", 0.3); 636s assert (pd.N, 3); 636s assert (pd.p, 0.3); 636s ***** test 636s pd = makedist ("birnbaumsaunders"); 636s assert (class (pd), "BirnbaumSaundersDistribution"); 636s assert (pd.beta, 1); 636s assert (pd.gamma, 1); 636s ***** test 636s pd = makedist ("birnbaumsaunders", "beta", 5); 636s assert (pd.beta, 5); 636s assert (pd.gamma, 1); 636s ***** test 636s pd = makedist ("birnbaumsaunders", "gamma", 5); 636s assert (pd.beta, 1); 636s assert (pd.gamma, 5); 636s ***** test 636s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 636s assert (pd.beta, 3); 636s assert (pd.gamma, 5); 636s ***** test 636s pd = makedist ("burr"); 636s assert (class (pd), "BurrDistribution"); 636s assert (pd.alpha, 1); 636s assert (pd.c, 1); 636s assert (pd.k, 1); 636s ***** test 636s pd = makedist ("burr", "k", 5); 636s assert (pd.alpha, 1); 636s assert (pd.c, 1); 636s assert (pd.k, 5); 636s ***** test 636s pd = makedist ("burr", "c", 5); 636s assert (pd.alpha, 1); 636s assert (pd.c, 5); 636s assert (pd.k, 1); 636s ***** test 636s pd = makedist ("burr", "alpha", 3, "c", 5); 636s assert (pd.alpha, 3); 636s assert (pd.c, 5); 636s assert (pd.k, 1); 636s ***** test 636s pd = makedist ("burr", "k", 3, "c", 5); 636s assert (pd.alpha, 1); 636s assert (pd.c, 5); 636s assert (pd.k, 3); 636s ***** test 636s pd = makedist ("exponential"); 636s assert (class (pd), "ExponentialDistribution"); 636s assert (pd.mu, 1); 636s ***** test 636s pd = makedist ("exponential", "mu", 5); 636s assert (pd.mu, 5); 636s ***** test 636s pd = makedist ("extremevalue"); 636s assert (class (pd), "ExtremeValueDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("extremevalue", "mu", 5); 636s assert (class (pd), "ExtremeValueDistribution"); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("ev", "sigma", 5); 636s assert (class (pd), "ExtremeValueDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("ev", "mu", -3, "sigma", 5); 636s assert (class (pd), "ExtremeValueDistribution"); 636s assert (pd.mu, -3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("gamma"); 636s assert (class (pd), "GammaDistribution"); 636s assert (pd.a, 1); 636s assert (pd.b, 1); 636s ***** test 636s pd = makedist ("gamma", "a", 5); 636s assert (pd.a, 5); 636s assert (pd.b, 1); 636s ***** test 636s pd = makedist ("gamma", "b", 5); 636s assert (pd.a, 1); 636s assert (pd.b, 5); 636s ***** test 636s pd = makedist ("gamma", "a", 3, "b", 5); 636s assert (pd.a, 3); 636s assert (pd.b, 5); 636s ***** test 636s pd = makedist ("GeneralizedExtremeValue"); 636s assert (class (pd), "GeneralizedExtremeValueDistribution"); 636s assert (pd.k, 0); 636s assert (pd.sigma, 1); 636s assert (pd.mu, 0); 636s ***** test 636s pd = makedist ("GeneralizedExtremeValue", "k", 5); 636s assert (pd.k, 5); 636s assert (pd.sigma, 1); 636s assert (pd.mu, 0); 636s ***** test 636s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 636s assert (pd.k, 0); 636s assert (pd.sigma, 5); 636s assert (pd.mu, 0); 636s ***** test 636s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 636s assert (pd.k, 3); 636s assert (pd.sigma, 5); 636s assert (pd.mu, 0); 636s ***** test 636s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 636s assert (pd.k, 0); 636s assert (pd.sigma, 5); 636s assert (pd.mu, 3); 636s ***** test 636s pd = makedist ("GeneralizedPareto"); 636s assert (class (pd), "GeneralizedParetoDistribution"); 636s assert (pd.k, 1); 636s assert (pd.sigma, 1); 636s assert (pd.theta, 1); 636s ***** test 636s pd = makedist ("GeneralizedPareto", "k", 5); 636s assert (pd.k, 5); 636s assert (pd.sigma, 1); 636s assert (pd.theta, 1); 636s ***** test 636s pd = makedist ("GeneralizedPareto", "sigma", 5); 636s assert (pd.k, 1); 636s assert (pd.sigma, 5); 636s assert (pd.theta, 1); 636s ***** test 636s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 636s assert (pd.k, 3); 636s assert (pd.sigma, 5); 636s assert (pd.theta, 1); 636s ***** test 636s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 636s assert (pd.k, 1); 636s assert (pd.sigma, 5); 636s assert (pd.theta, 3); 636s ***** test 636s pd = makedist ("HalfNormal"); 636s assert (class (pd), "HalfNormalDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("HalfNormal", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("HalfNormal", "sigma", 5); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 636s assert (pd.mu, 3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("InverseGaussian"); 636s assert (class (pd), "InverseGaussianDistribution"); 636s assert (pd.mu, 1); 636s assert (pd.lambda, 1); 636s ***** test 636s pd = makedist ("InverseGaussian", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.lambda, 1); 636s ***** test 636s pd = makedist ("InverseGaussian", "lambda", 5); 636s assert (pd.mu, 1); 636s assert (pd.lambda, 5); 636s ***** test 636s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 636s assert (pd.mu, 3); 636s assert (pd.lambda, 5); 636s ***** test 636s pd = makedist ("logistic"); 636s assert (class (pd), "LogisticDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("logistic", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("logistic", "sigma", 5); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("logistic", "mu", 3, "sigma", 5); 636s assert (pd.mu, 3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("loglogistic"); 636s assert (class (pd), "LoglogisticDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("loglogistic", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("loglogistic", "sigma", 5); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 636s assert (pd.mu, 3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("Lognormal"); 636s assert (class (pd), "LognormalDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Lognormal", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Lognormal", "sigma", 5); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 636s assert (pd.mu, -3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("Loguniform"); 636s assert (class (pd), "LoguniformDistribution"); 636s assert (pd.Lower, 1); 636s assert (pd.Upper, 4); 636s ***** test 636s pd = makedist ("Loguniform", "Lower", 2); 636s assert (pd.Lower, 2); 636s assert (pd.Upper, 4); 636s ***** test 636s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 636s assert (pd.Lower, 1); 636s assert (pd.Upper, 3); 636s ***** test 636s pd = makedist ("Multinomial"); 636s assert (class (pd), "MultinomialDistribution"); 636s assert (pd.Probabilities, [0.5, 0.5]); 636s ***** test 636s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 636s assert (class (pd), "MultinomialDistribution"); 636s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 636s ***** test 636s pd = makedist ("Nakagami"); 636s assert (class (pd), "NakagamiDistribution"); 636s assert (pd.mu, 1); 636s assert (pd.omega, 1); 636s ***** test 636s pd = makedist ("Nakagami", "mu", 5); 636s assert (class (pd), "NakagamiDistribution"); 636s assert (pd.mu, 5); 636s assert (pd.omega, 1); 636s ***** test 636s pd = makedist ("Nakagami", "omega", 0.3); 636s assert (class (pd), "NakagamiDistribution"); 636s assert (pd.mu, 1); 636s assert (pd.omega, 0.3); 636s ***** test 636s pd = makedist ("NegativeBinomial"); 636s assert (class (pd), "NegativeBinomialDistribution"); 636s assert (pd.R, 1); 636s assert (pd.P, 0.5); 636s ***** test 636s pd = makedist ("NegativeBinomial", "R", 5); 636s assert (class (pd), "NegativeBinomialDistribution"); 636s assert (pd.R, 5); 636s assert (pd.P, 0.5); 636s ***** test 636s pd = makedist ("NegativeBinomial", "p", 0.3); 636s assert (class (pd), "NegativeBinomialDistribution"); 636s assert (pd.R, 1); 636s assert (pd.P, 0.3); 636s ***** test 636s pd = makedist ("Normal"); 636s assert (class (pd), "NormalDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Normal", "mu", 5); 636s assert (class (pd), "NormalDistribution"); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Normal", "sigma", 5); 636s assert (class (pd), "NormalDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("Normal", "mu", -3, "sigma", 5); 636s assert (class (pd), "NormalDistribution"); 636s assert (pd.mu, -3); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("PiecewiseLinear"); 636s assert (class (pd), "PiecewiseLinearDistribution"); 636s assert (pd.x, [0; 1]); 636s assert (pd.Fx, [0; 1]); 636s ***** test 636s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 636s assert (pd.x, [0; 1; 2]); 636s assert (pd.Fx, [0; 0.5; 1]); 636s ***** test 636s pd = makedist ("Poisson"); 636s assert (class (pd), "PoissonDistribution"); 636s assert (pd.lambda, 1); 636s ***** test 636s pd = makedist ("Poisson", "lambda", 5); 636s assert (pd.lambda, 5); 636s ***** test 636s pd = makedist ("Rayleigh"); 636s assert (class (pd), "RayleighDistribution"); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Rayleigh", "sigma", 5); 636s assert (pd.sigma, 5); 636s ***** test 636s pd = makedist ("Rician"); 636s assert (class (pd), "RicianDistribution"); 636s assert (pd.s, 1); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Rician", "s", 3); 636s assert (pd.s, 3); 636s assert (pd.sigma, 1); 636s ***** test 636s pd = makedist ("Rician", "sigma", 3); 636s assert (pd.s, 1); 636s assert (pd.sigma, 3); 636s ***** test 636s pd = makedist ("Rician", "s", 2, "sigma", 3); 636s assert (pd.s, 2); 636s assert (pd.sigma, 3); 636s ***** warning 636s pd = makedist ("stable"); 636s assert (class (pd), "double"); 636s assert (isempty (pd), true); 636s ***** test 636s pd = makedist ("tlocationscale"); 636s assert (class (pd), "tLocationScaleDistribution"); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 1); 636s assert (pd.nu, 5); 636s ***** test 636s pd = makedist ("tlocationscale", "mu", 5); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 1); 636s assert (pd.nu, 5); 636s ***** test 636s pd = makedist ("tlocationscale", "sigma", 2); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 2); 636s assert (pd.nu, 5); 636s ***** test 636s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 636s assert (pd.mu, 5); 636s assert (pd.sigma, 2); 636s assert (pd.nu, 5); 636s ***** test 636s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 636s assert (pd.mu, 0); 636s assert (pd.sigma, 2); 636s assert (pd.nu, 1); 636s ***** test 636s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 636s assert (pd.mu, -2); 636s assert (pd.sigma, 3); 636s assert (pd.nu, 1); 636s ***** test 636s pd = makedist ("Triangular"); 636s assert (class (pd), "TriangularDistribution"); 636s assert (pd.A, 0); 636s assert (pd.B, 0.5); 636s assert (pd.C, 1); 636s ***** test 636s pd = makedist ("Triangular", "A", -2); 636s assert (pd.A, -2); 636s assert (pd.B, 0.5); 636s assert (pd.C, 1); 636s ***** test 636s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 636s assert (pd.A, 0.5); 636s assert (pd.B, 0.9); 636s assert (pd.C, 1); 636s ***** test 636s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 636s assert (pd.A, 1); 636s assert (pd.B, 2); 636s assert (pd.C, 5); 636s ***** test 636s pd = makedist ("Uniform"); 636s assert (class (pd), "UniformDistribution"); 636s assert (pd.Lower, 0); 636s assert (pd.Upper, 1); 636s ***** test 636s pd = makedist ("Uniform", "Lower", -2); 636s assert (pd.Lower, -2); 636s assert (pd.Upper, 1); 636s ***** test 636s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 636s assert (pd.Lower, 1); 636s assert (pd.Upper, 3); 636s ***** test 636s pd = makedist ("Weibull"); 636s assert (class (pd), "WeibullDistribution"); 636s assert (pd.lambda, 1); 636s assert (pd.k, 1); 636s ***** test 636s pd = makedist ("Weibull", "lambda", 3); 636s assert (pd.lambda, 3); 636s assert (pd.k, 1); 636s ***** test 636s pd = makedist ("Weibull", "lambda", 3, "k", 2); 636s assert (pd.lambda, 3); 636s assert (pd.k, 2); 636s ***** error makedist (1) 636s ***** error makedist (["as";"sd"]) 636s ***** error makedist ("some") 636s ***** error ... 636s makedist ("Beta", "a") 636s ***** error ... 636s makedist ("Beta", "a", 1, "Q", 23) 636s ***** error ... 636s makedist ("Binomial", "N", 1, "Q", 23) 636s ***** error ... 636s makedist ("BirnbaumSaunders", "N", 1) 636s ***** error ... 636s makedist ("Burr", "lambda", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("extremevalue", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("exponential", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Gamma", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("HalfNormal", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Logistic", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Loglogistic", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Lognormal", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Loguniform", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Multinomial", "k", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Nakagami", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Normal", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Poisson", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Rician", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Stable", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Triangular", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Uniform", "mu", 1, "sdfs", 34) 636s ***** error ... 636s makedist ("Weibull", "mu", 1, "sdfs", 34) 636s 131 tests, 131 passed, 0 known failure, 0 skipped 636s [inst/dist_wrap/icdf.m] 636s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/icdf.m 636s ***** shared p 636s p = [0.05:0.05:0.5]; 636s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 636s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 636s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 636s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 636s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 636s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 636s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 636s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 636s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 636s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 636s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 636s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 636s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 636s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 636s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 636s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 636s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 636s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 636s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 636s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 636s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 636s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 636s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 636s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 636s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 636s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 636s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 636s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 636s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 636s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 636s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 636s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 636s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 636s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 636s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 636s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 636s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 636s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 636s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 636s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 636s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 636s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 636s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 636s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 636s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 636s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 636s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 637s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 637s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 637s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 638s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 638s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 638s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 638s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 638s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 638s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 638s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 638s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 638s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 638s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 638s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 638s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 638s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 638s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 638s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 638s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 638s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 638s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 638s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 638s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 638s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 643s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 647s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 647s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 647s ***** error icdf (1) 647s ***** error icdf ({"beta"}) 647s ***** error icdf ("beta", {[1 2 3 4 5]}) 647s ***** error icdf ("beta", "text") 647s ***** error icdf ("beta", 1+i) 647s ***** error ... 647s icdf ("Beta", p, "a", 2) 647s ***** error ... 647s icdf ("Beta", p, 5, "") 647s ***** error ... 647s icdf ("Beta", p, 5, {2}) 647s ***** error icdf ("chi2", p) 647s ***** error icdf ("Beta", p, 5) 647s ***** error icdf ("Burr", p, 5) 647s ***** error icdf ("Burr", p, 5, 2) 647s 86 tests, 86 passed, 0 known failure, 0 skipped 647s [inst/dist_wrap/random.m] 647s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/random.m 647s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 647s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 647s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 647s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 647s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 647s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 647s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 647s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 647s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 647s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 647s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 647s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 647s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 647s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 647s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 647s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 647s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 647s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 647s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 648s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 648s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 648s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 648s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 648s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 648s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 648s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 648s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 648s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 648s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 648s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 648s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 648s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 648s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 648s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 648s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 648s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 648s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 648s ***** error random (1) 648s ***** error random ({"beta"}) 648s ***** error ... 648s random ("Beta", "a", 2) 648s ***** error ... 648s random ("Beta", 5, "") 648s ***** error ... 648s random ("Beta", 5, {2}) 648s ***** error ... 648s random ("Beta", "a", 2, 2, 10) 648s ***** error ... 648s random ("Beta", 5, "", 2, 10) 648s ***** error ... 648s random ("Beta", 5, {2}, 2, 10) 648s ***** error ... 648s random ("Beta", 5, "", 2, 10) 648s ***** error random ("chi2") 648s ***** error random ("Beta", 5) 648s ***** error random ("Burr", 5) 648s ***** error random ("Burr", 5, 2) 648s 87 tests, 87 passed, 0 known failure, 0 skipped 648s [inst/dist_wrap/cdf.m] 648s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_wrap/cdf.m 648s ***** shared x 648s x = [1:5]; 648s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 648s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 648s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 648s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 648s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 648s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 648s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 648s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 648s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 648s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 648s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 648s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 648s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 648s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 648s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 648s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 648s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 648s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 648s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 648s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 648s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 648s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 648s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 648s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 648s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 648s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 648s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 648s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 648s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 648s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 648s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 648s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 648s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 648s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 648s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 648s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 648s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 648s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 648s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 648s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 648s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 648s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 648s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 648s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 648s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 648s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 648s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 648s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 648s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 648s ***** error cdf (1) 648s ***** error cdf ({"beta"}) 648s ***** error cdf ("beta", {[1 2 3 4 5]}) 648s ***** error cdf ("beta", "text") 648s ***** error cdf ("beta", 1+i) 648s ***** error ... 648s cdf ("Beta", x, "a", 2) 648s ***** error ... 648s cdf ("Beta", x, 5, "") 648s ***** error ... 648s cdf ("Beta", x, 5, {2}) 648s ***** error cdf ("chi2", x) 648s ***** error cdf ("Beta", x, 5) 648s ***** error cdf ("Burr", x, 5) 648s ***** error cdf ("Burr", x, 5, 2) 648s 86 tests, 86 passed, 0 known failure, 0 skipped 648s [inst/glmval.m] 648s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/glmval.m 648s ***** demo 648s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 648s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 648s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 648s b = glmfit (x, [y n], "binomial", "Link", "probit"); 648s yfit = glmval (b, x, "probit", "Size", n); 648s plot (x, y./n, 'o', x, yfit ./ n, '-') 648s ***** error glmval () 648s ***** error glmval (1) 648s ***** error glmval (1, 2) 648s ***** error ... 648s glmval ("asd", [1; 1; 1], 'probit') 648s ***** error ... 648s glmval ([], [1; 1; 1], 'probit') 648s ***** error ... 648s glmval ([0.1; 0.3; 0.4], [], 'probit') 648s ***** error ... 648s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {'log'}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), NaN) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), [1, 2]) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), [1i]) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), true) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 648s ***** error ... 648s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 648s ***** error ... 648s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 648s ***** error ... 648s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 648s 57 tests, 57 passed, 0 known failure, 0 skipped 648s [inst/mcnemar_test.m] 648s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/mcnemar_test.m 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 648s assert (h, 1); 648s assert (pval, 3.8151e-06, 1e-10); 648s assert (chisq, 21.356, 1e-3); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 648s assert (h, 1); 648s assert (pval, 0.034690, 1e-6); 648s assert (isempty (chisq), true); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 648s assert (h, 0); 648s assert (pval, 0.034690, 1e-6); 648s assert (isempty (chisq), true); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 648s assert (h, 1); 648s assert (pval, 0.034690, 1e-6); 648s assert (isempty (chisq), true); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 648s assert (h, 1); 648s assert (pval, 0.033006, 1e-6); 648s assert (chisq, 4.5455, 1e-4); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 648s assert (h, 0); 648s assert (pval, 0.052479, 1e-6); 648s assert (isempty (chisq), true); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 648s assert (h, 0); 648s assert (pval, 0.055009, 1e-6); 648s assert (chisq, 3.6818, 1e-4); 648s ***** test 648s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 648s assert (h, 1); 648s assert (pval, 0.055009, 1e-6); 648s assert (chisq, 3.6818, 1e-4); 648s ***** error mcnemar_test (59, 6, 16, 80) 648s ***** error mcnemar_test (ones (3, 3)) 648s ***** error ... 648s mcnemar_test ([59,6;16,-80]) 648s ***** error ... 648s mcnemar_test ([59,6;16,4.5]) 648s ***** error ... 648s mcnemar_test ([59,6;16,80], {""}) 648s ***** error ... 648s mcnemar_test ([59,6;16,80], -0.2) 648s ***** error ... 648s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 648s ***** error ... 648s mcnemar_test ([59,6;16,80], 1) 648s ***** error ... 648s mcnemar_test ([59,6;16,80], "") 648s 17 tests, 17 passed, 0 known failure, 0 skipped 648s [inst/signtest.m] 648s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/signtest.m 648s ***** test 648s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 648s assert (pval, 1.091701889420221e-218, 1e-14); 648s assert (h, 1); 648s assert (stats.zval, -31.5437631079266, 1e-14); 648s ***** test 648s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 648s assert (pval, 0.6875000000000006, 1e-14); 648s assert (h, 0); 648s assert (stats.zval, NaN); 648s assert (stats.sign, 4); 648s ***** test 648s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 648s assert (pval, 0.6830913983096086, 1e-14); 648s assert (h, 0); 648s assert (stats.zval, 0.4082482904638631, 1e-14); 648s assert (stats.sign, 4); 648s ***** error signtest (ones (2)) 648s ***** error ... 648s signtest ([1, 2, 3, 4], ones (2)) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [1, 2, 3]) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'tail') 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'alpha', 0) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'alpha', "a") 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'tail', "some") 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'method', 0.01) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'method', "some") 648s ***** error ... 648s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 648s 20 tests, 20 passed, 0 known failure, 0 skipped 648s [inst/fitlm.m] 648s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/fitlm.m 648s ***** demo 648s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 648s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 648s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 648s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 648s 25.694 ]'; 648s 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]'; 648s 648s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 648s ***** demo 648s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 648s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 648s brands = {'Gourmet', 'National', 'Generic'; ... 648s 'Gourmet', 'National', 'Generic'; ... 648s 'Gourmet', 'National', 'Generic'; ... 648s 'Gourmet', 'National', 'Generic'; ... 648s 'Gourmet', 'National', 'Generic'; ... 648s 'Gourmet', 'National', 'Generic'}; 648s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 648s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 648s 648s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 648s "CategoricalVars",[1,2],"display","on"); 648s ***** test 648s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 648s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 648s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 648s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 648s 25.694 ]'; 648s 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]'; 648s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 648s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 648s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 648s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 648s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 648s assert (TAB{2,2}, 10, 1e-04); 648s assert (TAB{3,2}, 7.99999999999999, 1e-09); 648s assert (TAB{4,2}, 8.99999999999999, 1e-09); 648s assert (TAB{5,2}, 11.0001428571429, 1e-09); 648s assert (TAB{6,2}, 19.0001111111111, 1e-09); 648s assert (TAB{2,3}, 1.01775379540949, 1e-09); 648s assert (TAB{3,3}, 1.64107868458008, 1e-09); 648s assert (TAB{4,3}, 1.43932122062479, 1e-09); 648s assert (TAB{5,3}, 1.48983900477565, 1e-09); 648s assert (TAB{6,3}, 1.3987687997822, 1e-09); 648s assert (TAB{2,6}, 9.82555903510687, 1e-09); 648s assert (TAB{3,6}, 4.87484242844031, 1e-09); 648s assert (TAB{4,6}, 6.25294748040552, 1e-09); 648s assert (TAB{5,6}, 7.38344399756088, 1e-09); 648s assert (TAB{6,6}, 13.5834536158296, 1e-09); 648s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 648s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 648s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 648s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 649s ***** test 649s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 649s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 649s brands = bsxfun (@times, ones(6,1), [1,2,3]); 649s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 649s 649s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 649s "categoricalvars",[1,2],"display","off"); 649s assert (TAB{2,2}, 5.66666666666667, 1e-09); 649s assert (TAB{3,2}, -1.33333333333333, 1e-09); 649s assert (TAB{4,2}, -2.16666666666667, 1e-09); 649s assert (TAB{5,2}, 1.16666666666667, 1e-09); 649s assert (TAB{6,2}, -0.333333333333334, 1e-09); 649s assert (TAB{7,2}, -0.166666666666667, 1e-09); 649s assert (TAB{2,3}, 0.215165741455965, 1e-09); 649s assert (TAB{3,3}, 0.304290309725089, 1e-09); 649s assert (TAB{4,3}, 0.304290309725089, 1e-09); 649s assert (TAB{5,3}, 0.304290309725089, 1e-09); 649s assert (TAB{6,3}, 0.43033148291193, 1e-09); 649s assert (TAB{7,3}, 0.43033148291193, 1e-09); 649s assert (TAB{2,6}, 26.3362867542108, 1e-09); 649s assert (TAB{3,6}, -4.38178046004138, 1e-09); 649s assert (TAB{4,6}, -7.12039324756724, 1e-09); 649s assert (TAB{5,6}, 3.83405790253621, 1e-09); 649s assert (TAB{6,6}, -0.774596669241495, 1e-09); 649s assert (TAB{7,6}, -0.387298334620748, 1e-09); 649s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 649s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 649s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 649s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 649s assert (TAB{6,7}, 0.453570536021938, 1e-09); 649s assert (TAB{7,7}, 0.705316781644046, 1e-09); 649s ## Test with string ids for categorical variables 649s brands = {'Gourmet', 'National', 'Generic'; ... 649s 'Gourmet', 'National', 'Generic'; ... 649s 'Gourmet', 'National', 'Generic'; ... 649s 'Gourmet', 'National', 'Generic'; ... 649s 'Gourmet', 'National', 'Generic'; ... 649s 'Gourmet', 'National', 'Generic'}; 649s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 649s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 649s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 649s "categoricalvars",[1,2],"display","off"); 649s ***** test 649s load carsmall 649s X = [Weight,Horsepower,Acceleration]; 649s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 649s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 649s assert (TAB{2,2}, 47.9767628118615, 1e-09); 649s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 649s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 649s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 649s assert (TAB{2,3}, 3.87851641748551, 1e-09); 649s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 649s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 649s assert (TAB{5,3}, 0.193325043113178, 1e-09); 649s assert (TAB{2,6}, 12.369874881944, 1e-09); 649s assert (TAB{3,6}, -5.80228828790225, 1e-09); 649s assert (TAB{4,6}, -1.76626492228599, 1e-09); 649s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 649s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 649s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 649s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 649s assert (TAB{5,7}, 0.952359384151778, 1e-09); 649s 3 tests, 3 passed, 0 known failure, 0 skipped 649s [inst/logit.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/logit.m 649s ***** test 649s p = [0.01:0.01:0.99]; 649s assert (logit (p), log (p ./ (1-p)), 25*eps); 649s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 649s ***** error logit () 649s ***** error logit (1, 2) 649s 4 tests, 4 passed, 0 known failure, 0 skipped 649s [inst/rangesearch.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/rangesearch.m 649s ***** demo 649s ## Generate 1000 random 2D points from each of five distinct multivariate 649s ## normal distributions that form five separate classes 649s N = 1000; 649s d = 10; 649s randn ("seed", 5); 649s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 649s randn ("seed", 6); 649s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 649s randn ("seed", 7); 649s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 649s randn ("seed", 8); 649s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 649s randn ("seed", 8); 649s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 649s X = [X1; X2; X3; X4; X5]; 649s 649s ## For each point in X, find the points in X that are within a radius d 649s ## away from the points in X. 649s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 649s 649s ## Select the first point in X (corresponding to the first class) and find 649s ## its nearest neighbors within the radius d. Display these points in 649s ## one color and the remaining points in a different color. 649s x = X(1,:); 649s nearestPoints = X (Idx{1},:); 649s nonNearestIdx = true (size (X, 1), 1); 649s nonNearestIdx(Idx{1}) = false; 649s 649s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 649s hold on 649s scatter (nearestPoints(:,1),nearestPoints(:,2)) 649s scatter (x(1), x(2), "black", "filled") 649s hold off 649s 649s ## Select the last point in X (corresponding to the fifth class) and find 649s ## its nearest neighbors within the radius d. Display these points in 649s ## one color and the remaining points in a different color. 649s x = X(end,:); 649s nearestPoints = X (Idx{1},:); 649s nonNearestIdx = true (size (X, 1), 1); 649s nonNearestIdx(Idx{1}) = false; 649s 649s figure 649s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 649s hold on 649s scatter (nearestPoints(:,1),nearestPoints(:,2)) 649s scatter (x(1), x(2), "black", "filled") 649s hold off 649s ***** shared x, y, X, Y 649s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 649s y = [2, 3, 4; 1, 4, 3]; 649s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 649s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 649s ***** test 649s [idx, D] = rangesearch (x, y, 4); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 649s assert (idx, {[1, 2, 4]; [1, 4]}); 649s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 649s "SortIndices", false); 649s assert (idx, {[1, 2, 4]; [1, 4]}); 649s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 649s ***** test 649s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 649s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 649s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 649s "NSMethod", "exhaustive"); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 649s "NSMethod", "exhaustive"); 649s assert (idx, {[1, 4, 2]; [1, 4]}); 649s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 649s "NSMethod", "exhaustive", "SortIndices", false); 649s assert (idx, {[1, 2, 4]; [1, 4]}); 649s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (X, Y, 4); 649s assert (idx, {[1, 2]; [1, 2, 3]}); 649s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (X, Y, 2); 649s assert (idx, {[1]; [1, 2]}); 649s assert (D, {[1.4142]; [1.4142, 1.4142]}, 1e-4); 649s ***** test 649s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 649s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 649s assert (idx, {[1, 2]; [1, 2, 3]}); 649s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 649s assert (idx, {[1, 2]; [1, 2, 3]}); 649s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 649s ***** test 649s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 649s "NSMethod", "exhaustive"); 649s assert (idx, {[1, 2]; [1, 2, 3]}); 649s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 649s ***** error rangesearch (1) 649s ***** error ... 649s rangesearch (ones (4, 5), ones (4)) 649s ***** error ... 649s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "P",-2) 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 649s ***** error ... 649s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 649s 31 tests, 31 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/jsucdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/jsucdf.m 649s ***** error jsucdf () 649s ***** error jsucdf (1, 2, 3, 4) 649s ***** error ... 649s jsucdf (1, ones (2), ones (3)) 649s 3 tests, 3 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/cauchypdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/cauchypdf.m 649s ***** demo 649s ## Plot various PDFs from the Cauchy distribution 649s x = -5:0.01:5; 649s y1 = cauchypdf (x, 0, 0.5); 649s y2 = cauchypdf (x, 0, 1); 649s y3 = cauchypdf (x, 0, 2); 649s y4 = cauchypdf (x, -2, 1); 649s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 649s grid on 649s xlim ([-5, 5]) 649s ylim ([0, 0.7]) 649s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 649s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 649s title ("Cauchy PDF") 649s xlabel ("values in x") 649s ylabel ("density") 649s ***** shared x, y 649s x = [-1 0 0.5 1 2]; 649s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 649s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 649s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 649s ***** assert (cauchypdf (x, ones (1,5), 2), y) 649s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 649s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 649s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 649s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 649s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 649s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 649s ***** test 649s x = rand (10, 1); 649s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 649s ***** error cauchypdf () 649s ***** error cauchypdf (1) 649s ***** error ... 649s cauchypdf (1, 2) 649s ***** error cauchypdf (1, 2, 3, 4) 649s ***** error ... 649s cauchypdf (ones (3), ones (2), ones(2)) 649s ***** error ... 649s cauchypdf (ones (2), ones (3), ones(2)) 649s ***** error ... 649s cauchypdf (ones (2), ones (2), ones(3)) 649s ***** error cauchypdf (i, 4, 3) 649s ***** error cauchypdf (1, i, 3) 649s ***** error cauchypdf (1, 4, i) 649s 20 tests, 20 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/fcdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/fcdf.m 649s ***** demo 649s ## Plot various CDFs from the F distribution 649s x = 0.01:0.01:4; 649s p1 = fcdf (x, 1, 2); 649s p2 = fcdf (x, 2, 1); 649s p3 = fcdf (x, 5, 2); 649s p4 = fcdf (x, 10, 1); 649s p5 = fcdf (x, 100, 100); 649s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 649s grid on 649s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 649s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 649s "df1 = 100, df2 = 100"}, "location", "southeast") 649s title ("F CDF") 649s xlabel ("values in x") 649s ylabel ("probability") 649s ***** shared x, y 649s x = [-1, 0, 0.5, 1, 2, Inf]; 649s y = [0, 0, 1/3, 1/2, 2/3, 1]; 649s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 649s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 649s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 649s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 649s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 649s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 649s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 649s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 649s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 649s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 649s ***** error fcdf () 649s ***** error fcdf (1) 649s ***** error fcdf (1, 2) 649s ***** error fcdf (1, 2, 3, 4) 649s ***** error fcdf (1, 2, 3, "tail") 649s ***** error ... 649s fcdf (ones (3), ones (2), ones (2)) 649s ***** error ... 649s fcdf (ones (2), ones (3), ones (2)) 649s ***** error ... 649s fcdf (ones (2), ones (2), ones (3)) 649s ***** error fcdf (i, 2, 2) 649s ***** error fcdf (2, i, 2) 649s ***** error fcdf (2, 2, i) 649s 21 tests, 21 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/laplacernd.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/laplacernd.m 649s ***** assert (size (laplacernd (1, 1)), [1 1]) 649s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 649s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 649s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 649s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 649s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 649s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 649s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 649s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 649s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 649s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 649s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 649s ***** assert (class (laplacernd (1, 1)), "double") 649s ***** assert (class (laplacernd (1, single (1))), "single") 649s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 649s ***** assert (class (laplacernd (single (1), 1)), "single") 649s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 649s ***** error laplacernd () 649s ***** error laplacernd (1) 649s ***** error ... 649s laplacernd (ones (3), ones (2)) 649s ***** error ... 649s laplacernd (ones (2), ones (3)) 649s ***** error laplacernd (i, 2, 3) 649s ***** error laplacernd (1, i, 3) 649s ***** error ... 649s laplacernd (1, 2, -1) 649s ***** error ... 649s laplacernd (1, 2, 1.2) 649s ***** error ... 649s laplacernd (1, 2, ones (2)) 649s ***** error ... 649s laplacernd (1, 2, [2 -1 2]) 649s ***** error ... 649s laplacernd (1, 2, [2 0 2.5]) 649s ***** error ... 649s laplacernd (1, 2, 2, -1, 5) 649s ***** error ... 649s laplacernd (1, 2, 2, 1.5, 5) 649s ***** error ... 649s laplacernd (2, ones (2), 3) 649s ***** error ... 649s laplacernd (2, ones (2), [3, 2]) 649s ***** error ... 649s laplacernd (2, ones (2), 3, 2) 649s 33 tests, 33 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/hnrnd.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hnrnd.m 649s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 649s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 649s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 649s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 649s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 649s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 649s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 649s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 649s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 649s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 649s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 649s ***** test 649s r = hnrnd (1, [1, 0, -1]); 649s assert (r([2:3]), [NaN, NaN]) 649s ***** assert (class (hnrnd (1, 0)), "double") 649s ***** assert (class (hnrnd (1, single (0))), "single") 649s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 649s ***** assert (class (hnrnd (1, single (1))), "single") 649s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 649s ***** assert (class (hnrnd (single (1), 1)), "single") 649s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 649s ***** error hnrnd () 649s ***** error hnrnd (1) 649s ***** error ... 649s hnrnd (ones (3), ones (2)) 649s ***** error ... 649s hnrnd (ones (2), ones (3)) 649s ***** error hnrnd (i, 2, 3) 649s ***** error hnrnd (1, i, 3) 649s ***** error ... 649s hnrnd (1, 2, -1) 649s ***** error ... 649s hnrnd (1, 2, 1.2) 649s ***** error ... 649s hnrnd (1, 2, ones (2)) 649s ***** error ... 649s hnrnd (1, 2, [2 -1 2]) 649s ***** error ... 649s hnrnd (1, 2, [2 0 2.5]) 649s ***** error ... 649s hnrnd (1, 2, 2, -1, 5) 649s ***** error ... 649s hnrnd (1, 2, 2, 1.5, 5) 649s ***** error ... 649s hnrnd (2, ones (2), 3) 649s ***** error ... 649s hnrnd (2, ones (2), [3, 2]) 649s ***** error ... 649s hnrnd (2, ones (2), 3, 2) 649s 35 tests, 35 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/ricecdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ricecdf.m 649s ***** demo 649s ## Plot various CDFs from the Rician distribution 649s x = 0:0.01:10; 649s p1 = ricecdf (x, 0, 1); 649s p2 = ricecdf (x, 0.5, 1); 649s p3 = ricecdf (x, 1, 1); 649s p4 = ricecdf (x, 2, 1); 649s p5 = ricecdf (x, 4, 1); 649s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 649s grid on 649s ylim ([0, 1]) 649s xlim ([0, 8]) 649s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 649s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 649s title ("Rician CDF") 649s xlabel ("values in x") 649s ylabel ("probability") 649s ***** demo 649s ## Plot various CDFs from the Rician distribution 649s x = 0:0.01:10; 649s p1 = ricecdf (x, 0, 0.5); 649s p2 = ricecdf (x, 0, 2); 649s p3 = ricecdf (x, 0, 3); 649s p4 = ricecdf (x, 2, 2); 649s p5 = ricecdf (x, 4, 2); 649s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 649s grid on 649s ylim ([0, 1]) 649s xlim ([0, 8]) 649s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 649s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 649s title ("Rician CDF") 649s xlabel ("values in x") 649s ylabel ("probability") 649s ***** test 649s x = 0:0.5:2.5; 649s s = 1:6; 649s p = ricecdf (x, s, 1); 649s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 649s assert (p, expected_p, 0.001); 649s ***** test 649s x = 0:0.5:2.5; 649s sigma = 1:6; 649s p = ricecdf (x, 1, sigma); 649s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 649s assert (p, expected_p, 0.001); 649s ***** test 649s x = 0:0.5:2.5; 649s p = ricecdf (x, 0, 1); 649s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 649s assert (p, expected_p, 0.001); 649s ***** test 649s x = 0:0.5:2.5; 649s p = ricecdf (x, 1, 1); 649s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 649s assert (p, expected_p, 0.001); 649s ***** shared x, p 649s x = [-1, 0, 1, 2, Inf]; 649s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 649s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 649s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 649s ***** error ricecdf () 649s ***** error ricecdf (1) 649s ***** error ricecdf (1, 2) 649s ***** error ricecdf (1, 2, 3, "uper") 649s ***** error ricecdf (1, 2, 3, 4) 649s ***** error ... 649s ricecdf (ones (3), ones (2), ones (2)) 649s ***** error ... 649s ricecdf (ones (2), ones (3), ones (2)) 649s ***** error ... 649s ricecdf (ones (2), ones (2), ones (3)) 649s ***** error ricecdf (i, 2, 3) 649s ***** error ricecdf (2, i, 3) 649s ***** error ricecdf (2, 2, i) 649s 17 tests, 17 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/evrnd.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/evrnd.m 649s ***** assert (size (evrnd (1, 1)), [1 1]) 649s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 649s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 649s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 649s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 649s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 649s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 649s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 649s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 649s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 649s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 649s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 649s ***** assert (class (evrnd (1, 1)), "double") 649s ***** assert (class (evrnd (1, single (1))), "single") 649s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 649s ***** assert (class (evrnd (single (1), 1)), "single") 649s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 649s ***** error evrnd () 649s ***** error evrnd (1) 649s ***** error ... 649s evrnd (ones (3), ones (2)) 649s ***** error ... 649s evrnd (ones (2), ones (3)) 649s ***** error evrnd (i, 2, 3) 649s ***** error evrnd (1, i, 3) 649s ***** error ... 649s evrnd (1, 2, -1) 649s ***** error ... 649s evrnd (1, 2, 1.2) 649s ***** error ... 649s evrnd (1, 2, ones (2)) 649s ***** error ... 649s evrnd (1, 2, [2 -1 2]) 649s ***** error ... 649s evrnd (1, 2, [2 0 2.5]) 649s ***** error ... 649s evrnd (1, 2, 2, -1, 5) 649s ***** error ... 649s evrnd (1, 2, 2, 1.5, 5) 649s ***** error ... 649s evrnd (2, ones (2), 3) 649s ***** error ... 649s evrnd (2, ones (2), [3, 2]) 649s ***** error ... 649s evrnd (2, ones (2), 3, 2) 649s 33 tests, 33 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/logncdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logncdf.m 649s ***** demo 649s ## Plot various CDFs from the log-normal distribution 649s x = 0:0.01:3; 649s p1 = logncdf (x, 0, 1); 649s p2 = logncdf (x, 0, 0.5); 649s p3 = logncdf (x, 0, 0.25); 649s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 649s grid on 649s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 649s "location", "southeast") 649s title ("Log-normal CDF") 649s xlabel ("values in x") 649s ylabel ("probability") 649s ***** shared x, y 649s x = [-1, 0, 1, e, Inf]; 649s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 649s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 649s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 649s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 649s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 649s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 649s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 649s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 649s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 649s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 649s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 649s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 649s ***** error logncdf () 649s ***** error logncdf (1,2,3,4,5,6,7) 649s ***** error logncdf (1, 2, 3, 4, "uper") 649s ***** error ... 649s logncdf (ones (3), ones (2), ones (2)) 649s ***** error logncdf (2, 3, 4, [1, 2]) 649s ***** error ... 649s [p, plo, pup] = logncdf (1, 2, 3) 649s ***** error [p, plo, pup] = ... 649s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 649s ***** error [p, plo, pup] = ... 649s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 649s ***** error [p, plo, pup] = ... 649s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 649s ***** error logncdf (i, 2, 2) 649s ***** error logncdf (2, i, 2) 649s ***** error logncdf (2, 2, i) 649s ***** error ... 649s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 649s 24 tests, 24 passed, 0 known failure, 0 skipped 649s [inst/dist_fun/iwishpdf.m] 649s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/iwishpdf.m 649s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 649s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 649s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 649s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 649s ***** error iwishpdf () 649s ***** error iwishpdf (1, 2) 650s ***** error iwishpdf (1, 2, 0) 650s 6 tests, 6 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/invgcdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/invgcdf.m 650s ***** demo 650s ## Plot various CDFs from the inverse Gaussian distribution 650s x = 0:0.001:3; 650s p1 = invgcdf (x, 1, 0.2); 650s p2 = invgcdf (x, 1, 1); 650s p3 = invgcdf (x, 1, 3); 650s p4 = invgcdf (x, 3, 0.2); 650s p5 = invgcdf (x, 3, 1); 650s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 650s grid on 650s xlim ([0, 3]) 650s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 650s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 650s title ("Inverse Gaussian CDF") 650s xlabel ("values in x") 650s ylabel ("probability") 650s ***** shared x, p1, p1u, y2, y2u, y3, y3u 650s x = [-Inf, -1, 0, 1/2, 1, Inf]; 650s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 650s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 650s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 650s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 650s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 650s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 650s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 650s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 650s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 650s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 650s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 650s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 650s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 650s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 650s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 650s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 650s ***** error invgcdf () 650s ***** error invgcdf (1) 650s ***** error invgcdf (1, 2) 650s ***** error invgcdf (1, 2, 3, "tail") 650s ***** error invgcdf (1, 2, 3, 5) 650s ***** error ... 650s invgcdf (ones (3), ones (2), ones(2)) 650s ***** error ... 650s invgcdf (ones (2), ones (3), ones(2)) 650s ***** error ... 650s invgcdf (ones (2), ones (2), ones(3)) 650s ***** error invgcdf (i, 2, 3) 650s ***** error invgcdf (1, i, 3) 650s ***** error invgcdf (1, 2, i) 650s 25 tests, 25 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/betarnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/betarnd.m 650s ***** assert (size (betarnd (2, 1/2)), [1 1]) 650s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 650s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 650s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 650s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 650s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 650s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 650s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 650s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (betarnd (1, 1)), "double") 650s ***** assert (class (betarnd (1, single (0))), "single") 650s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 650s ***** assert (class (betarnd (1, single (1), 2)), "single") 650s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 650s ***** assert (class (betarnd (single (1), 1, 2)), "single") 650s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 650s ***** error betarnd () 650s ***** error betarnd (1) 650s ***** error ... 650s betarnd (ones (3), ones (2)) 650s ***** error ... 650s betarnd (ones (2), ones (3)) 650s ***** error betarnd (i, 2) 650s ***** error betarnd (1, i) 650s ***** error ... 650s betarnd (1, 1/2, -1) 650s ***** error ... 650s betarnd (1, 1/2, 1.2) 650s ***** error ... 650s betarnd (1, 1/2, ones (2)) 650s ***** error ... 650s betarnd (1, 1/2, [2 -1 2]) 650s ***** error ... 650s betarnd (1, 1/2, [2 0 2.5]) 650s ***** error ... 650s betarnd (1, 1/2, 2, -1, 5) 650s ***** error ... 650s betarnd (1, 1/2, 2, 1.5, 5) 650s ***** error ... 650s betarnd (2, 1/2 * ones (2), 3) 650s ***** error ... 650s betarnd (2, 1/2 * ones (2), [3, 2]) 650s ***** error ... 650s betarnd (2, 1/2 * ones (2), 3, 2) 650s ***** error ... 650s betarnd (2 * ones (2), 1/2, 3) 650s ***** error ... 650s betarnd (2 * ones (2), 1/2, [3, 2]) 650s ***** error ... 650s betarnd (2 * ones (2), 1/2, 3, 2) 650s 40 tests, 40 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/loglrnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/loglrnd.m 650s ***** assert (size (loglrnd (1, 1)), [1 1]) 650s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 650s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 650s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 650s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 650s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 650s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (loglrnd (1, 1)), "double") 650s ***** assert (class (loglrnd (1, single (1))), "single") 650s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 650s ***** assert (class (loglrnd (single (1), 1)), "single") 650s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 650s ***** error loglrnd () 650s ***** error loglrnd (1) 650s ***** error ... 650s loglrnd (ones (3), ones (2)) 650s ***** error ... 650s loglrnd (ones (2), ones (3)) 650s ***** error loglrnd (i, 2, 3) 650s ***** error loglrnd (1, i, 3) 650s ***** error ... 650s loglrnd (1, 2, -1) 650s ***** error ... 650s loglrnd (1, 2, 1.2) 650s ***** error ... 650s loglrnd (1, 2, ones (2)) 650s ***** error ... 650s loglrnd (1, 2, [2 -1 2]) 650s ***** error ... 650s loglrnd (1, 2, [2 0 2.5]) 650s ***** error ... 650s loglrnd (1, 2, 2, -1, 5) 650s ***** error ... 650s loglrnd (1, 2, 2, 1.5, 5) 650s ***** error ... 650s loglrnd (2, ones (2), 3) 650s ***** error ... 650s loglrnd (2, ones (2), [3, 2]) 650s ***** error ... 650s loglrnd (2, ones (2), 3, 2) 650s 33 tests, 33 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/gevpdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gevpdf.m 650s ***** demo 650s ## Plot various PDFs from the generalized extreme value distribution 650s x = -1:0.001:10; 650s y1 = gevpdf (x, 1, 1, 1); 650s y2 = gevpdf (x, 0.5, 1, 1); 650s y3 = gevpdf (x, 1, 1, 5); 650s y4 = gevpdf (x, 1, 2, 5); 650s y5 = gevpdf (x, 1, 5, 5); 650s y6 = gevpdf (x, 1, 0.5, 5); 650s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 650s x, y4, "-c", x, y5, "-m", x, y6, "-k") 650s grid on 650s xlim ([-1, 10]) 650s ylim ([0, 1.1]) 650s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 650s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 650s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 650s "location", "northeast") 650s title ("Generalized extreme value PDF") 650s xlabel ("values in x") 650s ylabel ("density") 650s ***** test 650s x = 0:0.5:2.5; 650s sigma = 1:6; 650s k = 1; 650s mu = 0; 650s y = gevpdf (x, k, sigma, mu); 650s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 650s assert (y, expected_y, 0.001); 650s ***** test 650s x = -0.5:0.5:2.5; 650s sigma = 0.5; 650s k = 1; 650s mu = 0; 650s y = gevpdf (x, k, sigma, mu); 650s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 650s assert (y, expected_y, 0.001); 650s ***** test # check for continuity for k near 0 650s x = 1; 650s sigma = 0.5; 650s k = -0.03:0.01:0.03; 650s mu = 0; 650s y = gevpdf (x, k, sigma, mu); 650s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 650s assert (y, expected_y, 0.001); 650s ***** error gevpdf () 650s ***** error gevpdf (1) 650s ***** error gevpdf (1, 2) 650s ***** error gevpdf (1, 2, 3) 650s ***** error ... 650s gevpdf (ones (3), ones (2), ones(2), ones(2)) 650s ***** error ... 650s gevpdf (ones (2), ones (3), ones(2), ones(2)) 650s ***** error ... 650s gevpdf (ones (2), ones (2), ones(3), ones(2)) 650s ***** error ... 650s gevpdf (ones (2), ones (2), ones(2), ones(3)) 650s ***** error gevpdf (i, 2, 3, 4) 650s ***** error gevpdf (1, i, 3, 4) 650s ***** error gevpdf (1, 2, i, 4) 650s ***** error gevpdf (1, 2, 3, i) 650s 15 tests, 15 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/invgpdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/invgpdf.m 650s ***** demo 650s ## Plot various PDFs from the inverse Gaussian distribution 650s x = 0:0.001:3; 650s y1 = invgpdf (x, 1, 0.2); 650s y2 = invgpdf (x, 1, 1); 650s y3 = invgpdf (x, 1, 3); 650s y4 = invgpdf (x, 3, 0.2); 650s y5 = invgpdf (x, 3, 1); 650s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 650s grid on 650s xlim ([0, 3]) 650s ylim ([0, 3]) 650s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 650s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 650s title ("Inverse Gaussian PDF") 650s xlabel ("values in x") 650s ylabel ("density") 650s ***** shared x, y 650s x = [-Inf, -1, 0, 1/2, 1, Inf]; 650s y = [0, 0, 0, 0.8788, 0.3989, 0]; 650s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 650s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 650s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 650s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 650s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 650s ***** error invgpdf () 650s ***** error invgpdf (1) 650s ***** error invgpdf (1, 2) 650s ***** error ... 650s invgpdf (1, ones (2), ones (3)) 650s ***** error ... 650s invgpdf (ones (2), 1, ones (3)) 650s ***** error ... 650s invgpdf (ones (2), ones (3), 1) 650s ***** error invgpdf (i, 2, 3) 650s ***** error invgpdf (1, i, 3) 650s ***** error invgpdf (1, 2, i) 650s 14 tests, 14 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/nakarnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nakarnd.m 650s ***** assert (size (nakarnd (1, 1)), [1 1]) 650s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 650s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 650s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 650s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 650s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 650s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (nakarnd (1, 1)), "double") 650s ***** assert (class (nakarnd (1, single (1))), "single") 650s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 650s ***** assert (class (nakarnd (single (1), 1)), "single") 650s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 650s ***** error nakarnd () 650s ***** error nakarnd (1) 650s ***** error ... 650s nakarnd (ones (3), ones (2)) 650s ***** error ... 650s nakarnd (ones (2), ones (3)) 650s ***** error nakarnd (i, 2, 3) 650s ***** error nakarnd (1, i, 3) 650s ***** error ... 650s nakarnd (1, 2, -1) 650s ***** error ... 650s nakarnd (1, 2, 1.2) 650s ***** error ... 650s nakarnd (1, 2, ones (2)) 650s ***** error ... 650s nakarnd (1, 2, [2 -1 2]) 650s ***** error ... 650s nakarnd (1, 2, [2 0 2.5]) 650s ***** error ... 650s nakarnd (1, 2, 2, -1, 5) 650s ***** error ... 650s nakarnd (1, 2, 2, 1.5, 5) 650s ***** error ... 650s nakarnd (2, ones (2), 3) 650s ***** error ... 650s nakarnd (2, ones (2), [3, 2]) 650s ***** error ... 650s nakarnd (2, ones (2), 3, 2) 650s 33 tests, 33 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/wblrnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wblrnd.m 650s ***** assert (size (wblrnd (1, 1)), [1 1]) 650s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 650s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 650s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 650s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 650s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 650s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (wblrnd (1, 1)), "double") 650s ***** assert (class (wblrnd (1, single (1))), "single") 650s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 650s ***** assert (class (wblrnd (single (1), 1)), "single") 650s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 650s ***** error wblrnd () 650s ***** error wblrnd (1) 650s ***** error ... 650s wblrnd (ones (3), ones (2)) 650s ***** error ... 650s wblrnd (ones (2), ones (3)) 650s ***** error wblrnd (i, 2, 3) 650s ***** error wblrnd (1, i, 3) 650s ***** error ... 650s wblrnd (1, 2, -1) 650s ***** error ... 650s wblrnd (1, 2, 1.2) 650s ***** error ... 650s wblrnd (1, 2, ones (2)) 650s ***** error ... 650s wblrnd (1, 2, [2 -1 2]) 650s ***** error ... 650s wblrnd (1, 2, [2 0 2.5]) 650s ***** error ... 650s wblrnd (1, 2, 2, -1, 5) 650s ***** error ... 650s wblrnd (1, 2, 2, 1.5, 5) 650s ***** error ... 650s wblrnd (2, ones (2), 3) 650s ***** error ... 650s wblrnd (2, ones (2), [3, 2]) 650s ***** error ... 650s wblrnd (2, ones (2), 3, 2) 650s 33 tests, 33 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/poisscdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/poisscdf.m 650s ***** demo 650s ## Plot various CDFs from the Poisson distribution 650s x = 0:20; 650s p1 = poisscdf (x, 1); 650s p2 = poisscdf (x, 4); 650s p3 = poisscdf (x, 10); 650s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 650s grid on 650s ylim ([0, 1]) 650s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 650s title ("Poisson CDF") 650s xlabel ("values in x (number of occurences)") 650s ylabel ("probability") 650s ***** shared x, y 650s x = [-1 0 1 2 Inf]; 650s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 650s ***** assert (poisscdf (x, ones (1,5)), y) 650s ***** assert (poisscdf (x, 1), y) 650s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 650s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 650s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 650s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 650s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 650s ***** error poisscdf () 650s ***** error poisscdf (1) 650s ***** error poisscdf (1, 2, 3) 650s ***** error poisscdf (1, 2, "tail") 650s ***** error ... 650s poisscdf (ones (3), ones (2)) 650s ***** error ... 650s poisscdf (ones (2), ones (3)) 650s ***** error poisscdf (i, 2) 650s ***** error poisscdf (2, i) 650s 15 tests, 15 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/jsupdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/jsupdf.m 650s ***** error jsupdf () 650s ***** error jsupdf (1, 2, 3, 4) 650s ***** error ... 650s jsupdf (1, ones (2), ones (3)) 650s 3 tests, 3 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/laplaceinv.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/laplaceinv.m 650s ***** demo 650s ## Plot various iCDFs from the Laplace distribution 650s p = 0.001:0.001:0.999; 650s x1 = cauchyinv (p, 0, 1); 650s x2 = cauchyinv (p, 0, 2); 650s x3 = cauchyinv (p, 0, 4); 650s x4 = cauchyinv (p, -5, 4); 650s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 650s grid on 650s ylim ([-10, 10]) 650s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 650s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 650s title ("Laplace iCDF") 650s xlabel ("probability") 650s ylabel ("values in x") 650s ***** shared p, x 650s p = [-1 0 0.5 1 2]; 650s x = [NaN, -Inf, 0, Inf, NaN]; 650s ***** assert (laplaceinv (p, 0, 1), x) 650s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 650s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 650s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 650s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 650s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 650s ***** error laplaceinv () 650s ***** error laplaceinv (1) 650s ***** error ... 650s laplaceinv (1, 2) 650s ***** error laplaceinv (1, 2, 3, 4) 650s ***** error ... 650s laplaceinv (1, ones (2), ones (3)) 650s ***** error ... 650s laplaceinv (ones (2), 1, ones (3)) 650s ***** error ... 650s laplaceinv (ones (2), ones (3), 1) 650s ***** error laplaceinv (i, 2, 3) 650s ***** error laplaceinv (1, i, 3) 650s ***** error laplaceinv (1, 2, i) 650s 16 tests, 16 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/nbincdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nbincdf.m 650s ***** demo 650s ## Plot various CDFs from the negative binomial distribution 650s x = 0:50; 650s p1 = nbincdf (x, 2, 0.15); 650s p2 = nbincdf (x, 5, 0.2); 650s p3 = nbincdf (x, 4, 0.4); 650s p4 = nbincdf (x, 10, 0.3); 650s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 650s grid on 650s xlim ([0, 40]) 650s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 650s "r = 10, ps = 0.3"}, "location", "southeast") 650s title ("Negative binomial CDF") 650s xlabel ("values in x (number of failures)") 650s ylabel ("probability") 650s ***** shared x, y 650s x = [-1 0 1 2 Inf]; 650s y = [0 1/2 3/4 7/8 1]; 650s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 650s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 650s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 650s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 650s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 650s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 650s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 650s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 650s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 650s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 650s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 650s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 650s ***** error nbincdf () 650s ***** error nbincdf (1) 650s ***** error nbincdf (1, 2) 650s ***** error nbincdf (1, 2, 3, 4) 650s ***** error nbincdf (1, 2, 3, "some") 650s ***** error ... 650s nbincdf (ones (3), ones (2), ones (2)) 650s ***** error ... 650s nbincdf (ones (2), ones (3), ones (2)) 650s ***** error ... 650s nbincdf (ones (2), ones (2), ones (3)) 650s ***** error nbincdf (i, 2, 2) 650s ***** error nbincdf (2, i, 2) 650s ***** error nbincdf (2, 2, i) 650s 22 tests, 22 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/ncfrnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncfrnd.m 650s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 650s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 650s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 650s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 650s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 650s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 650s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (ncfrnd (1, 1, 1)), "double") 650s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 650s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 650s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 650s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 650s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 650s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 650s ***** error ncfrnd () 650s ***** error ncfrnd (1) 650s ***** error ncfrnd (1, 2) 650s ***** error ... 650s ncfrnd (ones (3), ones (2), ones (2)) 650s ***** error ... 650s ncfrnd (ones (2), ones (3), ones (2)) 650s ***** error ... 650s ncfrnd (ones (2), ones (2), ones (3)) 650s ***** error ncfrnd (i, 2, 3) 650s ***** error ncfrnd (1, i, 3) 650s ***** error ncfrnd (1, 2, i) 650s ***** error ... 650s ncfrnd (1, 2, 3, -1) 650s ***** error ... 650s ncfrnd (1, 2, 3, 1.2) 650s ***** error ... 650s ncfrnd (1, 2, 3, ones (2)) 650s ***** error ... 650s ncfrnd (1, 2, 3, [2 -1 2]) 650s ***** error ... 650s ncfrnd (1, 2, 3, [2 0 2.5]) 650s ***** error ... 650s ncfrnd (1, 2, 3, 2, -1, 5) 650s ***** error ... 650s ncfrnd (1, 2, 3, 2, 1.5, 5) 650s ***** error ... 650s ncfrnd (2, ones (2), 2, 3) 650s ***** error ... 650s ncfrnd (2, ones (2), 2, [3, 2]) 650s ***** error ... 650s ncfrnd (2, ones (2), 2, 3, 2) 650s 38 tests, 38 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/bvncdf.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bvncdf.m 650s ***** demo 650s mu = [1, -1]; 650s sigma = [0.9, 0.4; 0.4, 0.3]; 650s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 650s x = [X1(:), X2(:)]; 650s p = bvncdf (x, mu, sigma); 650s Z = reshape (p, 25, 25); 650s surf (X1, X2, Z); 650s title ("Bivariate Normal Distribution"); 650s ylabel "X1" 650s xlabel "X2" 650s ***** test 650s mu = [1, -1]; 650s sigma = [0.9, 0.4; 0.4, 0.3]; 650s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 650s x = [X1(:), X2(:)]; 650s p = bvncdf (x, mu, sigma); 650s p_out = [0.00011878988774500, 0.00034404112322371, ... 650s 0.00087682502191813, 0.00195221905058185, ... 650s 0.00378235566873474, 0.00638175749734415, ... 650s 0.00943764224329656, 0.01239164888125426, ... 650s 0.01472750274376648, 0.01623228313374828]'; 650s assert (p([1:10]), p_out, 1e-16); 650s ***** test 650s mu = [1, -1]; 650s sigma = [0.9, 0.4; 0.4, 0.3]; 650s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 650s x = [X1(:), X2(:)]; 650s p = bvncdf (x, mu, sigma); 650s p_out = [0.8180695783608276, 0.8854485749482751, ... 650s 0.9308108777385832, 0.9579855743025508, ... 650s 0.9722897881414742, 0.9788150170059926, ... 650s 0.9813597788804785, 0.9821977956568989, ... 650s 0.9824283794464095, 0.9824809345614861]'; 650s assert (p([616:625]), p_out, 3e-16); 650s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 650s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 650s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 650s 5 tests, 5 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/gpinv.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gpinv.m 650s ***** demo 650s ## Plot various iCDFs from the generalized Pareto distribution 650s p = 0.001:0.001:0.999; 650s x1 = gpinv (p, 1, 1, 0); 650s x2 = gpinv (p, 5, 1, 0); 650s x3 = gpinv (p, 20, 1, 0); 650s x4 = gpinv (p, 1, 2, 0); 650s x5 = gpinv (p, 5, 2, 0); 650s x6 = gpinv (p, 20, 2, 0); 650s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 650s p, x4, "-c", p, x5, "-m", p, x6, "-k") 650s grid on 650s ylim ([0, 5]) 650s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 650s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 650s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 650s "location", "southeast") 650s title ("Generalized Pareto iCDF") 650s xlabel ("probability") 650s ylabel ("values in x") 650s ***** shared p, y1, y2, y3 650s p = [-1, 0, 1/2, 1, 2]; 650s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 650s y2 = [NaN, 0, 1, Inf, NaN]; 650s y3 = [NaN, 0, 1/2, 1, NaN]; 650s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 650s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 650s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 650s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 650s ***** assert (gpinv (p, 0, 1, 0), y1) 650s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 650s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 650s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 650s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 650s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 650s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 650s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 650s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 650s ***** assert (gpinv (p, 1, 1, 0), y2) 650s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 650s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 650s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 650s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 650s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 650s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 650s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 650s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 650s ***** assert (gpinv (p, -1, 1, 0), y3) 650s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 650s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 650s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 650s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 650s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 650s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 650s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 650s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 650s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 650s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 650s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 650s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 650s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 650s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 650s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 650s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 650s ***** error gpinv () 650s ***** error gpinv (1) 650s ***** error gpinv (1, 2) 650s ***** error gpinv (1, 2, 3) 650s ***** error ... 650s gpinv (ones (3), ones (2), ones(2), ones(2)) 650s ***** error ... 650s gpinv (ones (2), ones (3), ones(2), ones(2)) 650s ***** error ... 650s gpinv (ones (2), ones (2), ones(3), ones(2)) 650s ***** error ... 650s gpinv (ones (2), ones (2), ones(2), ones(3)) 650s ***** error gpinv (i, 2, 3, 4) 650s ***** error gpinv (1, i, 3, 4) 650s ***** error gpinv (1, 2, i, 4) 650s ***** error gpinv (1, 2, 3, i) 650s 51 tests, 51 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/logirnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logirnd.m 650s ***** assert (size (logirnd (1, 1)), [1 1]) 650s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 650s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 650s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 650s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 650s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 650s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 650s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 650s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 650s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 650s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 650s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 650s ***** assert (class (logirnd (1, 1)), "double") 650s ***** assert (class (logirnd (1, single (1))), "single") 650s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 650s ***** assert (class (logirnd (single (1), 1)), "single") 650s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 650s ***** error logirnd () 650s ***** error logirnd (1) 650s ***** error ... 650s logirnd (ones (3), ones (2)) 650s ***** error ... 650s logirnd (ones (2), ones (3)) 650s ***** error logirnd (i, 2, 3) 650s ***** error logirnd (1, i, 3) 650s ***** error ... 650s logirnd (1, 2, -1) 650s ***** error ... 650s logirnd (1, 2, 1.2) 650s ***** error ... 650s logirnd (1, 2, ones (2)) 650s ***** error ... 650s logirnd (1, 2, [2 -1 2]) 650s ***** error ... 650s logirnd (1, 2, [2 0 2.5]) 650s ***** error ... 650s logirnd (1, 2, 2, -1, 5) 650s ***** error ... 650s logirnd (1, 2, 2, 1.5, 5) 650s ***** error ... 650s logirnd (2, ones (2), 3) 650s ***** error ... 650s logirnd (2, ones (2), [3, 2]) 650s ***** error ... 650s logirnd (2, ones (2), 3, 2) 650s 33 tests, 33 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/tlsinv.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tlsinv.m 650s ***** demo 650s ## Plot various iCDFs from the location-scale Student's T distribution 650s p = 0.001:0.001:0.999; 650s x1 = tlsinv (p, 0, 1, 1); 650s x2 = tlsinv (p, 0, 2, 2); 650s x3 = tlsinv (p, 3, 2, 5); 650s x4 = tlsinv (p, -1, 3, Inf); 650s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 650s grid on 650s xlim ([0, 1]) 650s ylim ([-8, 8]) 650s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 650s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 650s "location", "southeast") 650s title ("Location-scale Student's T iCDF") 650s xlabel ("probability") 650s ylabel ("values in x") 650s ***** shared p 650s p = [-1 0 0.5 1 2]; 650s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 650s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 650s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 650s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 650s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 650s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 650s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 650s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 650s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 650s ***** error tlsinv () 650s ***** error tlsinv (1) 650s ***** error tlsinv (1, 2) 650s ***** error tlsinv (1, 2, 3) 650s ***** error ... 650s tlsinv (ones (3), ones (2), 1, 1) 650s ***** error ... 650s tlsinv (ones (2), 1, ones (3), 1) 650s ***** error ... 650s tlsinv (ones (2), 1, 1, ones (3)) 650s ***** error tlsinv (i, 2, 3, 4) 650s ***** error tlsinv (2, i, 3, 4) 650s ***** error tlsinv (2, 2, i, 4) 650s ***** error tlsinv (2, 2, 3, i) 650s 20 tests, 20 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/gprnd.m] 650s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gprnd.m 650s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 650s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 650s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 650s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 650s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 650s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 650s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 650s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 650s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 650s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 650s ***** assert (size (gprnd (1,1,0)), [1, 1]) 650s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 650s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 650s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 650s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 650s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 650s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 650s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 650s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 650s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 650s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 650s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 650s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 650s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 650s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 650s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 650s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 650s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 650s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 650s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 650s ***** assert (class (gprnd (0, 1, 0)), "double") 650s ***** assert (class (gprnd (0, 1, single (0))), "single") 650s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 650s ***** assert (class (gprnd (0, single (1),0)), "single") 650s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 650s ***** assert (class (gprnd (single (0), 1, 0)), "single") 650s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 650s ***** error gprnd () 650s ***** error gprnd (1) 650s ***** error gprnd (1, 2) 650s ***** error ... 650s gprnd (ones (3), ones (2), ones (2)) 650s ***** error ... 650s gprnd (ones (2), ones (3), ones (2)) 650s ***** error ... 650s gprnd (ones (2), ones (2), ones (3)) 650s ***** error gprnd (i, 2, 3) 650s ***** error gprnd (1, i, 3) 650s ***** error gprnd (1, 2, i) 650s ***** error ... 650s gprnd (1, 2, 3, -1) 650s ***** error ... 650s gprnd (1, 2, 3, 1.2) 650s ***** error ... 650s gprnd (1, 2, 3, ones (2)) 650s ***** error ... 650s gprnd (1, 2, 3, [2 -1 2]) 650s ***** error ... 650s gprnd (1, 2, 3, [2 0 2.5]) 650s ***** error ... 650s gprnd (1, 2, 3, 2, -1, 5) 650s ***** error ... 650s gprnd (1, 2, 3, 2, 1.5, 5) 650s ***** error ... 650s gprnd (2, ones (2), 2, 3) 650s ***** error ... 650s gprnd (2, ones (2), 2, [3, 2]) 650s ***** error ... 650s gprnd (2, ones (2), 2, 3, 2) 650s 56 tests, 56 passed, 0 known failure, 0 skipped 650s [inst/dist_fun/wblpdf.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wblpdf.m 651s ***** demo 651s ## Plot various PDFs from the Weibul distribution 651s x = 0:0.001:2.5; 651s y1 = wblpdf (x, 1, 0.5); 651s y2 = wblpdf (x, 1, 1); 651s y3 = wblpdf (x, 1, 1.5); 651s y4 = wblpdf (x, 1, 5); 651s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 651s grid on 651s ylim ([0, 2.5]) 651s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 651s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 651s title ("Weibul PDF") 651s xlabel ("values in x") 651s ylabel ("density") 651s ***** shared x,y 651s x = [-1 0 0.5 1 Inf]; 651s y = [0, exp(-x(2:4)), NaN]; 651s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 651s ***** assert (wblpdf (x, 1, ones (1,5)), y) 651s ***** assert (wblpdf (x, ones (1,5), 1), y) 651s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 651s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 651s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 651s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 651s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 651s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 651s ***** error wblpdf () 651s ***** error wblpdf (1,2,3,4) 651s ***** error wblpdf (ones (3), ones (2), ones (2)) 651s ***** error wblpdf (ones (2), ones (3), ones (2)) 651s ***** error wblpdf (ones (2), ones (2), ones (3)) 651s ***** error wblpdf (i, 2, 2) 651s ***** error wblpdf (2, i, 2) 651s ***** error wblpdf (2, 2, i) 651s 17 tests, 17 passed, 0 known failure, 0 skipped 651s [inst/dist_fun/hygernd.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hygernd.m 651s ***** assert (size (hygernd (4,2,2)), [1, 1]) 651s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 651s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 651s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 651s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 651s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 651s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 651s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 651s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 651s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 651s ***** assert (class (hygernd (4,2,2)), "double") 651s ***** assert (class (hygernd (single (4),2,2)), "single") 651s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 651s ***** assert (class (hygernd (4,single (2),2)), "single") 651s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 651s ***** assert (class (hygernd (4,2,single (2))), "single") 651s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 651s ***** error hygernd () 651s ***** error hygernd (1) 651s ***** error hygernd (1, 2) 651s ***** error ... 651s hygernd (ones (3), ones (2), ones (2)) 651s ***** error ... 651s hygernd (ones (2), ones (3), ones (2)) 651s ***** error ... 651s hygernd (ones (2), ones (2), ones (3)) 651s ***** error hygernd (i, 2, 3) 651s ***** error hygernd (1, i, 3) 651s ***** error hygernd (1, 2, i) 651s ***** error ... 651s hygernd (1, 2, 3, -1) 651s ***** error ... 651s hygernd (1, 2, 3, 1.2) 651s ***** error ... 651s hygernd (1, 2, 3, ones (2)) 651s ***** error ... 651s hygernd (1, 2, 3, [2 -1 2]) 651s ***** error ... 651s hygernd (1, 2, 3, [2 0 2.5]) 651s ***** error ... 651s hygernd (1, 2, 3, 2, -1, 5) 651s ***** error ... 651s hygernd (1, 2, 3, 2, 1.5, 5) 651s ***** error ... 651s hygernd (2, ones (2), 2, 3) 651s ***** error ... 651s hygernd (2, ones (2), 2, [3, 2]) 651s ***** error ... 651s hygernd (2, ones (2), 2, 3, 2) 651s 36 tests, 36 passed, 0 known failure, 0 skipped 651s [inst/dist_fun/ncx2inv.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncx2inv.m 651s ***** demo 651s ## Plot various iCDFs from the noncentral chi-squared distribution 651s p = 0.001:0.001:0.999; 651s x1 = ncx2inv (p, 2, 1); 651s x2 = ncx2inv (p, 2, 2); 651s x3 = ncx2inv (p, 2, 3); 651s x4 = ncx2inv (p, 4, 1); 651s x5 = ncx2inv (p, 4, 2); 651s x6 = ncx2inv (p, 4, 3); 651s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 651s p, x4, "-m", p, x5, "-c", p, x6, "-y") 651s grid on 651s ylim ([0, 10]) 651s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 651s "df = 2, λ = 3", "df = 4, λ = 1", ... 651s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 651s title ("Noncentral chi-squared iCDF") 651s xlabel ("probability") 651s ylabel ("values in x") 651s ***** demo 651s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 651s ## chi-squared CDF with the same number of degrees of freedom (4). 651s 651s p = 0.001:0.001:0.999; 651s x1 = ncx2inv (p, 4, 2); 651s x2 = chi2inv (p, 4); 651s plot (p, x1, "-", p, x2, "-"); 651s grid on 651s ylim ([0, 10]) 651s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 651s title ("Noncentral chi-squared vs chi-squared quantile functions") 651s xlabel ("probability") 651s ylabel ("values in x") 651s ***** test 651s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 651s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 651s ***** test 651s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 651s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 651s ***** test 651s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 651s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 651s ***** test 651s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 651s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 651s ***** test 651s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 651s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 651s ***** test 651s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 651s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 651s ***** test 651s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 651s ***** error ncx2inv () 651s ***** error ncx2inv (1) 651s ***** error ncx2inv (1, 2) 651s ***** error ... 651s ncx2inv (ones (3), ones (2), ones (2)) 651s ***** error ... 651s ncx2inv (ones (2), ones (3), ones (2)) 651s ***** error ... 651s ncx2inv (ones (2), ones (2), ones (3)) 651s ***** error ncx2inv (i, 2, 2) 651s ***** error ncx2inv (2, i, 2) 651s ***** error ncx2inv (2, 2, i) 651s 16 tests, 16 passed, 0 known failure, 0 skipped 651s [inst/dist_fun/tlspdf.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tlspdf.m 651s ***** demo 651s ## Plot various PDFs from the Student's T distribution 651s x = -8:0.01:8; 651s y1 = tlspdf (x, 0, 1, 1); 651s y2 = tlspdf (x, 0, 2, 2); 651s y3 = tlspdf (x, 3, 2, 5); 651s y4 = tlspdf (x, -1, 3, Inf); 651s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 651s grid on 651s xlim ([-8, 8]) 651s ylim ([0, 0.41]) 651s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 651s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 651s "location", "northwest") 651s title ("Location-scale Student's T PDF") 651s xlabel ("values in x") 651s ylabel ("density") 651s ***** test 651s x = rand (10,1); 651s y = 1./(pi * (1 + x.^2)); 651s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 651s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 651s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 651s ***** shared x, y 651s x = [-Inf 0 0.5 1 Inf]; 651s y = 1./(pi * (1 + x.^2)); 651s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 651s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 651s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 651s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 651s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 651s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 651s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 651s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 651s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 651s ***** error tlspdf () 651s ***** error tlspdf (1) 651s ***** error tlspdf (1, 2) 651s ***** error tlspdf (1, 2, 3) 651s ***** error ... 651s tlspdf (ones (3), ones (2), 1, 1) 651s ***** error ... 651s tlspdf (ones (2), 1, ones (3), 1) 651s ***** error ... 651s tlspdf (ones (2), 1, 1, ones (3)) 651s ***** error tlspdf (i, 2, 1, 1) 651s ***** error tlspdf (2, i, 1, 1) 651s ***** error tlspdf (2, 1, i, 1) 651s ***** error tlspdf (2, 1, 1, i) 651s 21 tests, 21 passed, 0 known failure, 0 skipped 651s [inst/dist_fun/mnpdf.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mnpdf.m 651s ***** test 651s x = [1, 4, 2]; 651s pk = [0.2, 0.5, 0.3]; 651s y = mnpdf (x, pk); 651s assert (y, 0.11812, 0.001); 651s ***** test 651s x = [1, 4, 2; 1, 0, 9]; 651s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 651s y = mnpdf (x, pk); 651s assert (y, [0.11812; 0.13422], 0.001); 651s 2 tests, 2 passed, 0 known failure, 0 skipped 651s [inst/dist_fun/wishrnd.m] 651s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wishrnd.m 651s ***** assert(size (wishrnd (1,2)), [1, 1]); 651s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 651s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 651s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 651s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 651s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 651s ***** error wishrnd () 651s ***** error wishrnd (1) 652s ***** error wishrnd ([1; 1], 2) 652s 9 tests, 9 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/hninv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hninv.m 652s ***** demo 652s ## Plot various iCDFs from the half-normal distribution 652s p = 0.001:0.001:0.999; 652s x1 = hninv (p, 0, 1); 652s x2 = hninv (p, 0, 2); 652s x3 = hninv (p, 0, 3); 652s x4 = hninv (p, 0, 5); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 652s grid on 652s ylim ([0, 10]) 652s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 652s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 652s title ("Half-normal iCDF") 652s xlabel ("probability") 652s ylabel ("x") 652s ***** shared p, x 652s p = [0, 0.3829, 0.6827, 1]; 652s x = [0, 1/2, 1, Inf]; 652s ***** assert (hninv (p, 0, 1), x, 1e-4); 652s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 652s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 652s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 652s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 652s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 652s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 652s ***** error hninv (1) 652s ***** error hninv (1, 2) 652s ***** error ... 652s hninv (1, ones (2), ones (3)) 652s ***** error ... 652s hninv (ones (2), 1, ones (3)) 652s ***** error ... 652s hninv (ones (2), ones (3), 1) 652s ***** error hninv (i, 2, 3) 652s ***** error hninv (1, i, 3) 652s ***** error hninv (1, 2, i) 652s 15 tests, 15 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/tinv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tinv.m 652s ***** demo 652s ## Plot various iCDFs from the Student's T distribution 652s p = 0.001:0.001:0.999; 652s x1 = tinv (p, 1); 652s x2 = tinv (p, 2); 652s x3 = tinv (p, 5); 652s x4 = tinv (p, Inf); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 652s grid on 652s xlim ([0, 1]) 652s ylim ([-5, 5]) 652s legend ({"df = 1", "df = 2", ... 652s "df = 5", 'df = \infty'}, "location", "northwest") 652s title ("Student's T iCDF") 652s xlabel ("probability") 652s ylabel ("values in x") 652s ***** shared p 652s p = [-1 0 0.5 1 2]; 652s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 652s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 652s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 652s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 652s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 652s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 652s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 652s ***** error tinv () 652s ***** error tinv (1) 652s ***** error ... 652s tinv (ones (3), ones (2)) 652s ***** error ... 652s tinv (ones (2), ones (3)) 652s ***** error tinv (i, 2) 652s ***** error tinv (2, i) 652s 13 tests, 13 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/tripdf.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tripdf.m 652s ***** demo 652s ## Plot various CDFs from the triangular distribution 652s x = 0.001:0.001:10; 652s y1 = tripdf (x, 3, 4, 6); 652s y2 = tripdf (x, 1, 2, 5); 652s y3 = tripdf (x, 2, 3, 9); 652s y4 = tripdf (x, 2, 5, 9); 652s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 652s grid on 652s xlim ([0, 10]) 652s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 652s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 652s "location", "northeast") 652s title ("Triangular CDF") 652s xlabel ("values in x") 652s ylabel ("probability") 652s ***** shared x, y, deps 652s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 652s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 652s deps = 2*eps; 652s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 652s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 652s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 652s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 652s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 652s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 652s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 652s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 652s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 652s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 652s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 652s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 652s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 652s ***** error tripdf () 652s ***** error tripdf (1) 652s ***** error tripdf (1, 2) 652s ***** error tripdf (1, 2, 3) 652s ***** error ... 652s tripdf (1, 2, 3, 4, 5) 652s ***** error ... 652s tripdf (ones (3), ones (2), ones(2), ones(2)) 652s ***** error ... 652s tripdf (ones (2), ones (3), ones(2), ones(2)) 652s ***** error ... 652s tripdf (ones (2), ones (2), ones(3), ones(2)) 652s ***** error ... 652s tripdf (ones (2), ones (2), ones(2), ones(3)) 652s ***** error tripdf (i, 2, 3, 4) 652s ***** error tripdf (1, i, 3, 4) 652s ***** error tripdf (1, 2, i, 4) 652s ***** error tripdf (1, 2, 3, i) 652s 26 tests, 26 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/poissinv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/poissinv.m 652s ***** demo 652s ## Plot various iCDFs from the Poisson distribution 652s p = 0.001:0.001:0.999; 652s x1 = poissinv (p, 13); 652s x2 = poissinv (p, 4); 652s x3 = poissinv (p, 10); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 652s grid on 652s ylim ([0, 20]) 652s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 652s title ("Poisson iCDF") 652s xlabel ("probability") 652s ylabel ("values in x (number of occurences)") 652s ***** shared p 652s p = [-1 0 0.5 1 2]; 652s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 652s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 652s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 652s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 652s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 652s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 652s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 652s ***** error poissinv () 652s ***** error poissinv (1) 652s ***** error ... 652s poissinv (ones (3), ones (2)) 652s ***** error ... 652s poissinv (ones (2), ones (3)) 652s ***** error poissinv (i, 2) 652s ***** error poissinv (2, i) 652s 13 tests, 13 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/wblcdf.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wblcdf.m 652s ***** demo 652s ## Plot various CDFs from the Weibull distribution 652s x = 0:0.001:2.5; 652s p1 = wblcdf (x, 1, 0.5); 652s p2 = wblcdf (x, 1, 1); 652s p3 = wblcdf (x, 1, 1.5); 652s p4 = wblcdf (x, 1, 5); 652s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 652s grid on 652s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 652s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 652s title ("Weibull CDF") 652s xlabel ("values in x") 652s ylabel ("probability") 652s ***** shared x, y 652s x = [-1 0 0.5 1 Inf]; 652s y = [0, 1-exp(-x(2:4)), 1]; 652s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 652s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 652s ***** assert (wblcdf (x, "upper"), 1 - y) 652s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 652s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 652s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 652s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 652s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 652s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 652s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 652s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 652s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 652s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 652s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 652s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 652s ***** error wblcdf () 652s ***** error wblcdf (1,2,3,4,5,6,7) 652s ***** error wblcdf (1, 2, 3, 4, "uper") 652s ***** error ... 652s wblcdf (ones (3), ones (2), ones (2)) 652s ***** error wblcdf (2, 3, 4, [1, 2]) 652s ***** error ... 652s [p, plo, pup] = wblcdf (1, 2, 3) 652s ***** error [p, plo, pup] = ... 652s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 652s ***** error [p, plo, pup] = ... 652s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 652s ***** error [p, plo, pup] = ... 652s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 652s ***** error wblcdf (i, 2, 2) 652s ***** error wblcdf (2, i, 2) 652s ***** error wblcdf (2, 2, i) 652s ***** error ... 652s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 652s 28 tests, 28 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/mnrnd.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mnrnd.m 652s ***** test 652s n = 10; 652s pk = [0.2, 0.5, 0.3]; 652s r = mnrnd (n, pk); 652s assert (size (r), size (pk)); 652s assert (all (r >= 0)); 652s assert (all (round (r) == r)); 652s assert (sum (r) == n); 652s ***** test 652s n = 10 * ones (3, 1); 652s pk = [0.2, 0.5, 0.3]; 652s r = mnrnd (n, pk); 652s assert (size (r), [length(n), length(pk)]); 652s assert (all (r >= 0)); 652s assert (all (round (r) == r)); 652s assert (all (sum (r, 2) == n)); 652s ***** test 652s n = (1:2)'; 652s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 652s r = mnrnd (n, pk); 652s assert (size (r), size (pk)); 652s assert (all (r >= 0)); 652s assert (all (round (r) == r)); 652s assert (all (sum (r, 2) == n)); 652s 3 tests, 3 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/gumbelcdf.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gumbelcdf.m 652s ***** demo 652s ## Plot various CDFs from the Gumbel distribution 652s x = -5:0.01:20; 652s p1 = gumbelcdf (x, 0.5, 2); 652s p2 = gumbelcdf (x, 1.0, 2); 652s p3 = gumbelcdf (x, 1.5, 3); 652s p4 = gumbelcdf (x, 3.0, 4); 652s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 652s grid on 652s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 652s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 652s title ("Gumbel CDF") 652s xlabel ("values in x") 652s ylabel ("probability") 652s ***** shared x, y 652s x = [-Inf, 1, 2, Inf]; 652s y = [0, 0.3679, 0.6922, 1]; 652s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 652s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 652s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 652s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 652s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 652s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 652s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 652s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 652s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 652s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 652s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 652s ***** error gumbelcdf () 652s ***** error gumbelcdf (1,2,3,4,5,6,7) 652s ***** error gumbelcdf (1, 2, 3, 4, "uper") 652s ***** error ... 652s gumbelcdf (ones (3), ones (2), ones (2)) 652s ***** error gumbelcdf (2, 3, 4, [1, 2]) 652s ***** error ... 652s [p, plo, pup] = gumbelcdf (1, 2, 3) 652s ***** error [p, plo, pup] = ... 652s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 652s ***** error [p, plo, pup] = ... 652s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 652s ***** error [p, plo, pup] = ... 652s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 652s ***** error gumbelcdf (i, 2, 2) 652s ***** error gumbelcdf (2, i, 2) 652s ***** error gumbelcdf (2, 2, i) 652s ***** error ... 652s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 652s 24 tests, 24 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/loglinv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/loglinv.m 652s ***** demo 652s ## Plot various iCDFs from the log-logistic distribution 652s p = 0.001:0.001:0.999; 652s x1 = loglinv (p, log (1), 1/0.5); 652s x2 = loglinv (p, log (1), 1); 652s x3 = loglinv (p, log (1), 1/2); 652s x4 = loglinv (p, log (1), 1/4); 652s x5 = loglinv (p, log (1), 1/8); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 652s ylim ([0, 20]) 652s grid on 652s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 652s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 652s title ("Log-logistic iCDF") 652s xlabel ("probability") 652s ylabel ("x") 652s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 652s ***** shared p, out1, out2 652s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 652s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 652s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 652s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 652s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 652s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 652s ***** assert (class (loglinv (single (1), 2, 3)), "single") 652s ***** assert (class (loglinv (1, single (2), 3)), "single") 652s ***** assert (class (loglinv (1, 2, single (3))), "single") 652s ***** error loglinv (1) 652s ***** error loglinv (1, 2) 652s ***** error ... 652s loglinv (1, ones (2), ones (3)) 652s ***** error ... 652s loglinv (ones (2), 1, ones (3)) 652s ***** error ... 652s loglinv (ones (2), ones (3), 1) 652s ***** error loglinv (i, 2, 3) 652s ***** error loglinv (1, i, 3) 652s ***** error loglinv (1, 2, i) 652s 14 tests, 14 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/bisainv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bisainv.m 652s ***** demo 652s ## Plot various iCDFs from the Birnbaum-Saunders distribution 652s p = 0.001:0.001:0.999; 652s x1 = bisainv (p, 1, 0.5); 652s x2 = bisainv (p, 1, 1); 652s x3 = bisainv (p, 1, 2); 652s x4 = bisainv (p, 1, 5); 652s x5 = bisainv (p, 1, 10); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 652s grid on 652s ylim ([0, 10]) 652s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 652s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 652s title ("Birnbaum-Saunders iCDF") 652s xlabel ("probability") 652s ylabel ("values in x") 652s ***** demo 652s ## Plot various iCDFs from the Birnbaum-Saunders distribution 652s p = 0.001:0.001:0.999; 652s x1 = bisainv (p, 1, 0.3); 652s x2 = bisainv (p, 2, 0.3); 652s x3 = bisainv (p, 1, 0.5); 652s x4 = bisainv (p, 3, 0.5); 652s x5 = bisainv (p, 5, 0.5); 652s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 652s grid on 652s ylim ([0, 10]) 652s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 652s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 652s title ("Birnbaum-Saunders iCDF") 652s xlabel ("probability") 652s ylabel ("values in x") 652s ***** shared p, y, f 652s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 652s p = [-1, 0, 1/4, 1/2, 1, 2]; 652s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 652s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 652s ***** assert (bisainv (p, 1, ones (1,6)), y) 652s ***** assert (bisainv (p, ones (1,6), 1), y) 652s ***** assert (bisainv (p, 1, 1), y) 652s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 652s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 652s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 652s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 652s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 652s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 652s ***** error bisainv () 652s ***** error bisainv (1) 652s ***** error bisainv (1, 2) 652s ***** error bisainv (1, 2, 3, 4) 652s ***** error ... 652s bisainv (ones (3), ones (2), ones(2)) 652s ***** error ... 652s bisainv (ones (2), ones (3), ones(2)) 652s ***** error ... 652s bisainv (ones (2), ones (2), ones(3)) 652s ***** error bisainv (i, 4, 3) 652s ***** error bisainv (1, i, 3) 652s ***** error bisainv (1, 4, i) 652s 20 tests, 20 passed, 0 known failure, 0 skipped 652s [inst/dist_fun/vminv.m] 652s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/vminv.m 652s ***** demo 652s ## Plot various iCDFs from the von Mises distribution 652s 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]; 652s x1 = vminv (p1, 0, 0.5); 652s x2 = vminv (p1, 0, 1); 652s x3 = vminv (p1, 0, 2); 652s x4 = vminv (p1, 0, 4); 652s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 652s grid on 652s ylim ([-pi, pi]) 652s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 652s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 652s title ("Von Mises iCDF") 652s xlabel ("probability") 652s ylabel ("values in x") 652s ***** shared x, p0, p1 652s x = [-pi:pi/2:pi]; 652s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 652s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 652s ***** assert (vminv (p0, 0, 1), x, 5e-5) 652s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 652s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 653s ***** error vminv () 653s ***** error vminv (1) 653s ***** error vminv (1, 2) 653s ***** error ... 653s vminv (ones (3), ones (2), ones (2)) 653s ***** error ... 653s vminv (ones (2), ones (3), ones (2)) 653s ***** error ... 653s vminv (ones (2), ones (2), ones (3)) 653s ***** error vminv (i, 2, 2) 653s ***** error vminv (2, i, 2) 653s ***** error vminv (2, 2, i) 653s 12 tests, 12 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/finv.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/finv.m 653s ***** demo 653s ## Plot various iCDFs from the F distribution 653s p = 0.001:0.001:0.999; 653s x1 = finv (p, 1, 1); 653s x2 = finv (p, 2, 1); 653s x3 = finv (p, 5, 2); 653s x4 = finv (p, 10, 1); 653s x5 = finv (p, 100, 100); 653s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 653s grid on 653s ylim ([0, 4]) 653s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 653s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 653s "df1 = 100, df2 = 100"}, "location", "northwest") 653s title ("F iCDF") 653s xlabel ("probability") 653s ylabel ("values in x") 653s ***** shared p 653s p = [-1 0 0.5 1 2]; 653s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 653s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 653s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 653s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN NaN NaN]) 653s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN NaN NaN]) 653s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 653s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 653s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 653s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 653s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 653s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 653s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 653s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 653s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 653s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 653s ***** error finv () 653s ***** error finv (1) 653s ***** error finv (1,2) 653s ***** error ... 653s finv (ones (3), ones (2), ones (2)) 653s ***** error ... 653s finv (ones (2), ones (3), ones (2)) 653s ***** error ... 653s finv (ones (2), ones (2), ones (3)) 653s ***** error finv (i, 2, 2) 653s ***** error finv (2, i, 2) 653s ***** error finv (2, 2, i) 653s 24 tests, 24 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/chi2cdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/chi2cdf.m 653s ***** demo 653s ## Plot various CDFs from the chi-squared distribution 653s x = 0:0.01:8; 653s p1 = chi2cdf (x, 1); 653s p2 = chi2cdf (x, 2); 653s p3 = chi2cdf (x, 3); 653s p4 = chi2cdf (x, 4); 653s p5 = chi2cdf (x, 6); 653s p6 = chi2cdf (x, 9); 653s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 653s x, p4, "-c", x, p5, "-m", x, p6, "-y") 653s grid on 653s xlim ([0, 8]) 653s legend ({"df = 1", "df = 2", "df = 3", ... 653s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 653s title ("Chi-squared CDF") 653s xlabel ("values in x") 653s ylabel ("probability") 653s ***** shared x, p, u 653s x = [-1, 0, 0.5, 1, 2]; 653s p = [0, (1 - exp (-x(2:end) / 2))]; 653s u = [1, 0, NaN, 0.3934693402873666, 0.6321205588285577]; 653s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 653s ***** assert (chi2cdf (x, 2), p, eps) 653s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [p(1), 1, NaN, p(4:5)], eps) 653s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), ... 653s [p(1), 1, NaN, u(4:5)], eps) 653s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 653s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 653s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 653s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 653s ***** error chi2cdf () 653s ***** error chi2cdf (1) 653s ***** error chi2cdf (1, 2, 3, 4) 653s ***** error chi2cdf (1, 2, 3) 653s ***** error chi2cdf (1, 2, "uper") 653s ***** error ... 653s chi2cdf (ones (3), ones (2)) 653s ***** error ... 653s chi2cdf (ones (2), ones (3)) 653s ***** error chi2cdf (i, 2) 653s ***** error chi2cdf (2, i) 653s 17 tests, 17 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/exprnd.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/exprnd.m 653s ***** assert (size (exprnd (2)), [1, 1]) 653s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 653s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 653s ***** assert (size (exprnd (1, 3)), [3, 3]) 653s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 653s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 653s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 653s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 653s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 653s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 653s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 653s ***** assert (class (exprnd (2)), "double") 653s ***** assert (class (exprnd (single (2))), "single") 653s ***** assert (class (exprnd (single ([2 2]))), "single") 653s ***** error exprnd () 653s ***** error exprnd (i) 653s ***** error ... 653s exprnd (1, -1) 653s ***** error ... 653s exprnd (1, 1.2) 653s ***** error ... 653s exprnd (1, ones (2)) 653s ***** error ... 653s exprnd (1, [2 -1 2]) 653s ***** error ... 653s exprnd (1, [2 0 2.5]) 653s ***** error ... 653s exprnd (ones (2), ones (2)) 653s ***** error ... 653s exprnd (1, 2, -1, 5) 653s ***** error ... 653s exprnd (1, 2, 1.5, 5) 653s ***** error exprnd (ones (2,2), 3) 653s ***** error exprnd (ones (2,2), [3, 2]) 653s ***** error exprnd (ones (2,2), 2, 3) 653s 27 tests, 27 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/nctpdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nctpdf.m 653s ***** demo 653s ## Plot various PDFs from the noncentral T distribution 653s x = -5:0.01:10; 653s y1 = nctpdf (x, 1, 0); 653s y2 = nctpdf (x, 4, 0); 653s y3 = nctpdf (x, 1, 2); 653s y4 = nctpdf (x, 4, 2); 653s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 653s grid on 653s xlim ([-5, 10]) 653s ylim ([0, 0.4]) 653s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 653s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 653s title ("Noncentral T PDF") 653s xlabel ("values in x") 653s ylabel ("density") 653s ***** demo 653s ## Compare the noncentral T PDF with MU = 1 to the T PDF 653s ## with the same number of degrees of freedom (10). 653s 653s x = -5:0.1:5; 653s y1 = nctpdf (x, 10, 1); 653s y2 = tpdf (x, 10); 653s plot (x, y1, "-", x, y2, "-"); 653s grid on 653s xlim ([-5, 5]) 653s ylim ([0, 0.4]) 653s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 653s title ("Noncentral T vs T PDFs") 653s xlabel ("values in x") 653s ylabel ("density") 653s ***** shared x1, df, mu 653s x1 = [-Inf, 2, NaN, 4, Inf]; 653s df = [2, 0, -1, 1, 4]; 653s mu = [1, NaN, 3, -1, 2]; 653s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 653s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 653s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 653s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 653s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 653s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 653s 0.0146500727180389, 0.3082302682110299], 1e-14); 653s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 653s 0.00401787561306999, 0.0972086534042828], 1e-14); 653s ***** error nctpdf () 653s ***** error nctpdf (1) 653s ***** error nctpdf (1, 2) 653s ***** error ... 653s nctpdf (ones (3), ones (2), ones (2)) 653s ***** error ... 653s nctpdf (ones (2), ones (3), ones (2)) 653s ***** error ... 653s nctpdf (ones (2), ones (2), ones (3)) 653s ***** error nctpdf (i, 2, 2) 653s ***** error nctpdf (2, i, 2) 653s ***** error nctpdf (2, 2, i) 653s 16 tests, 16 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/binopdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/binopdf.m 653s ***** demo 653s ## Plot various PDFs from the binomial distribution 653s x = 0:40; 653s y1 = binopdf (x, 20, 0.5); 653s y2 = binopdf (x, 20, 0.7); 653s y3 = binopdf (x, 40, 0.5); 653s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 653s grid on 653s ylim ([0, 0.25]) 653s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 653s "n = 40, ps = 0.5"}, "location", "northeast") 653s title ("Binomial PDF") 653s xlabel ("values in x (number of successes)") 653s ylabel ("density") 653s ***** shared x, y 653s x = [-1 0 1 2 3]; 653s y = [0 1/4 1/2 1/4 0]; 653s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 653s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 653s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 653s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 653s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 653s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 653s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 653s ***** assert (binopdf (1, 1, 1), 1) 653s ***** assert (binopdf (0, 3, 0), 1) 653s ***** assert (binopdf (2, 2, 1), 1) 653s ***** assert (binopdf (1, 2, 1), 0) 653s ***** assert (binopdf (0, 1.1, 0), NaN) 653s ***** assert (binopdf (1, 2, -1), NaN) 653s ***** assert (binopdf (1, 2, 1.5), NaN) 653s ***** assert (binopdf ([], 1, 1), []) 653s ***** assert (binopdf (1, [], 1), []) 653s ***** assert (binopdf (1, 1, []), []) 653s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 653s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 653s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 653s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 653s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 653s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 653s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 653s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 653s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 653s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 653s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 653s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 653s ***** error binopdf () 653s ***** error binopdf (1) 653s ***** error binopdf (1, 2) 653s ***** error binopdf (1, 2, 3, 4) 653s ***** error ... 653s binopdf (ones (3), ones (2), ones (2)) 653s ***** error ... 653s binopdf (ones (2), ones (3), ones (2)) 653s ***** error ... 653s binopdf (ones (2), ones (2), ones (3)) 653s ***** error binopdf (i, 2, 2) 653s ***** error binopdf (2, i, 2) 653s ***** error binopdf (2, 2, i) 653s 39 tests, 39 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/bisapdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bisapdf.m 653s ***** demo 653s ## Plot various PDFs from the Birnbaum-Saunders distribution 653s x = 0.01:0.01:4; 653s y1 = bisapdf (x, 1, 0.5); 653s y2 = bisapdf (x, 1, 1); 653s y3 = bisapdf (x, 1, 2); 653s y4 = bisapdf (x, 1, 5); 653s y5 = bisapdf (x, 1, 10); 653s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 653s grid on 653s ylim ([0, 1.5]) 653s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 653s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 653s title ("Birnbaum-Saunders PDF") 653s xlabel ("values in x") 653s ylabel ("density") 653s ***** demo 653s ## Plot various PDFs from the Birnbaum-Saunders distribution 653s x = 0.01:0.01:6; 653s y1 = bisapdf (x, 1, 0.3); 653s y2 = bisapdf (x, 2, 0.3); 653s y3 = bisapdf (x, 1, 0.5); 653s y4 = bisapdf (x, 3, 0.5); 653s y5 = bisapdf (x, 5, 0.5); 653s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 653s grid on 653s ylim ([0, 1.5]) 653s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 653s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 653s title ("Birnbaum-Saunders CDF") 653s xlabel ("values in x") 653s ylabel ("density") 653s ***** shared x, y 653s x = [-1, 0, 1, 2, Inf]; 653s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 653s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 653s ***** assert (bisapdf (x, 1, 1), y, eps) 653s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 653s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 653s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 653s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 653s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 653s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 653s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 653s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 653s ***** error bisapdf () 653s ***** error bisapdf (1) 653s ***** error bisapdf (1, 2) 653s ***** error bisapdf (1, 2, 3, 4) 653s ***** error ... 653s bisapdf (ones (3), ones (2), ones(2)) 653s ***** error ... 653s bisapdf (ones (2), ones (3), ones(2)) 653s ***** error ... 653s bisapdf (ones (2), ones (2), ones(3)) 653s ***** error bisapdf (i, 4, 3) 653s ***** error bisapdf (1, i, 3) 653s ***** error bisapdf (1, 4, i) 653s 20 tests, 20 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/hncdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hncdf.m 653s ***** demo 653s ## Plot various CDFs from the half-normal distribution 653s x = 0:0.001:10; 653s p1 = hncdf (x, 0, 1); 653s p2 = hncdf (x, 0, 2); 653s p3 = hncdf (x, 0, 3); 653s p4 = hncdf (x, 0, 5); 653s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 653s grid on 653s xlim ([0, 10]) 653s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 653s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 653s title ("Half-normal CDF") 653s xlabel ("values in x") 653s ylabel ("probability") 653s ***** demo 653s ## Plot half-normal against normal cumulative distribution function 653s x = -5:0.001:5; 653s p1 = hncdf (x, 0, 1); 653s p2 = normcdf (x); 653s plot (x, p1, "-b", x, p2, "-g") 653s grid on 653s xlim ([-5, 5]) 653s legend ({"half-normal with μ = 0, σ = 1", ... 653s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 653s title ("Half-normal against standard normal CDF") 653s xlabel ("values in x") 653s ylabel ("probability") 653s ***** shared x, p1, p1u, y2, y2u, y3, y3u 653s x = [-Inf, -1, 0, 1/2, 1, Inf]; 653s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 653s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 653s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 653s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 653s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 653s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 653s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 653s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 653s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 653s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 653s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 653s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 653s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 653s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 653s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 653s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 653s ***** error hncdf () 653s ***** error hncdf (1) 653s ***** error hncdf (1, 2) 653s ***** error hncdf (1, 2, 3, "tail") 653s ***** error hncdf (1, 2, 3, 5) 653s ***** error ... 653s hncdf (ones (3), ones (2), ones(2)) 653s ***** error ... 653s hncdf (ones (2), ones (3), ones(2)) 653s ***** error ... 653s hncdf (ones (2), ones (2), ones(3)) 653s ***** error hncdf (i, 2, 3) 653s ***** error hncdf (1, i, 3) 653s ***** error hncdf (1, 2, i) 653s 25 tests, 25 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/gampdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gampdf.m 653s ***** demo 653s ## Plot various PDFs from the Gamma distribution 653s x = 0:0.01:20; 653s y1 = gampdf (x, 1, 2); 653s y2 = gampdf (x, 2, 2); 653s y3 = gampdf (x, 3, 2); 653s y4 = gampdf (x, 5, 1); 653s y5 = gampdf (x, 9, 0.5); 653s y6 = gampdf (x, 7.5, 1); 653s y7 = gampdf (x, 0.5, 1); 653s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 653s x, y5, "-k", x, y6, "-b", x, y7, "-c") 653s grid on 653s ylim ([0,0.5]) 653s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 653s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 653s "α = 0.5, β = 1"}, "location", "northeast") 653s title ("Gamma PDF") 653s xlabel ("values in x") 653s ylabel ("density") 653s ***** shared x, y 653s x = [-1 0 0.5 1 Inf]; 653s y = [0 exp(-x(2:end))]; 653s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 653s ***** assert (gampdf (x, 1, ones (1,5)), y) 653s ***** assert (gampdf (x, ones (1,5), 1), y) 653s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN y(5)]) 653s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 653s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 653s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 653s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 653s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 653s ***** error gampdf () 653s ***** error gampdf (1) 653s ***** error gampdf (1,2) 653s ***** error ... 653s gampdf (ones (3), ones (2), ones (2)) 653s ***** error ... 653s gampdf (ones (2), ones (3), ones (2)) 653s ***** error ... 653s gampdf (ones (2), ones (2), ones (3)) 653s ***** error gampdf (i, 2, 2) 653s ***** error gampdf (2, i, 2) 653s ***** error gampdf (2, 2, i) 653s 18 tests, 18 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/unidcdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unidcdf.m 653s ***** demo 653s ## Plot various CDFs from the discrete uniform distribution 653s x = 0:10; 653s p1 = unidcdf (x, 5); 653s p2 = unidcdf (x, 9); 653s plot (x, p1, "*b", x, p2, "*g") 653s grid on 653s xlim ([0, 10]) 653s ylim ([0, 1]) 653s legend ({"N = 5", "N = 9"}, "location", "southeast") 653s title ("Discrete uniform CDF") 653s xlabel ("values in x") 653s ylabel ("probability") 653s ***** shared x, y 653s x = [0 1 2.5 10 11]; 653s y = [0, 0.1 0.2 1.0 1.0]; 653s ***** assert (unidcdf (x, 10*ones (1,5)), y) 653s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 653s ***** assert (unidcdf (x, 10), y) 653s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 653s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 653s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 653s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 653s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 653s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 653s ***** error unidcdf () 653s ***** error unidcdf (1) 653s ***** error unidcdf (1, 2, 3) 653s ***** error unidcdf (1, 2, "tail") 653s ***** error ... 653s unidcdf (ones (3), ones (2)) 653s ***** error ... 653s unidcdf (ones (2), ones (3)) 653s ***** error unidcdf (i, 2) 653s ***** error unidcdf (2, i) 653s 17 tests, 17 passed, 0 known failure, 0 skipped 653s [inst/dist_fun/wishpdf.m] 653s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wishpdf.m 653s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 653s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 653s ***** 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); 653s ***** error wishpdf () 654s ***** error wishpdf (1, 2) 654s ***** error wishpdf (1, 2, 0) 654s ***** error wishpdf (1, 2) 654s 7 tests, 7 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/raylinv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/raylinv.m 654s ***** demo 654s ## Plot various iCDFs from the Rayleigh distribution 654s p = 0.001:0.001:0.999; 654s x1 = raylinv (p, 0.5); 654s x2 = raylinv (p, 1); 654s x3 = raylinv (p, 2); 654s x4 = raylinv (p, 3); 654s x5 = raylinv (p, 4); 654s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 654s grid on 654s ylim ([0, 10]) 654s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 654s "σ = 3", "σ = 4"}, "location", "northwest") 654s title ("Rayleigh iCDF") 654s xlabel ("probability") 654s ylabel ("values in x") 654s ***** test 654s p = 0:0.1:0.5; 654s sigma = 1:6; 654s x = raylinv (p, sigma); 654s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 654s assert (x, expected_x, 0.001); 654s ***** test 654s p = 0:0.1:0.5; 654s x = raylinv (p, 0.5); 654s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 654s assert (x, expected_x, 0.001); 654s ***** error raylinv () 654s ***** error raylinv (1) 654s ***** error ... 654s raylinv (ones (3), ones (2)) 654s ***** error ... 654s raylinv (ones (2), ones (3)) 654s ***** error raylinv (i, 2) 654s ***** error raylinv (2, i) 654s 8 tests, 8 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/evpdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/evpdf.m 654s ***** demo 654s ## Plot various PDFs from the Extreme value distribution 654s x = -10:0.001:10; 654s y1 = evpdf (x, 0.5, 2); 654s y2 = evpdf (x, 1.0, 2); 654s y3 = evpdf (x, 1.5, 3); 654s y4 = evpdf (x, 3.0, 4); 654s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 654s grid on 654s ylim ([0, 0.2]) 654s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 654s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 654s title ("Extreme value PDF") 654s xlabel ("values in x") 654s ylabel ("density") 654s ***** shared x, y0, y1 654s x = [-5, 0, 1, 2, 3]; 654s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 654s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 654s ***** assert (evpdf (x), y0, 1e-4) 654s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 654s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 654s ***** error evpdf () 654s ***** error ... 654s evpdf (ones (3), ones (2), ones (2)) 654s ***** error evpdf (i, 2, 2) 654s ***** error evpdf (2, i, 2) 654s ***** error evpdf (2, 2, i) 654s 8 tests, 8 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/laplacecdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/laplacecdf.m 654s ***** demo 654s ## Plot various CDFs from the Laplace distribution 654s x = -10:0.01:10; 654s p1 = laplacecdf (x, 0, 1); 654s p2 = laplacecdf (x, 0, 2); 654s p3 = laplacecdf (x, 0, 4); 654s p4 = laplacecdf (x, -5, 4); 654s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 654s grid on 654s xlim ([-10, 10]) 654s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 654s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 654s title ("Laplace CDF") 654s xlabel ("values in x") 654s ylabel ("probability") 654s ***** shared x, y 654s x = [-Inf, -log(2), 0, log(2), Inf]; 654s y = [0, 1/4, 1/2, 3/4, 1]; 654s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 654s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 654s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 654s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 654s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 654s ***** error laplacecdf () 654s ***** error laplacecdf (1) 654s ***** error ... 654s laplacecdf (1, 2) 654s ***** error ... 654s laplacecdf (1, 2, 3, 4, 5) 654s ***** error laplacecdf (1, 2, 3, "tail") 654s ***** error laplacecdf (1, 2, 3, 4) 654s ***** error ... 654s laplacecdf (ones (3), ones (2), ones (2)) 654s ***** error ... 654s laplacecdf (ones (2), ones (3), ones (2)) 654s ***** error ... 654s laplacecdf (ones (2), ones (2), ones (3)) 654s ***** error laplacecdf (i, 2, 2) 654s ***** error laplacecdf (2, i, 2) 654s ***** error laplacecdf (2, 2, i) 654s 17 tests, 17 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/trirnd.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/trirnd.m 654s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 654s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 654s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 654s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 654s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 654s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 654s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 654s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 654s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 654s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 654s ***** assert (class (trirnd (1, 1.5, 2)), "double") 654s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 654s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 654s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 654s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 654s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 654s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 654s ***** error trirnd () 654s ***** error trirnd (1) 654s ***** error trirnd (1, 2) 654s ***** error ... 654s trirnd (ones (3), 5 * ones (2), ones (2)) 654s ***** error ... 654s trirnd (ones (2), 5 * ones (3), ones (2)) 654s ***** error ... 654s trirnd (ones (2), 5 * ones (2), ones (3)) 654s ***** error trirnd (i, 5, 3) 654s ***** error trirnd (1, 5+i, 3) 654s ***** error trirnd (1, 5, i) 654s ***** error ... 654s trirnd (1, 5, 3, -1) 654s ***** error ... 654s trirnd (1, 5, 3, 1.2) 654s ***** error ... 654s trirnd (1, 5, 3, ones (2)) 654s ***** error ... 654s trirnd (1, 5, 3, [2 -1 2]) 654s ***** error ... 654s trirnd (1, 5, 3, [2 0 2.5]) 654s ***** error ... 654s trirnd (1, 5, 3, 2, -1, 5) 654s ***** error ... 654s trirnd (1, 5, 3, 2, 1.5, 5) 654s ***** error ... 654s trirnd (2, 5 * ones (2), 2, 3) 654s ***** error ... 654s trirnd (2, 5 * ones (2), 2, [3, 2]) 654s ***** error ... 654s trirnd (2, 5 * ones (2), 2, 3, 2) 654s 36 tests, 36 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/nakacdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nakacdf.m 654s ***** demo 654s ## Plot various CDFs from the Nakagami distribution 654s x = 0:0.01:3; 654s p1 = nakacdf (x, 0.5, 1); 654s p2 = nakacdf (x, 1, 1); 654s p3 = nakacdf (x, 1, 2); 654s p4 = nakacdf (x, 1, 3); 654s p5 = nakacdf (x, 2, 1); 654s p6 = nakacdf (x, 2, 2); 654s p7 = nakacdf (x, 5, 1); 654s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 654s x, p5, "-k", x, p6, "-b", x, p7, "-c") 654s grid on 654s xlim ([0, 3]) 654s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 654s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 654s "μ = 5, ω = 1"}, "location", "southeast") 654s title ("Nakagami CDF") 654s xlabel ("values in x") 654s ylabel ("probability") 654s ***** shared x, y 654s x = [-1, 0, 1, 2, Inf]; 654s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 654s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 654s ***** assert (nakacdf (x, 1, 1), y, eps) 654s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 654s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 654s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 654s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 654s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 654s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 654s ***** error nakacdf () 654s ***** error nakacdf (1) 654s ***** error nakacdf (1, 2) 654s ***** error nakacdf (1, 2, 3, "tail") 654s ***** error nakacdf (1, 2, 3, 4) 654s ***** error ... 654s nakacdf (ones (3), ones (2), ones (2)) 654s ***** error ... 654s nakacdf (ones (2), ones (3), ones (2)) 654s ***** error ... 654s nakacdf (ones (2), ones (2), ones (3)) 654s ***** error nakacdf (i, 2, 2) 654s ***** error nakacdf (2, i, 2) 654s ***** error nakacdf (2, 2, i) 654s 19 tests, 19 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/tcdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tcdf.m 654s ***** demo 654s ## Plot various CDFs from the Student's T distribution 654s x = -5:0.01:5; 654s p1 = tcdf (x, 1); 654s p2 = tcdf (x, 2); 654s p3 = tcdf (x, 5); 654s p4 = tcdf (x, Inf); 654s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 654s grid on 654s xlim ([-5, 5]) 654s ylim ([0, 1]) 654s legend ({"df = 1", "df = 2", ... 654s "df = 5", 'df = \infty'}, "location", "southeast") 654s title ("Student's T CDF") 654s xlabel ("values in x") 654s ylabel ("probability") 654s ***** shared x,y 654s x = [-Inf 0 1 Inf]; 654s y = [0 1/2 3/4 1]; 654s ***** assert (tcdf (x, ones (1,4)), y, eps) 654s ***** assert (tcdf (x, 1), y, eps) 654s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 654s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 654s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 654s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 654s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 654s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 654s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 654s ***** error tcdf () 654s ***** error tcdf (1) 654s ***** error tcdf (1, 2, "uper") 654s ***** error tcdf (1, 2, 3) 654s ***** error ... 654s tcdf (ones (3), ones (2)) 654s ***** error ... 654s tcdf (ones (3), ones (2)) 654s ***** error ... 654s tcdf (ones (3), ones (2), "upper") 654s ***** error tcdf (i, 2) 654s ***** error tcdf (2, i) 654s ***** shared tol_rel 654s tol_rel = 10 * eps; 654s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 654s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 654s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 654s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 654s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 654s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 654s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 654s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 654s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 654s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 654s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 654s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 654s 30 tests, 30 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/chi2inv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/chi2inv.m 654s ***** demo 654s ## Plot various iCDFs from the chi-squared distribution 654s p = 0.001:0.001:0.999; 654s x1 = chi2inv (p, 1); 654s x2 = chi2inv (p, 2); 654s x3 = chi2inv (p, 3); 654s x4 = chi2inv (p, 4); 654s x5 = chi2inv (p, 6); 654s x6 = chi2inv (p, 9); 654s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 654s p, x4, "-c", p, x5, "-m", p, x6, "-y") 654s grid on 654s ylim ([0, 8]) 654s legend ({"df = 1", "df = 2", "df = 3", ... 654s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 654s title ("Chi-squared iCDF") 654s xlabel ("probability") 654s ylabel ("values in x") 654s ***** shared p 654s p = [-1 0 0.3934693402873666 1 2]; 654s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 654s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 654s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 654s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 654s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 654s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 654s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 654s ***** error chi2inv () 654s ***** error chi2inv (1) 654s ***** error chi2inv (1,2,3) 654s ***** error ... 654s chi2inv (ones (3), ones (2)) 654s ***** error ... 654s chi2inv (ones (2), ones (3)) 654s ***** error chi2inv (i, 2) 654s ***** error chi2inv (2, i) 654s 14 tests, 14 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/wblinv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wblinv.m 654s ***** demo 654s ## Plot various iCDFs from the Weibull distribution 654s p = 0.001:0.001:0.999; 654s x1 = wblinv (p, 1, 0.5); 654s x2 = wblinv (p, 1, 1); 654s x3 = wblinv (p, 1, 1.5); 654s x4 = wblinv (p, 1, 5); 654s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 654s ylim ([0, 2.5]) 654s grid on 654s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 654s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 654s title ("Weibull iCDF") 654s xlabel ("probability") 654s ylabel ("x") 654s ***** shared p 654s p = [-1 0 0.63212055882855778 1 2]; 654s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 654s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 654s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 654s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 654s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 654s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 654s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 654s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 654s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 654s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 654s ***** error wblinv () 654s ***** error wblinv (1,2,3,4) 654s ***** error ... 654s wblinv (ones (3), ones (2), ones (2)) 654s ***** error ... 654s wblinv (ones (2), ones (3), ones (2)) 654s ***** error ... 654s wblinv (ones (2), ones (2), ones (3)) 654s ***** error wblinv (i, 2, 2) 654s ***** error wblinv (2, i, 2) 654s ***** error wblinv (2, 2, i) 654s 18 tests, 18 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/burrinv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/burrinv.m 654s ***** demo 654s ## Plot various iCDFs from the Burr type XII distribution 654s p = 0.001:0.001:0.999; 654s x1 = burrinv (p, 1, 1, 1); 654s x2 = burrinv (p, 1, 1, 2); 654s x3 = burrinv (p, 1, 1, 3); 654s x4 = burrinv (p, 1, 2, 1); 654s x5 = burrinv (p, 1, 3, 1); 654s x6 = burrinv (p, 1, 0.5, 2); 654s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 654s p, x4, "-c", p, x5, "-m", p, x6, "-k") 654s grid on 654s ylim ([0, 5]) 654s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 654s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 654s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 654s "location", "northwest") 654s title ("Burr type XII iCDF") 654s xlabel ("probability") 654s ylabel ("values in x") 654s ***** shared p, y 654s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 654s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 654s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 654s ***** assert (burrinv (p, 1, 1, 1), y, eps) 654s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 654s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 654s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 654s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 654s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 654s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 654s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 654s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 654s ***** error burrinv () 654s ***** error burrinv (1) 654s ***** error burrinv (1, 2) 654s ***** error burrinv (1, 2, 3) 654s ***** error ... 654s burrinv (1, 2, 3, 4, 5) 654s ***** error ... 654s burrinv (ones (3), ones (2), ones(2), ones(2)) 654s ***** error ... 654s burrinv (ones (2), ones (3), ones(2), ones(2)) 654s ***** error ... 654s burrinv (ones (2), ones (2), ones(3), ones(2)) 654s ***** error ... 654s burrinv (ones (2), ones (2), ones(2), ones(3)) 654s ***** error burrinv (i, 2, 3, 4) 654s ***** error burrinv (1, i, 3, 4) 654s ***** error burrinv (1, 2, i, 4) 654s ***** error burrinv (1, 2, 3, i) 654s 23 tests, 23 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/ncfpdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncfpdf.m 654s ***** demo 654s ## Plot various PDFs from the noncentral F distribution 654s x = 0:0.01:5; 654s y1 = ncfpdf (x, 2, 5, 1); 654s y2 = ncfpdf (x, 2, 5, 2); 654s y3 = ncfpdf (x, 5, 10, 1); 654s y4 = ncfpdf (x, 10, 20, 10); 654s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 654s grid on 654s xlim ([0, 5]) 654s ylim ([0, 0.8]) 654s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 654s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 654s "location", "northeast") 654s title ("Noncentral F PDF") 654s xlabel ("values in x") 654s ylabel ("density") 654s ***** demo 654s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 654s ## same number of numerator and denominator degrees of freedom (5, 20) 654s 654s x = 0.01:0.1:10.01; 654s y1 = ncfpdf (x, 5, 20, 10); 654s y2 = fpdf (x, 5, 20); 654s plot (x, y1, "-", x, y2, "-"); 654s grid on 654s xlim ([0, 10]) 654s ylim ([0, 0.8]) 654s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 654s title ("Noncentral F vs F PDFs") 654s xlabel ("values in x") 654s ylabel ("density") 654s ***** shared x1, df1, df2, lambda 654s x1 = [-Inf, 2, NaN, 4, Inf]; 654s df1 = [2, 0, -1, 1, 4]; 654s df2 = [2, 4, 5, 6, 8]; 654s lambda = [1, NaN, 3, -1, 2]; 654s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 654s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 654s 0.05607937264237208, NaN], 1e-14); 654s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 654s 0.080125760971946518, NaN], 1e-14); 654s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 654s 0.0715902008258656, NaN], 1e-14); 654s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 654s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 654s NaN, 0.2152571783045893], 1e-14); 654s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 654s NaN, 0.05560846335398539], 1e-14); 654s ***** error ncfpdf () 654s ***** error ncfpdf (1) 654s ***** error ncfpdf (1, 2) 654s ***** error ncfpdf (1, 2, 3) 654s ***** error ... 654s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 654s ***** error ... 654s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 654s ***** error ... 654s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 654s ***** error ... 654s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 654s ***** error ncfpdf (i, 2, 2, 2) 654s ***** error ncfpdf (2, i, 2, 2) 654s ***** error ncfpdf (2, 2, i, 2) 654s ***** error ncfpdf (2, 2, 2, i) 654s 19 tests, 19 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/gumbelrnd.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gumbelrnd.m 654s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 654s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 654s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 654s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 654s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 654s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 654s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 654s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 654s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 654s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 654s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 654s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 654s ***** assert (class (gumbelrnd (1, 1)), "double") 654s ***** assert (class (gumbelrnd (1, single (1))), "single") 654s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 654s ***** assert (class (gumbelrnd (single (1), 1)), "single") 654s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 654s ***** error gumbelrnd () 654s ***** error gumbelrnd (1) 654s ***** error ... 654s gumbelrnd (ones (3), ones (2)) 654s ***** error ... 654s gumbelrnd (ones (2), ones (3)) 654s ***** error gumbelrnd (i, 2, 3) 654s ***** error gumbelrnd (1, i, 3) 654s ***** error ... 654s gumbelrnd (1, 2, -1) 654s ***** error ... 654s gumbelrnd (1, 2, 1.2) 654s ***** error ... 654s gumbelrnd (1, 2, ones (2)) 654s ***** error ... 654s gumbelrnd (1, 2, [2 -1 2]) 654s ***** error ... 654s gumbelrnd (1, 2, [2 0 2.5]) 654s ***** error ... 654s gumbelrnd (1, 2, 2, -1, 5) 654s ***** error ... 654s gumbelrnd (1, 2, 2, 1.5, 5) 654s ***** error ... 654s gumbelrnd (2, ones (2), 3) 654s ***** error ... 654s gumbelrnd (2, ones (2), [3, 2]) 654s ***** error ... 654s gumbelrnd (2, ones (2), 3, 2) 654s 33 tests, 33 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/plcdf.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/plcdf.m 654s ***** demo 654s ## Plot various CDFs from the Piecewise linear distribution 654s data = 0:0.01:10; 654s x1 = [0, 1, 3, 4, 7, 10]; 654s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 654s x2 = [0, 2, 5, 6, 7, 8]; 654s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 654s p1 = plcdf (data, x1, Fx1); 654s p2 = plcdf (data, x2, Fx2); 654s plot (data, p1, "-b", data, p2, "g") 654s grid on 654s ylim ([0, 1]) 654s xlim ([0, 10]) 654s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 654s title ("Piecewise linear CDF") 654s xlabel ("values in data") 654s ylabel ("probability") 654s ***** test 654s data = 0:0.2:1; 654s p = plcdf (data, [0, 1], [0, 1]); 654s assert (p, data); 654s ***** test 654s data = 0:0.2:1; 654s p = plcdf (data, [0, 2], [0, 1]); 654s assert (p, 0.5 * data); 654s ***** test 654s data = 0:0.2:1; 654s p = plcdf (data, [0, 1], [0, 0.5]); 654s assert (p, 0.5 * data); 654s ***** test 654s data = 0:0.2:1; 654s p = plcdf (data, [0, 0.5], [0, 1]); 654s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 654s ***** test 654s data = 0:0.2:1; 654s p = plcdf (data, [0, 1], [0, 1], "upper"); 654s assert (p, 1 - data); 654s ***** error plcdf () 654s ***** error plcdf (1) 654s ***** error plcdf (1, 2) 654s ***** error plcdf (1, 2, 3, "uper") 654s ***** error plcdf (1, 2, 3, 4) 654s ***** error ... 654s plcdf (1, [0, 1, 2], [0, 1]) 654s ***** error ... 654s plcdf (1, [0], [1]) 654s ***** error ... 654s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 654s ***** error ... 654s plcdf (1, [0, 1, 2], [0, i, 1]) 654s ***** error ... 654s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 654s ***** error ... 654s plcdf (1, [0, i, 2], [0, 0.5, 1]) 654s ***** error ... 654s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 654s 17 tests, 17 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/nbininv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nbininv.m 654s ***** demo 654s ## Plot various iCDFs from the negative binomial distribution 654s p = 0.001:0.001:0.999; 654s x1 = nbininv (p, 2, 0.15); 654s x2 = nbininv (p, 5, 0.2); 654s x3 = nbininv (p, 4, 0.4); 654s x4 = nbininv (p, 10, 0.3); 654s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 654s grid on 654s ylim ([0, 40]) 654s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 654s "r = 10, ps = 0.3"}, "location", "northwest") 654s title ("Negative binomial iCDF") 654s xlabel ("probability") 654s ylabel ("values in x (number of failures)") 654s ***** shared p 654s p = [-1 0 3/4 1 2]; 654s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 654s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 654s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 654s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 654s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 654s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 654s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 654s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 654s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 654s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 654s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 654s ***** shared y, tol 654s y = magic (3) + 1; 654s tol = 1; 654s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 654s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 654s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 654s ***** error nbininv () 654s ***** error nbininv (1) 654s ***** error nbininv (1, 2) 654s ***** error ... 654s nbininv (ones (3), ones (2), ones (2)) 654s ***** error ... 654s nbininv (ones (2), ones (3), ones (2)) 654s ***** error ... 654s nbininv (ones (2), ones (2), ones (3)) 654s ***** error nbininv (i, 2, 2) 654s ***** error nbininv (2, i, 2) 654s ***** error nbininv (2, 2, i) 654s 23 tests, 23 passed, 0 known failure, 0 skipped 654s [inst/dist_fun/gevinv.m] 654s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gevinv.m 654s ***** demo 654s ## Plot various iCDFs from the generalized extreme value distribution 654s p = 0.001:0.001:0.999; 654s x1 = gevinv (p, 1, 1, 1); 654s x2 = gevinv (p, 0.5, 1, 1); 654s x3 = gevinv (p, 1, 1, 5); 654s x4 = gevinv (p, 1, 2, 5); 654s x5 = gevinv (p, 1, 5, 5); 654s x6 = gevinv (p, 1, 0.5, 5); 654s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 654s p, x4, "-c", p, x5, "-m", p, x6, "-k") 654s grid on 654s ylim ([-1, 10]) 654s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 654s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 654s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 654s "location", "northwest") 654s title ("Generalized extreme value iCDF") 654s xlabel ("probability") 654s ylabel ("values in x") 654s ***** test 654s p = 0.1:0.1:0.9; 654s k = 0; 654s sigma = 1; 654s mu = 0; 654s x = gevinv (p, k, sigma, mu); 654s c = gevcdf(x, k, sigma, mu); 654s assert (c, p, 0.001); 654s ***** test 654s p = 0.1:0.1:0.9; 654s k = 1; 654s sigma = 1; 654s mu = 0; 654s x = gevinv (p, k, sigma, mu); 654s c = gevcdf(x, k, sigma, mu); 654s assert (c, p, 0.001); 654s ***** test 654s p = 0.1:0.1:0.9; 654s k = 0.3; 654s sigma = 1; 654s mu = 0; 654s x = gevinv (p, k, sigma, mu); 654s c = gevcdf(x, k, sigma, mu); 654s assert (c, p, 0.001); 654s ***** error gevinv () 654s ***** error gevinv (1) 654s ***** error gevinv (1, 2) 654s ***** error gevinv (1, 2, 3) 654s ***** error ... 654s gevinv (ones (3), ones (2), ones(2), ones(2)) 654s ***** error ... 654s gevinv (ones (2), ones (3), ones(2), ones(2)) 655s ***** error ... 655s gevinv (ones (2), ones (2), ones(3), ones(2)) 655s ***** error ... 655s gevinv (ones (2), ones (2), ones(2), ones(3)) 655s ***** error gevinv (i, 2, 3, 4) 655s ***** error gevinv (1, i, 3, 4) 655s ***** error gevinv (1, 2, i, 4) 655s ***** error gevinv (1, 2, 3, i) 655s 15 tests, 15 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/gumbelpdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gumbelpdf.m 655s ***** demo 655s ## Plot various PDFs from the Extreme value distribution 655s x = -5:0.001:20; 655s y1 = gumbelpdf (x, 0.5, 2); 655s y2 = gumbelpdf (x, 1.0, 2); 655s y3 = gumbelpdf (x, 1.5, 3); 655s y4 = gumbelpdf (x, 3.0, 4); 655s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 655s grid on 655s ylim ([0, 0.2]) 655s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 655s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 655s title ("Extreme value PDF") 655s xlabel ("values in x") 655s ylabel ("density") 655s ***** shared x, y0, y1 655s x = [-5, 0, 1, 2, 3]; 655s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 655s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 655s ***** assert (gumbelpdf (x), y0, 1e-4) 655s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 655s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 655s ***** error gumbelpdf () 655s ***** error ... 655s gumbelpdf (ones (3), ones (2), ones (2)) 655s ***** error gumbelpdf (i, 2, 2) 655s ***** error gumbelpdf (2, i, 2) 655s ***** error gumbelpdf (2, 2, i) 655s 8 tests, 8 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/burrcdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/burrcdf.m 655s ***** demo 655s ## Plot various CDFs from the Burr type XII distribution 655s x = 0.001:0.001:5; 655s p1 = burrcdf (x, 1, 1, 1); 655s p2 = burrcdf (x, 1, 1, 2); 655s p3 = burrcdf (x, 1, 1, 3); 655s p4 = burrcdf (x, 1, 2, 1); 655s p5 = burrcdf (x, 1, 3, 1); 655s p6 = burrcdf (x, 1, 0.5, 2); 655s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 655s x, p4, "-c", x, p5, "-m", x, p6, "-k") 655s grid on 655s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 655s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 655s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 655s "location", "southeast") 655s title ("Burr type XII CDF") 655s xlabel ("values in x") 655s ylabel ("probability") 655s ***** shared x, y 655s x = [-1, 0, 1, 2, Inf]; 655s y = [0, 0, 1/2, 2/3, 1]; 655s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 655s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 655s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 655s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 655s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 655s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 655s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 655s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 655s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 655s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 655s ***** error burrcdf () 655s ***** error burrcdf (1) 655s ***** error burrcdf (1, 2) 655s ***** error burrcdf (1, 2, 3) 655s ***** error ... 655s burrcdf (1, 2, 3, 4, 5, 6) 655s ***** error burrcdf (1, 2, 3, 4, "tail") 655s ***** error burrcdf (1, 2, 3, 4, 5) 655s ***** error ... 655s burrcdf (ones (3), ones (2), ones(2), ones(2)) 655s ***** error ... 655s burrcdf (ones (2), ones (3), ones(2), ones(2)) 655s ***** error ... 655s burrcdf (ones (2), ones (2), ones(3), ones(2)) 655s ***** error ... 655s burrcdf (ones (2), ones (2), ones(2), ones(3)) 655s ***** error burrcdf (i, 2, 3, 4) 655s ***** error burrcdf (1, i, 3, 4) 655s ***** error burrcdf (1, 2, i, 4) 655s ***** error burrcdf (1, 2, 3, i) 655s 25 tests, 25 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/invgrnd.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/invgrnd.m 655s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 655s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 655s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 655s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 655s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 655s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 655s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 655s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 655s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 655s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 655s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 655s ***** test 655s r = invgrnd (1, [1, 0, -1]); 655s assert (r([2:3]), [NaN, NaN]) 655s ***** assert (class (invgrnd (1, 0)), "double") 655s ***** assert (class (invgrnd (1, single (0))), "single") 655s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 655s ***** assert (class (invgrnd (1, single (1))), "single") 655s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 655s ***** assert (class (invgrnd (single (1), 1)), "single") 655s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 655s ***** error invgrnd () 655s ***** error invgrnd (1) 655s ***** error ... 655s invgrnd (ones (3), ones (2)) 655s ***** error ... 655s invgrnd (ones (2), ones (3)) 655s ***** error invgrnd (i, 2, 3) 655s ***** error invgrnd (1, i, 3) 655s ***** error ... 655s invgrnd (1, 2, -1) 655s ***** error ... 655s invgrnd (1, 2, 1.2) 655s ***** error ... 655s invgrnd (1, 2, ones (2)) 655s ***** error ... 655s invgrnd (1, 2, [2 -1 2]) 655s ***** error ... 655s invgrnd (1, 2, [2 0 2.5]) 655s ***** error ... 655s invgrnd (1, 2, 2, -1, 5) 655s ***** error ... 655s invgrnd (1, 2, 2, 1.5, 5) 655s ***** error ... 655s invgrnd (2, ones (2), 3) 655s ***** error ... 655s invgrnd (2, ones (2), [3, 2]) 655s ***** error ... 655s invgrnd (2, ones (2), 3, 2) 655s 35 tests, 35 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/bisarnd.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bisarnd.m 655s ***** assert (size (bisarnd (1, 1)), [1 1]) 655s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 655s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 655s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 655s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 655s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 655s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 655s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 655s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 655s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 655s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 655s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 655s ***** assert (class (bisarnd (1, 1)), "double") 655s ***** assert (class (bisarnd (1, single (1))), "single") 655s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 655s ***** assert (class (bisarnd (single (1), 1)), "single") 655s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 655s ***** error bisarnd () 655s ***** error bisarnd (1) 655s ***** error ... 655s bisarnd (ones (3), ones (2)) 655s ***** error ... 655s bisarnd (ones (2), ones (3)) 655s ***** error bisarnd (i, 2, 3) 655s ***** error bisarnd (1, i, 3) 655s ***** error ... 655s bisarnd (1, 2, -1) 655s ***** error ... 655s bisarnd (1, 2, 1.2) 655s ***** error ... 655s bisarnd (1, 2, ones (2)) 655s ***** error ... 655s bisarnd (1, 2, [2 -1 2]) 655s ***** error ... 655s bisarnd (1, 2, [2 0 2.5]) 655s ***** error ... 655s bisarnd (1, 2, 2, -1, 5) 655s ***** error ... 655s bisarnd (1, 2, 2, 1.5, 5) 655s ***** error ... 655s bisarnd (2, ones (2), 3) 655s ***** error ... 655s bisarnd (2, ones (2), [3, 2]) 655s ***** error ... 655s bisarnd (2, ones (2), 3, 2) 655s 33 tests, 33 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/lognpdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/lognpdf.m 655s ***** demo 655s ## Plot various PDFs from the log-normal distribution 655s x = 0:0.01:5; 655s y1 = lognpdf (x, 0, 1); 655s y2 = lognpdf (x, 0, 0.5); 655s y3 = lognpdf (x, 0, 0.25); 655s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 655s grid on 655s ylim ([0, 2]) 655s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 655s "location", "northeast") 655s title ("Log-normal PDF") 655s xlabel ("values in x") 655s ylabel ("density") 655s ***** shared x, y 655s x = [-1 0 e Inf]; 655s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 655s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 655s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 655s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 655s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 655s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 655s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 655s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 655s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 655s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 655s ***** error lognpdf () 655s ***** error lognpdf (1,2,3,4) 655s ***** error lognpdf (ones (3), ones (2), ones (2)) 655s ***** error lognpdf (ones (2), ones (3), ones (2)) 655s ***** error lognpdf (ones (2), ones (2), ones (3)) 655s ***** error lognpdf (i, 2, 2) 655s ***** error lognpdf (2, i, 2) 655s ***** error lognpdf (2, 2, i) 655s 17 tests, 17 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/evinv.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/evinv.m 655s ***** demo 655s ## Plot various iCDFs from the extreme value distribution 655s p = 0.001:0.001:0.999; 655s x1 = evinv (p, 0.5, 2); 655s x2 = evinv (p, 1.0, 2); 655s x3 = evinv (p, 1.5, 3); 655s x4 = evinv (p, 3.0, 4); 655s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 655s grid on 655s ylim ([-10, 10]) 655s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 655s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 655s title ("Extreme value iCDF") 655s xlabel ("probability") 655s ylabel ("values in x") 655s ***** shared p, x 655s p = [0, 0.05, 0.5 0.95]; 655s x = [-Inf, -2.9702, -0.3665, 1.0972]; 655s ***** assert (evinv (p), x, 1e-4) 655s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 655s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 655s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 655s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 655s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 655s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 655s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 655s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 655s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 655s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 655s ***** error evinv () 655s ***** error evinv (1,2,3,4,5,6) 655s ***** error ... 655s evinv (ones (3), ones (2), ones (2)) 655s ***** error ... 655s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 655s ***** error ... 655s [p, plo, pup] = evinv (1, 2, 3) 655s ***** error [p, plo, pup] = ... 655s evinv (1, 2, 3, [1, 0; 0, 1], 0) 655s ***** error [p, plo, pup] = ... 655s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 655s ***** error evinv (i, 2, 2) 655s ***** error evinv (2, i, 2) 655s ***** error evinv (2, 2, i) 655s ***** error ... 655s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 655s 22 tests, 22 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/iwishrnd.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/iwishrnd.m 655s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 655s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 655s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 655s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 655s ***** error iwishrnd () 655s ***** error iwishrnd (1) 655s ***** error iwishrnd ([-3 1; 1 3],1) 655s ***** error iwishrnd ([1; 1],1) 655s 8 tests, 8 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/geopdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/geopdf.m 655s ***** demo 655s ## Plot various PDFs from the geometric distribution 655s x = 0:10; 655s y1 = geopdf (x, 0.2); 655s y2 = geopdf (x, 0.5); 655s y3 = geopdf (x, 0.7); 655s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 655s grid on 655s ylim ([0, 0.8]) 655s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 655s title ("Geometric PDF") 655s xlabel ("values in x (number of failures)") 655s ylabel ("density") 655s ***** shared x, y 655s x = [-1 0 1 Inf]; 655s y = [0, 1/2, 1/4, NaN]; 655s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 655s ***** assert (geopdf (x, 0.5), y) 655s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 655s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 655s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 655s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 655s ***** error geopdf () 655s ***** error geopdf (1) 655s ***** error geopdf (1,2,3) 655s ***** error geopdf (ones (3), ones (2)) 655s ***** error geopdf (ones (2), ones (3)) 655s ***** error geopdf (i, 2) 655s ***** error geopdf (2, i) 655s 13 tests, 13 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/tlsrnd.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tlsrnd.m 655s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 655s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 655s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 655s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 655s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 655s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 655s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 655s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 655s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 655s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 655s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 655s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 655s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 655s ***** assert (class (tlsrnd (1, 2, 3)), "double") 655s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 655s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 655s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 655s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 655s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 655s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 655s ***** error tlsrnd () 655s ***** error tlsrnd (1) 655s ***** error tlsrnd (1, 2) 655s ***** error ... 655s tlsrnd (ones (3), ones (2), 1) 655s ***** error ... 655s tlsrnd (ones (2), 1, ones (3)) 655s ***** error ... 655s tlsrnd (1, ones (2), ones (3)) 655s ***** error tlsrnd (i, 2, 3) 655s ***** error tlsrnd (1, i, 3) 655s ***** error tlsrnd (1, 2, i) 655s ***** error ... 655s tlsrnd (1, 2, 3, -1) 655s ***** error ... 655s tlsrnd (1, 2, 3, 1.2) 655s ***** error ... 655s tlsrnd (1, 2, 3, ones (2)) 655s ***** error ... 655s tlsrnd (1, 2, 3, [2 -1 2]) 655s ***** error ... 655s tlsrnd (1, 2, 3, [2 0 2.5]) 655s ***** error ... 655s tlsrnd (ones (2), 2, 3, ones (2)) 655s ***** error ... 655s tlsrnd (1, 2, 3, 2, -1, 5) 655s ***** error ... 655s tlsrnd (1, 2, 3, 2, 1.5, 5) 655s ***** error ... 655s tlsrnd (ones (2,2), 2, 3, 3) 655s ***** error ... 655s tlsrnd (1, ones (2,2), 3, 3) 655s ***** error ... 655s tlsrnd (1, 2, ones (2,2), 3) 655s ***** error ... 655s tlsrnd (1, 2, ones (2,2), [3, 3]) 655s ***** error ... 655s tlsrnd (1, 2, ones (2,2), 2, 3) 655s 42 tests, 42 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/invginv.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/invginv.m 655s ***** demo 655s ## Plot various iCDFs from the inverse Gaussian distribution 655s p = 0.001:0.001:0.999; 655s x1 = invginv (p, 1, 0.2); 655s x2 = invginv (p, 1, 1); 655s x3 = invginv (p, 1, 3); 655s x4 = invginv (p, 3, 0.2); 655s x5 = invginv (p, 3, 1); 655s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 655s grid on 655s ylim ([0, 3]) 655s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 655s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 655s title ("Inverse Gaussian iCDF") 655s xlabel ("probability") 655s ylabel ("x") 655s ***** shared p, x 655s p = [0, 0.3829, 0.6827, 1]; 655s x = [0, 0.5207, 1.0376, Inf]; 655s ***** assert (invginv (p, 1, 1), x, 1e-4); 655s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 655s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 655s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 655s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 655s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 655s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 655s ***** error invginv (1) 655s ***** error invginv (1, 2) 655s ***** error ... 655s invginv (1, ones (2), ones (3)) 655s ***** error ... 655s invginv (ones (2), 1, ones (3)) 655s ***** error ... 655s invginv (ones (2), ones (3), 1) 655s ***** error invginv (i, 2, 3) 655s ***** error invginv (1, i, 3) 655s ***** error invginv (1, 2, i) 655s 15 tests, 15 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/loglcdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/loglcdf.m 655s ***** demo 655s ## Plot various CDFs from the log-logistic distribution 655s x = 0:0.001:2; 655s p1 = loglcdf (x, log (1), 1/0.5); 655s p2 = loglcdf (x, log (1), 1); 655s p3 = loglcdf (x, log (1), 1/2); 655s p4 = loglcdf (x, log (1), 1/4); 655s p5 = loglcdf (x, log (1), 1/8); 655s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 655s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 655s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 655s grid on 655s title ("Log-logistic CDF") 655s xlabel ("values in x") 655s ylabel ("probability") 655s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 655s ***** shared out1, out2 655s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 655s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 655s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 655s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 655s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 655s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 655s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 655s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 655s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 655s ***** assert (class (loglcdf (1, single (2), 3)), "single") 655s ***** assert (class (loglcdf (1, 2, single (3))), "single") 655s ***** error loglcdf (1) 655s ***** error loglcdf (1, 2) 655s ***** error ... 655s loglcdf (1, 2, 3, 4) 655s ***** error ... 655s loglcdf (1, 2, 3, "uper") 655s ***** error ... 655s loglcdf (1, ones (2), ones (3)) 655s ***** error ... 655s loglcdf (1, ones (2), ones (3), "upper") 655s ***** error ... 655s loglcdf (ones (2), 1, ones (3)) 655s ***** error ... 655s loglcdf (ones (2), 1, ones (3), "upper") 655s ***** error ... 655s loglcdf (ones (2), ones (3), 1) 655s ***** error ... 655s loglcdf (ones (2), ones (3), 1, "upper") 655s ***** error loglcdf (i, 2, 3) 655s ***** error loglcdf (i, 2, 3, "upper") 655s ***** error loglcdf (1, i, 3) 655s ***** error loglcdf (1, i, 3, "upper") 655s ***** error loglcdf (1, 2, i) 655s ***** error loglcdf (1, 2, i, "upper") 655s 25 tests, 25 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/cauchycdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/cauchycdf.m 655s ***** demo 655s ## Plot various CDFs from the Cauchy distribution 655s x = -5:0.01:5; 655s p1 = cauchycdf (x, 0, 0.5); 655s p2 = cauchycdf (x, 0, 1); 655s p3 = cauchycdf (x, 0, 2); 655s p4 = cauchycdf (x, -2, 1); 655s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 655s grid on 655s xlim ([-5, 5]) 655s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 655s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 655s title ("Cauchy CDF") 655s xlabel ("values in x") 655s ylabel ("probability") 655s ***** shared x, y 655s x = [-1 0 0.5 1 2]; 655s y = 1/pi * atan ((x-1) / 2) + 1/2; 655s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 655s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 655s ***** assert (cauchycdf (x, ones (1,5), 2), y) 655s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 655s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 655s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 655s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 655s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 655s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 655s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 655s ***** error cauchycdf () 655s ***** error cauchycdf (1) 655s ***** error ... 655s cauchycdf (1, 2) 655s ***** error ... 655s cauchycdf (1, 2, 3, 4, 5) 655s ***** error cauchycdf (1, 2, 3, "tail") 655s ***** error cauchycdf (1, 2, 3, 4) 655s ***** error ... 655s cauchycdf (ones (3), ones (2), ones (2)) 655s ***** error ... 655s cauchycdf (ones (2), ones (3), ones (2)) 655s ***** error ... 655s cauchycdf (ones (2), ones (2), ones (3)) 655s ***** error cauchycdf (i, 2, 2) 655s ***** error cauchycdf (2, i, 2) 655s ***** error cauchycdf (2, 2, i) 655s 22 tests, 22 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/mvtrnd.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvtrnd.m 655s ***** test 655s rho = [1, 0.5; 0.5, 1]; 655s df = 3; 655s n = 10; 655s r = mvtrnd (rho, df, n); 655s assert (size (r), [10, 2]); 655s ***** test 655s rho = [1, 0.5; 0.5, 1]; 655s df = [2; 3]; 655s n = 2; 655s r = mvtrnd (rho, df, 2); 655s assert (size (r), [2, 2]); 655s 2 tests, 2 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/logiinv.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logiinv.m 655s ***** demo 655s ## Plot various iCDFs from the logistic distribution 655s p = 0.001:0.001:0.999; 655s x1 = logiinv (p, 5, 2); 655s x2 = logiinv (p, 9, 3); 655s x3 = logiinv (p, 9, 4); 655s x4 = logiinv (p, 6, 2); 655s x5 = logiinv (p, 2, 1); 655s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 655s grid on 655s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 655s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 655s title ("Logistic iCDF") 655s xlabel ("probability") 655s ylabel ("x") 655s ***** test 655s p = [0.01:0.01:0.99]; 655s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 655s ***** shared p 655s p = [-1 0 0.5 1 2]; 655s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 655s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 655s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 655s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 655s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 655s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 655s ***** error logiinv () 655s ***** error logiinv (1) 655s ***** error ... 655s logiinv (1, 2) 655s ***** error ... 655s logiinv (1, ones (2), ones (3)) 655s ***** error ... 655s logiinv (ones (2), 1, ones (3)) 655s ***** error ... 655s logiinv (ones (2), ones (3), 1) 655s ***** error logiinv (i, 2, 3) 655s ***** error logiinv (1, i, 3) 655s ***** error logiinv (1, 2, i) 655s 16 tests, 16 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/bisacdf.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bisacdf.m 655s ***** demo 655s ## Plot various CDFs from the Birnbaum-Saunders distribution 655s x = 0.01:0.01:4; 655s p1 = bisacdf (x, 1, 0.5); 655s p2 = bisacdf (x, 1, 1); 655s p3 = bisacdf (x, 1, 2); 655s p4 = bisacdf (x, 1, 5); 655s p5 = bisacdf (x, 1, 10); 655s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 655s grid on 655s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 655s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 655s title ("Birnbaum-Saunders CDF") 655s xlabel ("values in x") 655s ylabel ("probability") 655s ***** demo 655s ## Plot various CDFs from the Birnbaum-Saunders distribution 655s x = 0.01:0.01:6; 655s p1 = bisacdf (x, 1, 0.3); 655s p2 = bisacdf (x, 2, 0.3); 655s p3 = bisacdf (x, 1, 0.5); 655s p4 = bisacdf (x, 3, 0.5); 655s p5 = bisacdf (x, 5, 0.5); 655s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 655s grid on 655s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 655s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 655s title ("Birnbaum-Saunders CDF") 655s xlabel ("values in x") 655s ylabel ("probability") 655s ***** shared x, y 655s x = [-1, 0, 1, 2, Inf]; 655s y = [0, 0, 1/2, 0.76024993890652337, 1]; 655s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 655s ***** assert (bisacdf (x, 1, 1), y, eps) 655s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 655s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 655s ***** assert (bisacdf (x, 1, 1), y, eps) 655s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 655s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 655s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 655s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 655s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 655s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 655s ***** error bisacdf () 655s ***** error bisacdf (1) 655s ***** error bisacdf (1, 2) 655s ***** error ... 655s bisacdf (1, 2, 3, 4, 5) 655s ***** error bisacdf (1, 2, 3, "tail") 655s ***** error bisacdf (1, 2, 3, 4) 655s ***** error ... 655s bisacdf (ones (3), ones (2), ones(2)) 655s ***** error ... 655s bisacdf (ones (2), ones (3), ones(2)) 655s ***** error ... 655s bisacdf (ones (2), ones (2), ones(3)) 655s ***** error bisacdf (i, 4, 3) 655s ***** error bisacdf (1, i, 3) 655s ***** error bisacdf (1, 4, i) 655s 23 tests, 23 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/triinv.m] 655s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/triinv.m 655s ***** demo 655s ## Plot various iCDFs from the triangular distribution 655s p = 0.001:0.001:0.999; 655s x1 = triinv (p, 3, 6, 4); 655s x2 = triinv (p, 1, 5, 2); 655s x3 = triinv (p, 2, 9, 3); 655s x4 = triinv (p, 2, 9, 5); 655s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 655s grid on 655s ylim ([0, 10]) 655s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 655s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 655s "location", "northwest") 655s title ("Triangular CDF") 655s xlabel ("probability") 655s ylabel ("values in x") 655s ***** shared p, y 655s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 655s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 655s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 655s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 655s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 655s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 655s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 655s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 655s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 655s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 655s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 655s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 655s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 655s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 655s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 655s ***** error triinv () 655s ***** error triinv (1) 655s ***** error triinv (1, 2) 655s ***** error triinv (1, 2, 3) 655s ***** error ... 655s triinv (1, 2, 3, 4, 5) 655s ***** error ... 655s triinv (ones (3), ones (2), ones(2), ones(2)) 655s ***** error ... 655s triinv (ones (2), ones (3), ones(2), ones(2)) 655s ***** error ... 655s triinv (ones (2), ones (2), ones(3), ones(2)) 655s ***** error ... 655s triinv (ones (2), ones (2), ones(2), ones(3)) 655s ***** error triinv (i, 2, 3, 4) 655s ***** error triinv (1, i, 3, 4) 655s ***** error triinv (1, 2, i, 4) 655s ***** error triinv (1, 2, 3, i) 655s 26 tests, 26 passed, 0 known failure, 0 skipped 655s [inst/dist_fun/betapdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/betapdf.m 656s ***** demo 656s ## Plot various PDFs from the Beta distribution 656s x = 0.001:0.001:0.999; 656s y1 = betapdf (x, 0.5, 0.5); 656s y2 = betapdf (x, 5, 1); 656s y3 = betapdf (x, 1, 3); 656s y4 = betapdf (x, 2, 2); 656s y5 = betapdf (x, 2, 5); 656s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 656s grid on 656s ylim ([0, 2.5]) 656s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 656s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 656s title ("Beta PDF") 656s xlabel ("values in x") 656s ylabel ("density") 656s ***** shared x, y 656s x = [-1 0 0.5 1 2]; 656s y = [0 2 1 0 0]; 656s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 656s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 656s ***** assert (betapdf (x, ones (1, 5), 2), y) 656s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 656s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 656s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 656s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 656s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 656s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 656s ***** test 656s x = rand (10,1); 656s y = 1 ./ (pi * sqrt (x .* (1 - x))); 656s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 656s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 656s ***** error betapdf () 656s ***** error betapdf (1) 656s ***** error betapdf (1,2) 656s ***** error betapdf (1,2,3,4) 656s ***** error ... 656s betapdf (ones (3), ones (2), ones (2)) 656s ***** error ... 656s betapdf (ones (2), ones (3), ones (2)) 656s ***** error ... 656s betapdf (ones (2), ones (2), ones (3)) 656s ***** error betapdf (i, 2, 2) 656s ***** error betapdf (2, i, 2) 656s ***** error betapdf (2, 2, i) 656s 21 tests, 21 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/wienrnd.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/wienrnd.m 656s ***** error wienrnd (0) 656s ***** error wienrnd (1, 3, -50) 656s ***** error wienrnd (5, 0) 656s ***** error wienrnd (0.4, 3, 5) 656s ***** error wienrnd ([1 4], 3, 5) 656s 5 tests, 5 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/expcdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/expcdf.m 656s ***** demo 656s ## Plot various CDFs from the exponential distribution 656s x = 0:0.01:5; 656s p1 = expcdf (x, 2/3); 656s p2 = expcdf (x, 1.0); 656s p3 = expcdf (x, 2.0); 656s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 656s grid on 656s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 656s title ("Exponential CDF") 656s xlabel ("values in x") 656s ylabel ("probability") 656s ***** shared x, p 656s x = [-1 0 0.5 1 Inf]; 656s p = [0, 1 - exp(-x(2:end)/2)]; 656s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 656s ***** assert (expcdf (x, 2), p, 1e-16) 656s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 656s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 656s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 656s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 656s ***** test 656s [p, plo, pup] = expcdf (1, 2, 3); 656s assert (p, 0.39346934028737, 1e-14); 656s assert (plo, 0.08751307220484, 1e-14); 656s assert (pup, 0.93476821257933, 1e-14); 656s ***** test 656s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 656s assert (p, 0.39346934028737, 1e-14); 656s assert (plo, 0.14466318041675, 1e-14); 656s assert (pup, 0.79808291849140, 1e-14); 656s ***** test 656s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 656s assert (p, 0.60653065971263, 1e-14); 656s assert (plo, 0.20191708150860, 1e-14); 656s assert (pup, 0.85533681958325, 1e-14); 656s ***** error expcdf () 656s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 656s ***** error expcdf (1, 2, 3, 4, "uper") 656s ***** error ... 656s expcdf (ones (3), ones (2)) 656s ***** error ... 656s expcdf (2, 3, [1, 2]) 656s ***** error ... 656s [p, plo, pup] = expcdf (1, 2) 656s ***** error [p, plo, pup] = ... 656s expcdf (1, 2, 3, 0) 656s ***** error [p, plo, pup] = ... 656s expcdf (1, 2, 3, 1.22) 656s ***** error [p, plo, pup] = ... 656s expcdf (1, 2, 3, "alpha", "upper") 656s ***** error expcdf (i, 2) 656s ***** error expcdf (2, i) 656s ***** error ... 656s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 656s 21 tests, 21 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/ncfinv.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncfinv.m 656s ***** demo 656s ## Plot various iCDFs from the noncentral F distribution 656s p = 0.001:0.001:0.999; 656s x1 = ncfinv (p, 2, 5, 1); 656s x2 = ncfinv (p, 2, 5, 2); 656s x3 = ncfinv (p, 5, 10, 1); 656s x4 = ncfinv (p, 10, 20, 10); 656s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 656s grid on 656s ylim ([0, 5]) 656s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 656s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 656s "location", "northwest") 656s title ("Noncentral F iCDF") 656s xlabel ("probability") 656s ylabel ("values in x") 656s ***** demo 656s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 656s ## same number of numerator and denominator degrees of freedom (5, 20) 656s 656s p = 0.001:0.001:0.999; 656s x1 = ncfinv (p, 5, 20, 10); 656s x2 = finv (p, 5, 20); 656s plot (p, x1, "-", p, x2, "-"); 656s grid on 656s ylim ([0, 10]) 656s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 656s title ("Noncentral F vs F quantile functions") 656s xlabel ("probability") 656s ylabel ("values in x") 656s ***** test 656s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 656s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 656s ***** test 656s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 656s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 656s ***** test 656s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 656s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 656s ***** test 656s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 656s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 656s ***** test 656s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 656s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 656s ***** test 656s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 656s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 656s ***** test 656s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 656s ***** error ncfinv () 656s ***** error ncfinv (1) 656s ***** error ncfinv (1, 2) 656s ***** error ncfinv (1, 2, 3) 656s ***** error ... 656s ncfinv (ones (3), ones (2), ones (2), ones (2)) 656s ***** error ... 656s ncfinv (ones (2), ones (3), ones (2), ones (2)) 656s ***** error ... 656s ncfinv (ones (2), ones (2), ones (3), ones (2)) 656s ***** error ... 656s ncfinv (ones (2), ones (2), ones (2), ones (3)) 656s ***** error ncfinv (i, 2, 2, 2) 656s ***** error ncfinv (2, i, 2, 2) 656s ***** error ncfinv (2, 2, i, 2) 656s ***** error ncfinv (2, 2, 2, i) 656s 19 tests, 19 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/unidrnd.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unidrnd.m 656s ***** assert (size (unidrnd (2)), [1, 1]) 656s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 656s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 656s ***** assert (size (unidrnd (1, 3)), [3, 3]) 656s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 656s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 656s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 656s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 656s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 656s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 656s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 656s ***** assert (unidrnd (0, 1, 1), NaN) 656s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 656s ***** assert (class (unidrnd (2)), "double") 656s ***** assert (class (unidrnd (single (2))), "single") 656s ***** assert (class (unidrnd (single ([2 2]))), "single") 656s ***** error unidrnd () 656s ***** error unidrnd (i) 656s ***** error ... 656s unidrnd (1, -1) 656s ***** error ... 656s unidrnd (1, 1.2) 656s ***** error ... 656s unidrnd (1, ones (2)) 656s ***** error ... 656s unidrnd (1, [2 -1 2]) 656s ***** error ... 656s unidrnd (1, [2 0 2.5]) 656s ***** error ... 656s unidrnd (ones (2), ones (2)) 656s ***** error ... 656s unidrnd (1, 2, -1, 5) 656s ***** error ... 656s unidrnd (1, 2, 1.5, 5) 656s ***** error unidrnd (ones (2,2), 3) 656s ***** error unidrnd (ones (2,2), [3, 2]) 656s ***** error unidrnd (ones (2,2), 2, 3) 656s 29 tests, 29 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/riceinv.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/riceinv.m 656s ***** demo 656s ## Plot various iCDFs from the Rician distribution 656s p = 0.001:0.001:0.999; 656s x1 = riceinv (p, 0, 1); 656s x2 = riceinv (p, 0.5, 1); 656s x3 = riceinv (p, 1, 1); 656s x4 = riceinv (p, 2, 1); 656s x5 = riceinv (p, 4, 1); 656s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 656s grid on 656s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 656s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 656s title ("Rician iCDF") 656s xlabel ("probability") 656s ylabel ("values in x") 656s ***** shared p 656s p = [-1 0 0.75 1 2]; 656s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 656s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 656s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 656s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 656s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 656s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 656s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 656s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 656s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 656s ***** assert (riceinv ([p, NaN], single (1), 2), ... 656s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 656s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 656s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 656s ***** error riceinv () 656s ***** error riceinv (1) 656s ***** error riceinv (1,2) 656s ***** error riceinv (1,2,3,4) 656s ***** error ... 656s riceinv (ones (3), ones (2), ones (2)) 656s ***** error ... 656s riceinv (ones (2), ones (3), ones (2)) 656s ***** error ... 656s riceinv (ones (2), ones (2), ones (3)) 656s ***** error riceinv (i, 2, 2) 656s ***** error riceinv (2, i, 2) 656s ***** error riceinv (2, 2, i) 656s 20 tests, 20 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/cauchyrnd.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/cauchyrnd.m 656s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 656s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 656s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 656s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 656s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 656s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 656s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 656s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 656s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 656s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 656s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 656s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 656s ***** assert (class (cauchyrnd (1, 1)), "double") 656s ***** assert (class (cauchyrnd (1, single (1))), "single") 656s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 656s ***** assert (class (cauchyrnd (single (1), 1)), "single") 656s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 656s ***** error cauchyrnd () 656s ***** error cauchyrnd (1) 656s ***** error ... 656s cauchyrnd (ones (3), ones (2)) 656s ***** error ... 656s cauchyrnd (ones (2), ones (3)) 656s ***** error cauchyrnd (i, 2, 3) 656s ***** error cauchyrnd (1, i, 3) 656s ***** error ... 656s cauchyrnd (1, 2, -1) 656s ***** error ... 656s cauchyrnd (1, 2, 1.2) 656s ***** error ... 656s cauchyrnd (1, 2, ones (2)) 656s ***** error ... 656s cauchyrnd (1, 2, [2 -1 2]) 656s ***** error ... 656s cauchyrnd (1, 2, [2 0 2.5]) 656s ***** error ... 656s cauchyrnd (1, 2, 2, -1, 5) 656s ***** error ... 656s cauchyrnd (1, 2, 2, 1.5, 5) 656s ***** error ... 656s cauchyrnd (2, ones (2), 3) 656s ***** error ... 656s cauchyrnd (2, ones (2), [3, 2]) 656s ***** error ... 656s cauchyrnd (2, ones (2), 3, 2) 656s 33 tests, 33 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/ncx2rnd.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncx2rnd.m 656s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 656s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 656s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 656s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 656s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 656s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 656s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 656s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 656s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 656s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 656s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 656s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 656s ***** assert (class (ncx2rnd (1, 1)), "double") 656s ***** assert (class (ncx2rnd (1, single (1))), "single") 656s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 656s ***** assert (class (ncx2rnd (single (1), 1)), "single") 656s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 656s ***** error ncx2rnd () 656s ***** error ncx2rnd (1) 656s ***** error ... 656s ncx2rnd (ones (3), ones (2)) 656s ***** error ... 656s ncx2rnd (ones (2), ones (3)) 656s ***** error ncx2rnd (i, 2) 656s ***** error ncx2rnd (1, i) 656s ***** error ... 656s ncx2rnd (1, 2, -1) 656s ***** error ... 656s ncx2rnd (1, 2, 1.2) 656s ***** error ... 656s ncx2rnd (1, 2, ones (2)) 656s ***** error ... 656s ncx2rnd (1, 2, [2 -1 2]) 656s ***** error ... 656s ncx2rnd (1, 2, [2 0 2.5]) 656s ***** error ... 656s ncx2rnd (1, 2, 2, -1, 5) 656s ***** error ... 656s ncx2rnd (1, 2, 2, 1.5, 5) 656s ***** error ... 656s ncx2rnd (2, ones (2), 3) 656s ***** error ... 656s ncx2rnd (2, ones (2), [3, 2]) 656s ***** error ... 656s ncx2rnd (2, ones (2), 3, 2) 656s 33 tests, 33 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/binoinv.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/binoinv.m 656s ***** demo 656s ## Plot various iCDFs from the binomial distribution 656s p = 0.001:0.001:0.999; 656s x1 = binoinv (p, 20, 0.5); 656s x2 = binoinv (p, 20, 0.7); 656s x3 = binoinv (p, 40, 0.5); 656s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 656s grid on 656s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 656s "n = 40, ps = 0.5"}, "location", "southeast") 656s title ("Binomial iCDF") 656s xlabel ("probability") 656s ylabel ("values in x (number of successes)") 656s ***** shared p 656s p = [-1 0 0.5 1 2]; 656s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 656s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 656s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 656s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 656s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 656s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 656s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 656s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 656s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 656s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 656s ***** shared x, tol 656s x = magic (3) + 1; 656s tol = 1; 656s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 656s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 656s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 656s ***** error binoinv () 656s ***** error binoinv (1) 656s ***** error binoinv (1,2) 656s ***** error binoinv (1,2,3,4) 656s ***** error ... 656s binoinv (ones (3), ones (2), ones (2)) 656s ***** error ... 656s binoinv (ones (2), ones (3), ones (2)) 656s ***** error ... 656s binoinv (ones (2), ones (2), ones (3)) 656s ***** error binoinv (i, 2, 2) 656s ***** error binoinv (2, i, 2) 656s ***** error binoinv (2, 2, i) 656s 23 tests, 23 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/unifrnd.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unifrnd.m 656s ***** assert (size (unifrnd (1, 1)), [1 1]) 656s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 656s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 656s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 656s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 656s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 656s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 656s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 656s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 656s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 656s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 656s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 656s ***** assert (class (unifrnd (1, 1)), "double") 656s ***** assert (class (unifrnd (1, single (1))), "single") 656s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 656s ***** assert (class (unifrnd (single (1), 1)), "single") 656s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 656s ***** error unifrnd () 656s ***** error unifrnd (1) 656s ***** error ... 656s unifrnd (ones (3), ones (2)) 656s ***** error ... 656s unifrnd (ones (2), ones (3)) 656s ***** error unifrnd (i, 2, 3) 656s ***** error unifrnd (1, i, 3) 656s ***** error ... 656s unifrnd (1, 2, -1) 656s ***** error ... 656s unifrnd (1, 2, 1.2) 656s ***** error ... 656s unifrnd (1, 2, ones (2)) 656s ***** error ... 656s unifrnd (1, 2, [2 -1 2]) 656s ***** error ... 656s unifrnd (1, 2, [2 0 2.5]) 656s ***** error ... 656s unifrnd (1, 2, 2, -1, 5) 656s ***** error ... 656s unifrnd (1, 2, 2, 1.5, 5) 656s ***** error ... 656s unifrnd (2, ones (2), 3) 656s ***** error ... 656s unifrnd (2, ones (2), [3, 2]) 656s ***** error ... 656s unifrnd (2, ones (2), 3, 2) 656s 33 tests, 33 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/mvtpdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvtpdf.m 656s ***** demo 656s ## Compute the pdf of a multivariate t distribution with correlation 656s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 656s 656s rho = [1, 0.4; 0.4, 1]; 656s df = 2; 656s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 656s X = [X1(:), X2(:)]; 656s y = mvtpdf (X, rho, df); 656s surf (X1, X2, reshape (y, 25, 25)); 656s title ("Bivariate Student's t probability density function"); 656s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 656s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 656s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 656s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 656s [0.04713313 0.03722421 0.02069011]', 1E-7) 656s 3 tests, 3 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/ncx2cdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncx2cdf.m 656s ***** demo 656s ## Plot various CDFs from the noncentral chi-squared distribution 656s x = 0:0.1:10; 656s p1 = ncx2cdf (x, 2, 1); 656s p2 = ncx2cdf (x, 2, 2); 656s p3 = ncx2cdf (x, 2, 3); 656s p4 = ncx2cdf (x, 4, 1); 656s p5 = ncx2cdf (x, 4, 2); 656s p6 = ncx2cdf (x, 4, 3); 656s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 656s x, p4, "-m", x, p5, "-c", x, p6, "-y") 656s grid on 656s xlim ([0, 10]) 656s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 656s "df = 2, λ = 3", "df = 4, λ = 1", ... 656s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 656s title ("Noncentral chi-squared CDF") 656s xlabel ("values in x") 656s ylabel ("probability") 656s ***** demo 656s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 656s ## chi-squared CDF with the same number of degrees of freedom (4). 656s 656s x = 0:0.1:10; 656s p1 = ncx2cdf (x, 4, 2); 656s p2 = chi2cdf (x, 4); 656s plot (x, p1, "-", x, p2, "-") 656s grid on 656s xlim ([0, 10]) 656s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 656s title ("Noncentral chi-squared vs chi-squared CDFs") 656s xlabel ("values in x") 656s ylabel ("probability") 656s ***** test 656s x = -2:0.1:2; 656s p = ncx2cdf (x, 10, 1); 656s assert (p([1:21]), zeros (1, 21), 3e-84); 656s assert (p(22), 1.521400636466575e-09, 1e-14); 656s assert (p(30), 6.665480510026046e-05, 1e-14); 656s assert (p(41), 0.002406447308399836, 1e-14); 656s ***** test 656s p = ncx2cdf (12, 10, 3); 656s assert (p, 0.4845555602398649, 1e-14); 656s ***** test 656s p = ncx2cdf (2, 3, 2); 656s assert (p, 0.2207330870741212, 1e-14); 656s ***** test 656s p = ncx2cdf (2, 3, 2, "upper"); 656s assert (p, 0.7792669129258789, 1e-14); 656s ***** test 656s p = ncx2cdf ([3, 6], 3, 2, "upper"); 656s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 656s ***** error ncx2cdf () 656s ***** error ncx2cdf (1) 656s ***** error ncx2cdf (1, 2) 656s ***** error ncx2cdf (1, 2, 3, "tail") 656s ***** error ncx2cdf (1, 2, 3, 4) 656s ***** error ... 656s ncx2cdf (ones (3), ones (2), ones (2)) 656s ***** error ... 656s ncx2cdf (ones (2), ones (3), ones (2)) 656s ***** error ... 656s ncx2cdf (ones (2), ones (2), ones (3)) 656s ***** error ncx2cdf (i, 2, 2) 656s ***** error ncx2cdf (2, i, 2) 656s ***** error ncx2cdf (2, 2, i) 656s 16 tests, 16 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/geocdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/geocdf.m 656s ***** demo 656s ## Plot various CDFs from the geometric distribution 656s x = 0:10; 656s p1 = geocdf (x, 0.2); 656s p2 = geocdf (x, 0.5); 656s p3 = geocdf (x, 0.7); 656s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 656s grid on 656s xlim ([0, 10]) 656s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 656s title ("Geometric CDF") 656s xlabel ("values in x (number of failures)") 656s ylabel ("probability") 656s ***** test 656s p = geocdf ([1, 2, 3, 4], 0.25); 656s assert (p(1), 0.4375000000, 1e-14); 656s assert (p(2), 0.5781250000, 1e-14); 656s assert (p(3), 0.6835937500, 1e-14); 656s assert (p(4), 0.7626953125, 1e-14); 656s ***** test 656s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 656s assert (p(1), 0.5625000000, 1e-14); 656s assert (p(2), 0.4218750000, 1e-14); 656s assert (p(3), 0.3164062500, 1e-14); 656s assert (p(4), 0.2373046875, 1e-14); 656s ***** shared x, p 656s x = [-1 0 1 Inf]; 656s p = [0 0.5 0.75 1]; 656s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 656s ***** assert (geocdf (x, 0.5), p) 656s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 656s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 656s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 656s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 656s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 656s ***** error geocdf () 656s ***** error geocdf (1) 656s ***** error ... 656s geocdf (ones (3), ones (2)) 656s ***** error ... 656s geocdf (ones (2), ones (3)) 656s ***** error geocdf (i, 2) 656s ***** error geocdf (2, i) 656s ***** error geocdf (2, 3, "tail") 656s ***** error geocdf (2, 3, 5) 656s 17 tests, 17 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/plpdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/plpdf.m 656s ***** demo 656s ## Plot various PDFs from the Piecewise linear distribution 656s data = 0:0.01:10; 656s x1 = [0, 1, 3, 4, 7, 10]; 656s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 656s x2 = [0, 2, 5, 6, 7, 8]; 656s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 656s y1 = plpdf (data, x1, Fx1); 656s y2 = plpdf (data, x2, Fx2); 656s plot (data, y1, "-b", data, y2, "g") 656s grid on 656s ylim ([0, 0.6]) 656s xlim ([0, 10]) 656s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 656s title ("Piecewise linear CDF") 656s xlabel ("values in data") 656s ylabel ("density") 656s ***** shared x, Fx 656s x = [0, 1, 3, 4, 7, 10]; 656s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 656s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 656s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 656s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 656s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 656s ***** assert (plpdf (8, x, Fx), 0.1, eps); 656s ***** error plpdf () 656s ***** error plpdf (1) 656s ***** error plpdf (1, 2) 656s ***** error ... 656s plpdf (1, [0, 1, 2], [0, 1]) 656s ***** error ... 656s plpdf (1, [0], [1]) 656s ***** error ... 656s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 656s ***** error ... 656s plpdf (1, [0, 1, 2], [0, i, 1]) 656s ***** error ... 656s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 656s ***** error ... 656s plpdf (1, [0, i, 2], [0, 0.5, 1]) 656s ***** error ... 656s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 656s 15 tests, 15 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/gumbelinv.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gumbelinv.m 656s ***** demo 656s ## Plot various iCDFs from the Gumbel distribution 656s p = 0.001:0.001:0.999; 656s x1 = gumbelinv (p, 0.5, 2); 656s x2 = gumbelinv (p, 1.0, 2); 656s x3 = gumbelinv (p, 1.5, 3); 656s x4 = gumbelinv (p, 3.0, 4); 656s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 656s grid on 656s ylim ([-5, 20]) 656s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 656s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 656s title ("Gumbel iCDF") 656s xlabel ("probability") 656s ylabel ("values in x") 656s ***** shared p, x 656s p = [0, 0.05, 0.5 0.95]; 656s x = [-Inf, -1.0972, 0.3665, 2.9702]; 656s ***** assert (gumbelinv (p), x, 1e-4) 656s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 656s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 656s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 656s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 656s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 656s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 656s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 656s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 656s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 656s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 656s p = [0.05, 0.5, 0.95]; 656s x = gumbelinv(p); 656s ***** assert (gumbelcdf(x), p, 1e-4) 656s ***** error gumbelinv () 656s ***** error gumbelinv (1,2,3,4,5,6) 656s ***** error ... 656s gumbelinv (ones (3), ones (2), ones (2)) 656s ***** error ... 656s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 656s ***** error ... 656s [p, plo, pup] = gumbelinv (1, 2, 3) 656s ***** error [p, plo, pup] = ... 656s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 656s ***** error [p, plo, pup] = ... 656s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 656s ***** error gumbelinv (i, 2, 2) 656s ***** error gumbelinv (2, i, 2) 656s ***** error gumbelinv (2, 2, i) 656s ***** error ... 656s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 656s 23 tests, 23 passed, 0 known failure, 0 skipped 656s [inst/dist_fun/tlscdf.m] 656s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tlscdf.m 656s ***** demo 656s ## Plot various CDFs from the location-scale Student's T distribution 656s x = -8:0.01:8; 656s p1 = tlscdf (x, 0, 1, 1); 656s p2 = tlscdf (x, 0, 2, 2); 656s p3 = tlscdf (x, 3, 2, 5); 656s p4 = tlscdf (x, -1, 3, Inf); 656s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 656s grid on 656s xlim ([-8, 8]) 656s ylim ([0, 1]) 656s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 656s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 656s "location", "northwest") 656s title ("Location-scale Student's T CDF") 656s xlabel ("values in x") 656s ylabel ("probability") 656s ***** shared x,y 656s x = [-Inf 0 1 Inf]; 656s y = [0 1/2 3/4 1]; 656s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 656s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 657s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 657s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 657s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 657s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 657s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 657s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 657s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 657s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 657s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 657s ***** error tlscdf () 657s ***** error tlscdf (1) 657s ***** error tlscdf (1, 2) 657s ***** error tlscdf (1, 2, 3) 657s ***** error tlscdf (1, 2, 3, 4, "uper") 657s ***** error tlscdf (1, 2, 3, 4, 5) 657s ***** error ... 657s tlscdf (ones (3), ones (2), 1, 1) 657s ***** error ... 657s tlscdf (ones (3), 1, ones (2), 1) 657s ***** error ... 657s tlscdf (ones (3), 1, 1, ones (2)) 657s ***** error ... 657s tlscdf (ones (3), ones (2), 1, 1, "upper") 657s ***** error ... 657s tlscdf (ones (3), 1, ones (2), 1, "upper") 657s ***** error ... 657s tlscdf (ones (3), 1, 1, ones (2), "upper") 657s ***** error tlscdf (i, 2, 1, 1) 657s ***** error tlscdf (2, i, 1, 1) 657s ***** error tlscdf (2, 1, i, 1) 657s ***** error tlscdf (2, 1, 1, i) 657s 27 tests, 27 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/vmrnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/vmrnd.m 657s ***** assert (size (vmrnd (1, 1)), [1 1]) 657s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 657s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 657s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 657s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 657s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 657s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 657s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 657s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 657s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 657s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 657s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 657s ***** assert (class (vmrnd (1, 1)), "double") 657s ***** assert (class (vmrnd (1, single (1))), "single") 657s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 657s ***** assert (class (vmrnd (single (1), 1)), "single") 657s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 657s ***** error vmrnd () 657s ***** error vmrnd (1) 657s ***** error ... 657s vmrnd (ones (3), ones (2)) 657s ***** error ... 657s vmrnd (ones (2), ones (3)) 657s ***** error vmrnd (i, 2, 3) 657s ***** error vmrnd (1, i, 3) 657s ***** error ... 657s vmrnd (1, 2, -1) 657s ***** error ... 657s vmrnd (1, 2, 1.2) 657s ***** error ... 657s vmrnd (1, 2, ones (2)) 657s ***** error ... 657s vmrnd (1, 2, [2 -1 2]) 657s ***** error ... 657s vmrnd (1, 2, [2 0 2.5]) 657s ***** error ... 657s vmrnd (1, 2, 2, -1, 5) 657s ***** error ... 657s vmrnd (1, 2, 2, 1.5, 5) 657s ***** error ... 657s vmrnd (2, ones (2), 3) 657s ***** error ... 657s vmrnd (2, ones (2), [3, 2]) 657s ***** error ... 657s vmrnd (2, ones (2), 3, 2) 657s 33 tests, 33 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/nctrnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nctrnd.m 657s ***** assert (size (nctrnd (1, 1)), [1 1]) 657s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 657s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 657s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 657s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 657s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 657s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 657s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 657s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 657s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 657s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 657s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 657s ***** assert (class (nctrnd (1, 1)), "double") 657s ***** assert (class (nctrnd (1, single (1))), "single") 657s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 657s ***** assert (class (nctrnd (single (1), 1)), "single") 657s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 657s ***** error nctrnd () 657s ***** error nctrnd (1) 657s ***** error ... 657s nctrnd (ones (3), ones (2)) 657s ***** error ... 657s nctrnd (ones (2), ones (3)) 657s ***** error nctrnd (i, 2) 657s ***** error nctrnd (1, i) 657s ***** error ... 657s nctrnd (1, 2, -1) 657s ***** error ... 657s nctrnd (1, 2, 1.2) 657s ***** error ... 657s nctrnd (1, 2, ones (2)) 657s ***** error ... 657s nctrnd (1, 2, [2 -1 2]) 657s ***** error ... 657s nctrnd (1, 2, [2 0 2.5]) 657s ***** error ... 657s nctrnd (1, 2, 2, -1, 5) 657s ***** error ... 657s nctrnd (1, 2, 2, 1.5, 5) 657s ***** error ... 657s nctrnd (2, ones (2), 3) 657s ***** error ... 657s nctrnd (2, ones (2), [3, 2]) 657s ***** error ... 657s nctrnd (2, ones (2), 3, 2) 657s 33 tests, 33 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/geoinv.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/geoinv.m 657s ***** demo 657s ## Plot various iCDFs from the geometric distribution 657s p = 0.001:0.001:0.999; 657s x1 = geoinv (p, 0.2); 657s x2 = geoinv (p, 0.5); 657s x3 = geoinv (p, 0.7); 657s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 657s grid on 657s ylim ([0, 10]) 657s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 657s title ("Geometric iCDF") 657s xlabel ("probability") 657s ylabel ("values in x (number of failures)") 657s ***** shared p 657s p = [-1 0 0.75 1 2]; 657s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 657s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 657s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 657s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 657s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 657s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 657s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 657s ***** error geoinv () 657s ***** error geoinv (1) 657s ***** error ... 657s geoinv (ones (3), ones (2)) 657s ***** error ... 657s geoinv (ones (2), ones (3)) 657s ***** error ... 657s geoinv (i, 2) 657s ***** error ... 657s geoinv (2, i) 657s 13 tests, 13 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/copulacdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/copulacdf.m 657s ***** test 657s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 657s theta = [1; 2]; 657s p = copulacdf ("Clayton", x, theta); 657s expected_p = [0.1395; 0.1767]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 657s p = copulacdf ("Gumbel", x, 2); 657s expected_p = [0.1464; 0.1464]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 657s theta = [1; 2]; 657s p = copulacdf ("Frank", x, theta); 657s expected_p = [0.0699; 0.0930]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 657s theta = [0.3; 0.7]; 657s p = copulacdf ("AMH", x, theta); 657s expected_p = [0.0629; 0.0959]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 657s theta = [0.2, 0.1, 0.1, 0.05]; 657s p = copulacdf ("FGM", x, theta); 657s expected_p = [0.0558; 0.0293]; 657s assert (p, expected_p, 0.001); 657s 5 tests, 5 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/nbinrnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nbinrnd.m 657s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 657s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 657s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 657s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 657s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 657s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 657s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 657s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 657s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 657s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 657s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 657s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 657s ***** assert (class (nbinrnd (1, 0.5)), "double") 657s ***** assert (class (nbinrnd (1, single (0.5))), "single") 657s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 657s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 657s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 657s ***** error nbinrnd () 657s ***** error nbinrnd (1) 657s ***** error ... 657s nbinrnd (ones (3), ones (2)) 657s ***** error ... 657s nbinrnd (ones (2), ones (3)) 657s ***** error nbinrnd (i, 2, 3) 657s ***** error nbinrnd (1, i, 3) 657s ***** error ... 657s nbinrnd (1, 2, -1) 657s ***** error ... 657s nbinrnd (1, 2, 1.2) 657s ***** error ... 657s nbinrnd (1, 2, ones (2)) 657s ***** error ... 657s nbinrnd (1, 2, [2 -1 2]) 657s ***** error ... 657s nbinrnd (1, 2, [2 0 2.5]) 657s ***** error ... 657s nbinrnd (1, 2, 2, -1, 5) 657s ***** error ... 657s nbinrnd (1, 2, 2, 1.5, 5) 657s ***** error ... 657s nbinrnd (2, ones (2), 3) 657s ***** error ... 657s nbinrnd (2, ones (2), [3, 2]) 657s ***** error ... 657s nbinrnd (2, ones (2), 3, 2) 657s 33 tests, 33 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/nbinpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nbinpdf.m 657s ***** demo 657s ## Plot various PDFs from the negative binomial distribution 657s x = 0:40; 657s y1 = nbinpdf (x, 2, 0.15); 657s y2 = nbinpdf (x, 5, 0.2); 657s y3 = nbinpdf (x, 4, 0.4); 657s y4 = nbinpdf (x, 10, 0.3); 657s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 657s grid on 657s xlim ([0, 40]) 657s ylim ([0, 0.12]) 657s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 657s "r = 10, ps = 0.3"}, "location", "northeast") 657s title ("Negative binomial PDF") 657s xlabel ("values in x (number of failures)") 657s ylabel ("density") 657s ***** shared x, y 657s x = [-1 0 1 2 Inf]; 657s y = [0 1/2 1/4 1/8 NaN]; 657s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 657s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 657s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 657s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 657s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 657s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 657s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 657s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 657s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 657s ***** error nbinpdf () 657s ***** error nbinpdf (1) 657s ***** error nbinpdf (1, 2) 657s ***** error ... 657s nbinpdf (ones (3), ones (2), ones (2)) 657s ***** error ... 657s nbinpdf (ones (2), ones (3), ones (2)) 657s ***** error ... 657s nbinpdf (ones (2), ones (2), ones (3)) 657s ***** error nbinpdf (i, 2, 2) 657s ***** error nbinpdf (2, i, 2) 657s ***** error nbinpdf (2, 2, i) 657s 18 tests, 18 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/mvnpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvnpdf.m 657s ***** demo 657s mu = [1, -1]; 657s sigma = [0.9, 0.4; 0.4, 0.3]; 657s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 657s x = [X1(:), X2(:)]; 657s p = mvnpdf (x, mu, sigma); 657s surf (X1, X2, reshape (p, 25, 25)); 657s ***** error y = mvnpdf (); 657s ***** error y = mvnpdf ([]); 657s ***** error y = mvnpdf (ones (3,3,3)); 657s ***** error ... 657s y = mvnpdf (ones (10, 2), [4, 2, 3]); 657s ***** error ... 657s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 657s ***** error ... 657s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 657s ***** shared x, mu, sigma 657s x = [1, 2, 5, 4, 6]; 657s mu = [2, 0, -1, 1, 4]; 657s sigma = [2, 2, 2, 2, 2]; 657s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 657s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 657s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 657s 9 tests, 9 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/gevcdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gevcdf.m 657s ***** demo 657s ## Plot various CDFs from the generalized extreme value distribution 657s x = -1:0.001:10; 657s p1 = gevcdf (x, 1, 1, 1); 657s p2 = gevcdf (x, 0.5, 1, 1); 657s p3 = gevcdf (x, 1, 1, 5); 657s p4 = gevcdf (x, 1, 2, 5); 657s p5 = gevcdf (x, 1, 5, 5); 657s p6 = gevcdf (x, 1, 0.5, 5); 657s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 657s x, p4, "-c", x, p5, "-m", x, p6, "-k") 657s grid on 657s xlim ([-1, 10]) 657s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 657s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 657s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 657s "location", "southeast") 657s title ("Generalized extreme value CDF") 657s xlabel ("values in x") 657s ylabel ("probability") 657s ***** test 657s x = 0:0.5:2.5; 657s sigma = 1:6; 657s k = 1; 657s mu = 0; 657s p = gevcdf (x, k, sigma, mu); 657s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = -0.5:0.5:2.5; 657s sigma = 0.5; 657s k = 1; 657s mu = 0; 657s p = gevcdf (x, k, sigma, mu); 657s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 657s assert (p, expected_p, 0.001); 657s ***** test # check for continuity for k near 0 657s x = 1; 657s sigma = 0.5; 657s k = -0.03:0.01:0.03; 657s mu = 0; 657s p = gevcdf (x, k, sigma, mu); 657s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 657s assert (p, expected_p, 0.001); 657s ***** error gevcdf () 657s ***** error gevcdf (1) 657s ***** error gevcdf (1, 2) 657s ***** error gevcdf (1, 2, 3) 657s ***** error ... 657s gevcdf (1, 2, 3, 4, 5, 6) 657s ***** error gevcdf (1, 2, 3, 4, "tail") 657s ***** error gevcdf (1, 2, 3, 4, 5) 657s ***** error ... 657s gevcdf (ones (3), ones (2), ones(2), ones(2)) 657s ***** error ... 657s gevcdf (ones (2), ones (3), ones(2), ones(2)) 657s ***** error ... 657s gevcdf (ones (2), ones (2), ones(3), ones(2)) 657s ***** error ... 657s gevcdf (ones (2), ones (2), ones(2), ones(3)) 657s ***** error gevcdf (i, 2, 3, 4) 657s ***** error gevcdf (1, i, 3, 4) 657s ***** error gevcdf (1, 2, i, 4) 657s ***** error gevcdf (1, 2, 3, i) 657s 18 tests, 18 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/unidpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unidpdf.m 657s ***** demo 657s ## Plot various PDFs from the discrete uniform distribution 657s x = 0:10; 657s y1 = unidpdf (x, 5); 657s y2 = unidpdf (x, 9); 657s plot (x, y1, "*b", x, y2, "*g") 657s grid on 657s xlim ([0, 10]) 657s ylim ([0, 0.25]) 657s legend ({"N = 5", "N = 9"}, "location", "northeast") 657s title ("Descrete uniform PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** shared x, y 657s x = [-1 0 1 2 10 11]; 657s y = [0 0 0.1 0.1 0.1 0]; 657s ***** assert (unidpdf (x, 10*ones (1,6)), y) 657s ***** assert (unidpdf (x, 10), y) 657s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 657s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 657s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 657s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 657s ***** error unidpdf () 657s ***** error unidpdf (1) 657s ***** error ... 657s unidpdf (ones (3), ones (2)) 657s ***** error ... 657s unidpdf (ones (2), ones (3)) 657s ***** error unidpdf (i, 2) 657s ***** error unidpdf (2, i) 657s 12 tests, 12 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/tpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tpdf.m 657s ***** demo 657s ## Plot various PDFs from the Student's T distribution 657s x = -5:0.01:5; 657s y1 = tpdf (x, 1); 657s y2 = tpdf (x, 2); 657s y3 = tpdf (x, 5); 657s y4 = tpdf (x, Inf); 657s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 657s grid on 657s xlim ([-5, 5]) 657s ylim ([0, 0.41]) 657s legend ({"df = 1", "df = 2", ... 657s "df = 5", 'df = \infty'}, "location", "northeast") 657s title ("Student's T PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** test 657s x = rand (10,1); 657s y = 1./(pi * (1 + x.^2)); 657s assert (tpdf (x, 1), y, 5*eps); 657s ***** shared x, y 657s x = [-Inf 0 0.5 1 Inf]; 657s y = 1./(pi * (1 + x.^2)); 657s ***** assert (tpdf (x, ones (1,5)), y, eps) 657s ***** assert (tpdf (x, 1), y, eps) 657s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 657s ***** assert (tpdf (x, Inf), normpdf (x)) 657s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 657s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 657s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 657s ***** error tpdf () 657s ***** error tpdf (1) 657s ***** error ... 657s tpdf (ones (3), ones (2)) 657s ***** error ... 657s tpdf (ones (2), ones (3)) 657s ***** error tpdf (i, 2) 657s ***** error tpdf (2, i) 657s 14 tests, 14 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/copularnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/copularnd.m 657s ***** test 657s theta = 0.5; 657s r = copularnd ("Gaussian", theta); 657s assert (size (r), [1, 2]); 657s assert (all ((r >= 0) & (r <= 1))); 657s ***** test 657s theta = 0.5; 657s df = 2; 657s r = copularnd ("t", theta, df); 657s assert (size (r), [1, 2]); 657s assert (all ((r >= 0) & (r <= 1))); 657s ***** test 657s theta = 0.5; 657s r = copularnd ("Clayton", theta); 657s assert (size (r), [1, 2]); 657s assert (all ((r >= 0) & (r <= 1))); 657s ***** test 657s theta = 0.5; 657s n = 2; 657s r = copularnd ("Clayton", theta, n); 657s assert (size (r), [n, 2]); 657s assert (all ((r >= 0) & (r <= 1))); 657s ***** test 657s theta = [1; 2]; 657s n = 2; 657s d = 3; 657s r = copularnd ("Clayton", theta, n, d); 657s assert (size (r), [n, d]); 657s assert (all ((r >= 0) & (r <= 1))); 657s 5 tests, 5 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/laplacepdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/laplacepdf.m 657s ***** demo 657s ## Plot various PDFs from the Laplace distribution 657s x = -10:0.01:10; 657s y1 = laplacepdf (x, 0, 1); 657s y2 = laplacepdf (x, 0, 2); 657s y3 = laplacepdf (x, 0, 4); 657s y4 = laplacepdf (x, -5, 4); 657s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 657s grid on 657s xlim ([-10, 10]) 657s ylim ([0, 0.6]) 657s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 657s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 657s title ("Laplace PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** shared x, y 657s x = [-Inf -log(2) 0 log(2) Inf]; 657s y = [0, 1/4, 1/2, 1/4, 0]; 657s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 657s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 657s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 657s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 657s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 657s ***** error laplacepdf () 657s ***** error laplacepdf (1) 657s ***** error ... 657s laplacepdf (1, 2) 657s ***** error laplacepdf (1, 2, 3, 4) 657s ***** error ... 657s laplacepdf (1, ones (2), ones (3)) 657s ***** error ... 657s laplacepdf (ones (2), 1, ones (3)) 657s ***** error ... 657s laplacepdf (ones (2), ones (3), 1) 657s ***** error laplacepdf (i, 2, 3) 657s ***** error laplacepdf (1, i, 3) 657s ***** error laplacepdf (1, 2, i) 657s 15 tests, 15 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/raylpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/raylpdf.m 657s ***** demo 657s ## Plot various PDFs from the Rayleigh distribution 657s x = 0:0.01:10; 657s y1 = raylpdf (x, 0.5); 657s y2 = raylpdf (x, 1); 657s y3 = raylpdf (x, 2); 657s y4 = raylpdf (x, 3); 657s y5 = raylpdf (x, 4); 657s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 657s grid on 657s ylim ([0, 1.25]) 657s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 657s "σ = 3", "σ = 4"}, "location", "northeast") 657s title ("Rayleigh PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** test 657s x = 0:0.5:2.5; 657s sigma = 1:6; 657s y = raylpdf (x, sigma); 657s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 657s assert (y, expected_y, 0.001); 657s ***** test 657s x = 0:0.5:2.5; 657s y = raylpdf (x, 0.5); 657s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 657s assert (y, expected_y, 0.001); 657s ***** error raylpdf () 657s ***** error raylpdf (1) 657s ***** error ... 657s raylpdf (ones (3), ones (2)) 657s ***** error ... 657s raylpdf (ones (2), ones (3)) 657s ***** error raylpdf (i, 2) 657s ***** error raylpdf (2, i) 657s 8 tests, 8 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/chi2rnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/chi2rnd.m 657s ***** assert (size (chi2rnd (2)), [1, 1]) 657s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 657s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 657s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 657s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 657s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 657s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 657s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 657s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 657s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 657s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 657s ***** assert (class (chi2rnd (2)), "double") 657s ***** assert (class (chi2rnd (single (2))), "single") 657s ***** assert (class (chi2rnd (single ([2 2]))), "single") 657s ***** error chi2rnd () 657s ***** error chi2rnd (i) 657s ***** error ... 657s chi2rnd (1, -1) 657s ***** error ... 657s chi2rnd (1, 1.2) 657s ***** error ... 657s chi2rnd (1, ones (2)) 657s ***** error ... 657s chi2rnd (1, [2 -1 2]) 657s ***** error ... 657s chi2rnd (1, [2 0 2.5]) 657s ***** error ... 657s chi2rnd (ones (2), ones (2)) 657s ***** error ... 657s chi2rnd (1, 2, -1, 5) 657s ***** error ... 657s chi2rnd (1, 2, 1.5, 5) 657s ***** error chi2rnd (ones (2,2), 3) 657s ***** error chi2rnd (ones (2,2), [3, 2]) 657s ***** error chi2rnd (ones (2,2), 2, 3) 657s 27 tests, 27 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/frnd.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/frnd.m 657s ***** assert (size (frnd (1, 1)), [1 1]) 657s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 657s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 657s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 657s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 657s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 657s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 657s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 657s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 657s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 657s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 657s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 657s ***** assert (class (frnd (1, 1)), "double") 657s ***** assert (class (frnd (1, single (1))), "single") 657s ***** assert (class (frnd (1, single ([1, 1]))), "single") 657s ***** assert (class (frnd (single (1), 1)), "single") 657s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 657s ***** error frnd () 657s ***** error frnd (1) 657s ***** error ... 657s frnd (ones (3), ones (2)) 657s ***** error ... 657s frnd (ones (2), ones (3)) 657s ***** error frnd (i, 2, 3) 657s ***** error frnd (1, i, 3) 657s ***** error ... 657s frnd (1, 2, -1) 657s ***** error ... 657s frnd (1, 2, 1.2) 657s ***** error ... 657s frnd (1, 2, ones (2)) 657s ***** error ... 657s frnd (1, 2, [2 -1 2]) 657s ***** error ... 657s frnd (1, 2, [2 0 2.5]) 657s ***** error ... 657s frnd (1, 2, 2, -1, 5) 657s ***** error ... 657s frnd (1, 2, 2, 1.5, 5) 657s ***** error ... 657s frnd (2, ones (2), 3) 657s ***** error ... 657s frnd (2, ones (2), [3, 2]) 657s ***** error ... 657s frnd (2, ones (2), 3, 2) 657s 33 tests, 33 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/binocdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/binocdf.m 657s ***** demo 657s ## Plot various CDFs from the binomial distribution 657s x = 0:40; 657s p1 = binocdf (x, 20, 0.5); 657s p2 = binocdf (x, 20, 0.7); 657s p3 = binocdf (x, 40, 0.5); 657s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 657s grid on 657s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 657s "n = 40, ps = 0.5"}, "location", "southeast") 657s title ("Binomial CDF") 657s xlabel ("values in x (number of successes)") 657s ylabel ("probability") 657s ***** shared x, p, p1 657s x = [-1 0 1 2 3]; 657s p = [0 1/4 3/4 1 1]; 657s p1 = 1 - p; 657s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 657s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 657s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 657s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 657s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 657s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 657s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 657s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 657s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 657s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 657s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 657s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 657s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 657s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 657s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 657s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 657s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 657s ***** error binocdf () 657s ***** error binocdf (1) 657s ***** error binocdf (1, 2) 657s ***** error binocdf (1, 2, 3, 4, 5) 657s ***** error binocdf (1, 2, 3, "tail") 657s ***** error binocdf (1, 2, 3, 4) 657s ***** error ... 657s binocdf (ones (3), ones (2), ones (2)) 657s ***** error ... 657s binocdf (ones (2), ones (3), ones (2)) 657s ***** error ... 657s binocdf (ones (2), ones (2), ones (3)) 657s ***** error binocdf (i, 2, 2) 657s ***** error binocdf (2, i, 2) 657s ***** error binocdf (2, 2, i) 657s 29 tests, 29 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/raylcdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/raylcdf.m 657s ***** demo 657s ## Plot various CDFs from the Rayleigh distribution 657s x = 0:0.01:10; 657s p1 = raylcdf (x, 0.5); 657s p2 = raylcdf (x, 1); 657s p3 = raylcdf (x, 2); 657s p4 = raylcdf (x, 3); 657s p5 = raylcdf (x, 4); 657s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 657s grid on 657s ylim ([0, 1]) 657s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 657s "σ = 3", "σ = 4"}, "location", "southeast") 657s title ("Rayleigh CDF") 657s xlabel ("values in x") 657s ylabel ("probability") 657s ***** test 657s x = 0:0.5:2.5; 657s sigma = 1:6; 657s p = raylcdf (x, sigma); 657s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 657s assert (p, expected_p, 0.001); 657s ***** test 657s x = 0:0.5:2.5; 657s p = raylcdf (x, 0.5); 657s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 657s assert (p, expected_p, 0.001); 657s ***** shared x, p 657s x = [-1, 0, 1, 2, Inf]; 657s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 657s ***** assert (raylcdf (x, 1), p, 1e-14) 657s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 657s ***** error raylcdf () 657s ***** error raylcdf (1) 657s ***** error raylcdf (1, 2, "uper") 657s ***** error raylcdf (1, 2, 3) 657s ***** error ... 657s raylcdf (ones (3), ones (2)) 657s ***** error ... 657s raylcdf (ones (2), ones (3)) 657s ***** error raylcdf (i, 2) 657s ***** error raylcdf (2, i) 657s 12 tests, 12 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/hnpdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hnpdf.m 657s ***** demo 657s ## Plot various PDFs from the half-normal distribution 657s x = 0:0.001:10; 657s y1 = hnpdf (x, 0, 1); 657s y2 = hnpdf (x, 0, 2); 657s y3 = hnpdf (x, 0, 3); 657s y4 = hnpdf (x, 0, 5); 657s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 657s grid on 657s xlim ([0, 10]) 657s ylim ([0, 0.9]) 657s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 657s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 657s title ("Half-normal PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** demo 657s ## Plot half-normal against normal probability density function 657s x = -5:0.001:5; 657s y1 = hnpdf (x, 0, 1); 657s y2 = normpdf (x); 657s plot (x, y1, "-b", x, y2, "-g") 657s grid on 657s xlim ([-5, 5]) 657s ylim ([0, 0.9]) 657s legend ({"half-normal with μ = 0, σ = 1", ... 657s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 657s title ("Half-normal against standard normal PDF") 657s xlabel ("values in x") 657s ylabel ("density") 657s ***** shared x, y 657s x = [-Inf, -1, 0, 1/2, 1, Inf]; 657s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 657s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 657s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 657s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 657s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 657s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 657s ***** error hnpdf () 657s ***** error hnpdf (1) 657s ***** error hnpdf (1, 2) 657s ***** error ... 657s hnpdf (1, ones (2), ones (3)) 657s ***** error ... 657s hnpdf (ones (2), 1, ones (3)) 657s ***** error ... 657s hnpdf (ones (2), ones (3), 1) 657s ***** error hnpdf (i, 2, 3) 657s ***** error hnpdf (1, i, 3) 657s ***** error hnpdf (1, 2, i) 657s 14 tests, 14 passed, 0 known failure, 0 skipped 657s [inst/dist_fun/vmcdf.m] 657s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/vmcdf.m 657s ***** demo 657s ## Plot various CDFs from the von Mises distribution 657s x1 = [-pi:0.1:pi]; 657s p1 = vmcdf (x1, 0, 0.5); 657s p2 = vmcdf (x1, 0, 1); 657s p3 = vmcdf (x1, 0, 2); 657s p4 = vmcdf (x1, 0, 4); 657s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 657s grid on 657s xlim ([-pi, pi]) 657s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 657s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 657s title ("Von Mises CDF") 657s xlabel ("values in x") 657s ylabel ("probability") 657s ***** shared x, p0, p1 657s x = [-pi:pi/2:pi]; 657s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 657s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 657s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 657s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 657s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 657s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 657s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 658s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 658s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 658s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 658s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 658s ***** error vmcdf () 658s ***** error vmcdf (1) 658s ***** error vmcdf (1, 2) 658s ***** error vmcdf (1, 2, 3, "tail") 658s ***** error vmcdf (1, 2, 3, 4) 658s ***** error ... 658s vmcdf (ones (3), ones (2), ones (2)) 658s ***** error ... 658s vmcdf (ones (2), ones (3), ones (2)) 658s ***** error ... 658s vmcdf (ones (2), ones (2), ones (3)) 658s ***** error vmcdf (i, 2, 2) 658s ***** error vmcdf (2, i, 2) 658s ***** error vmcdf (2, 2, i) 658s 20 tests, 20 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/vmpdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/vmpdf.m 658s ***** demo 658s ## Plot various PDFs from the von Mises distribution 658s x1 = [-pi:0.1:pi]; 658s y1 = vmpdf (x1, 0, 0.5); 658s y2 = vmpdf (x1, 0, 1); 658s y3 = vmpdf (x1, 0, 2); 658s y4 = vmpdf (x1, 0, 4); 658s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 658s grid on 658s xlim ([-pi, pi]) 658s ylim ([0, 0.8]) 658s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 658s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 658s title ("Von Mises PDF") 658s xlabel ("values in x") 658s ylabel ("density") 658s ***** shared x, y0, y1 658s x = [-pi:pi/2:pi]; 658s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 658s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 658s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 658s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 658s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 658s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 658s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 658s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 658s ***** error vmpdf () 658s ***** error vmpdf (1) 658s ***** error vmpdf (1, 2) 658s ***** error ... 658s vmpdf (ones (3), ones (2), ones (2)) 658s ***** error ... 658s vmpdf (ones (2), ones (3), ones (2)) 658s ***** error ... 658s vmpdf (ones (2), ones (2), ones (3)) 658s ***** error vmpdf (i, 2, 2) 658s ***** error vmpdf (2, i, 2) 658s ***** error vmpdf (2, 2, i) 658s 15 tests, 15 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/fpdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/fpdf.m 658s ***** demo 658s ## Plot various PDFs from the F distribution 658s x = 0.01:0.01:4; 658s y1 = fpdf (x, 1, 1); 658s y2 = fpdf (x, 2, 1); 658s y3 = fpdf (x, 5, 2); 658s y4 = fpdf (x, 10, 1); 658s y5 = fpdf (x, 100, 100); 658s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 658s grid on 658s ylim ([0, 2.5]) 658s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 658s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 658s "df1 = 100, df2 = 100"}, "location", "northeast") 658s title ("F PDF") 658s xlabel ("values in x") 658s ylabel ("density") 658s ***** shared x, y 658s x = [-1 0 0.5 1 2]; 658s y = [0 0 4/9 1/4 1/9]; 658s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 658s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 658s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 658s ***** assert (fpdf (x, [0 NaN Inf 2 2], 2), [NaN NaN NaN y(4:5)], eps) 658s ***** assert (fpdf (x, 2, [0 NaN Inf 2 2]), [NaN NaN NaN y(4:5)], eps) 658s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 658s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 658s rand ("seed", 1234); # for reproducibility 658s xr = rand (10,1); 658s xr = xr(x > 0.1 & x < 0.9); 658s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 658s assert (fpdf (xr, 1, 2), yr, 5*eps); 658s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 658s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 658s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 658s ***** error fpdf () 658s ***** error fpdf (1) 658s ***** error fpdf (1,2) 658s ***** error ... 658s fpdf (ones (3), ones (2), ones (2)) 658s ***** error ... 658s fpdf (ones (2), ones (3), ones (2)) 658s ***** error ... 658s fpdf (ones (2), ones (2), ones (3)) 658s ***** error fpdf (i, 2, 2) 658s ***** error fpdf (2, i, 2) 658s ***** error fpdf (2, 2, i) 658s 19 tests, 19 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/betainv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/betainv.m 658s ***** demo 658s ## Plot various iCDFs from the Beta distribution 658s p = 0.001:0.001:0.999; 658s x1 = betainv (p, 0.5, 0.5); 658s x2 = betainv (p, 5, 1); 658s x3 = betainv (p, 1, 3); 658s x4 = betainv (p, 2, 2); 658s x5 = betainv (p, 2, 5); 658s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 658s grid on 658s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 658s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 658s title ("Beta iCDF") 658s xlabel ("probability") 658s ylabel ("values in x") 658s ***** shared p 658s p = [-1 0 0.75 1 2]; 658s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 658s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 658s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 658s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 658s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 658s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 658s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 658s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 658s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 658s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 658s ***** error betainv () 658s ***** error betainv (1) 658s ***** error betainv (1,2) 658s ***** error betainv (1,2,3,4) 658s ***** error ... 658s betainv (ones (3), ones (2), ones (2)) 658s ***** error ... 658s betainv (ones (2), ones (3), ones (2)) 658s ***** error ... 658s betainv (ones (2), ones (2), ones (3)) 658s ***** error betainv (i, 2, 2) 658s ***** error betainv (2, i, 2) 658s ***** error betainv (2, 2, i) 658s 20 tests, 20 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/gaminv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gaminv.m 658s ***** demo 658s ## Plot various iCDFs from the Gamma distribution 658s p = 0.001:0.001:0.999; 658s x1 = gaminv (p, 1, 2); 658s x2 = gaminv (p, 2, 2); 658s x3 = gaminv (p, 3, 2); 658s x4 = gaminv (p, 5, 1); 658s x5 = gaminv (p, 9, 0.5); 658s x6 = gaminv (p, 7.5, 1); 658s x7 = gaminv (p, 0.5, 1); 658s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 658s p, x5, "-k", p, x6, "-b", p, x7, "-c") 658s ylim ([0, 20]) 658s grid on 658s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 658s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 658s "α = 0.5, β = 1"}, "location", "northwest") 658s title ("Gamma iCDF") 658s xlabel ("probability") 658s ylabel ("x") 658s ***** shared p 658s p = [-1 0 0.63212055882855778 1 2]; 658s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 658s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 658s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 658s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 658s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 658s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 658s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 658s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 658s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 658s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 658s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 658s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 658s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 658s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 658s eps ("single")) 658s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 658s eps ("single")) 658s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 658s eps ("single")) 658s ***** error gaminv () 658s ***** error gaminv (1) 658s ***** error gaminv (1,2) 658s ***** error ... 658s gaminv (ones (3), ones (2), ones (2)) 658s ***** error ... 658s gaminv (ones (2), ones (3), ones (2)) 658s ***** error ... 658s gaminv (ones (2), ones (2), ones (3)) 658s ***** error gaminv (i, 2, 2) 658s ***** error gaminv (2, i, 2) 658s ***** error gaminv (2, 2, i) 658s 25 tests, 25 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/normcdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/normcdf.m 658s ***** demo 658s ## Plot various CDFs from the normal distribution 658s x = -5:0.01:5; 658s p1 = normcdf (x, 0, 0.5); 658s p2 = normcdf (x, 0, 1); 658s p3 = normcdf (x, 0, 2); 658s p4 = normcdf (x, -2, 0.8); 658s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 658s grid on 658s xlim ([-5, 5]) 658s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 658s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 658s title ("Normal CDF") 658s xlabel ("values in x") 658s ylabel ("probability") 658s ***** shared x, y 658s x = [-Inf 1 2 Inf]; 658s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 658s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 658s ***** assert (normcdf (x, 1, ones (1,4)), y) 658s ***** assert (normcdf (x, ones (1,4), 1), y) 658s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 658s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 658s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 658s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 658s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 658s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 658s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 658s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 658s ***** error normcdf () 658s ***** error normcdf (1,2,3,4,5,6,7) 658s ***** error normcdf (1, 2, 3, 4, "uper") 658s ***** error ... 658s normcdf (ones (3), ones (2), ones (2)) 658s ***** error normcdf (2, 3, 4, [1, 2]) 658s ***** error ... 658s [p, plo, pup] = normcdf (1, 2, 3) 658s ***** error [p, plo, pup] = ... 658s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 658s ***** error [p, plo, pup] = ... 658s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 658s ***** error [p, plo, pup] = ... 658s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 658s ***** error normcdf (i, 2, 2) 658s ***** error normcdf (2, i, 2) 658s ***** error normcdf (2, 2, i) 658s ***** error ... 658s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 658s 24 tests, 24 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/ricepdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ricepdf.m 658s ***** demo 658s ## Plot various PDFs from the Rician distribution 658s x = 0:0.01:8; 658s y1 = ricepdf (x, 0, 1); 658s y2 = ricepdf (x, 0.5, 1); 658s y3 = ricepdf (x, 1, 1); 658s y4 = ricepdf (x, 2, 1); 658s y5 = ricepdf (x, 4, 1); 658s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 658s grid on 658s ylim ([0, 0.65]) 658s xlim ([0, 8]) 658s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 658s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 658s title ("Rician PDF") 658s xlabel ("values in x") 658s ylabel ("density") 658s ***** shared x, y 658s x = [-1 0 0.5 1 2]; 658s y = [0 0 0.1073 0.1978 0.2846]; 658s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 658s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 658s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 658s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 658s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 658s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 658s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 658s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 658s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 658s ***** error ricepdf () 658s ***** error ricepdf (1) 658s ***** error ricepdf (1,2) 658s ***** error ricepdf (1,2,3,4) 658s ***** error ... 658s ricepdf (ones (3), ones (2), ones (2)) 658s ***** error ... 658s ricepdf (ones (2), ones (3), ones (2)) 658s ***** error ... 658s ricepdf (ones (2), ones (2), ones (3)) 658s ***** error ricepdf (i, 2, 2) 658s ***** error ricepdf (2, i, 2) 658s ***** error ricepdf (2, 2, i) 658s 19 tests, 19 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/ncfcdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncfcdf.m 658s ***** demo 658s ## Plot various CDFs from the noncentral F distribution 658s x = 0:0.01:5; 658s p1 = ncfcdf (x, 2, 5, 1); 658s p2 = ncfcdf (x, 2, 5, 2); 658s p3 = ncfcdf (x, 5, 10, 1); 658s p4 = ncfcdf (x, 10, 20, 10); 658s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 658s grid on 658s xlim ([0, 5]) 658s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 658s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 658s "location", "southeast") 658s title ("Noncentral F CDF") 658s xlabel ("values in x") 658s ylabel ("probability") 658s ***** demo 658s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 658s ## same number of numerator and denominator degrees of freedom (5, 20) 658s 658s x = 0.01:0.1:10.01; 658s p1 = ncfcdf (x, 5, 20, 10); 658s p2 = fcdf (x, 5, 20); 658s plot (x, p1, "-", x, p2, "-"); 658s grid on 658s xlim ([0, 10]) 658s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 658s title ("Noncentral F vs F CDFs") 658s xlabel ("values in x") 658s ylabel ("probability") 658s ***** test 658s x = -2:0.1:2; 658s p = ncfcdf (x, 10, 1, 3); 658s assert (p([1:21]), zeros (1, 21), 1e-76); 658s assert (p(22), 0.004530737275319753, 1e-14); 658s assert (p(30), 0.255842099135669, 1e-14); 658s assert (p(41), 0.4379890998457305, 1e-14); 658s ***** test 658s p = ncfcdf (12, 10, 3, 2); 658s assert (p, 0.9582287900447416, 1e-14); 658s ***** test 658s p = ncfcdf (2, 3, 2, 1); 658s assert (p, 0.5731985522994989, 1e-14); 658s ***** test 658s p = ncfcdf (2, 3, 2, 1, "upper"); 658s assert (p, 0.4268014477004823, 1e-14); 658s ***** test 658s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 658s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 658s ***** error ncfcdf () 658s ***** error ncfcdf (1) 658s ***** error ncfcdf (1, 2) 658s ***** error ncfcdf (1, 2, 3) 658s ***** error ncfcdf (1, 2, 3, 4, "tail") 658s ***** error ncfcdf (1, 2, 3, 4, 5) 658s ***** error ... 658s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 658s ***** error ... 658s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 658s ***** error ... 658s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 658s ***** error ... 658s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 658s ***** error ncfcdf (i, 2, 2, 2) 658s ***** error ncfcdf (2, i, 2, 2) 658s ***** error ncfcdf (2, 2, i, 2) 658s ***** error ncfcdf (2, 2, 2, i) 658s 19 tests, 19 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/plinv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/plinv.m 658s ***** demo 658s ## Plot various iCDFs from the Piecewise linear distribution 658s p = 0.001:0.001:0.999; 658s x1 = [0, 1, 3, 4, 7, 10]; 658s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 658s x2 = [0, 2, 5, 6, 7, 8]; 658s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 658s data1 = plinv (p, x1, Fx1); 658s data2 = plinv (p, x2, Fx2); 658s plot (p, data1, "-b", p, data2, "-g") 658s grid on 658s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 658s title ("Piecewise linear iCDF") 658s xlabel ("probability") 658s ylabel ("values in data") 658s ***** test 658s p = 0:0.2:1; 658s data = plinv (p, [0, 1], [0, 1]); 658s assert (data, p); 658s ***** test 658s p = 0:0.2:1; 658s data = plinv (p, [0, 2], [0, 1]); 658s assert (data, 2 * p); 658s ***** test 658s p = 0:0.2:1; 658s data_out = 1:6; 658s data = plinv (p, [0, 1], [0, 0.5]); 658s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 658s ***** test 658s p = 0:0.2:1; 658s data_out = 1:6; 658s data = plinv (p, [0, 0.5], [0, 1]); 658s assert (data, [0:0.1:0.5]); 658s ***** error plinv () 658s ***** error plinv (1) 658s ***** error plinv (1, 2) 658s ***** error ... 658s plinv (1, [0, 1, 2], [0, 1]) 658s ***** error ... 658s plinv (1, [0], [1]) 658s ***** error ... 658s plinv (1, [0, 1, 2], [0, 1, 1.5]) 658s ***** error ... 658s plinv (1, [0, 1, 2], [0, i, 1]) 658s ***** error ... 658s plinv (i, [0, 1, 2], [0, 0.5, 1]) 658s ***** error ... 658s plinv (1, [0, i, 2], [0, 0.5, 1]) 658s ***** error ... 658s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 658s 14 tests, 14 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/evcdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/evcdf.m 658s ***** demo 658s ## Plot various CDFs from the extreme value distribution 658s x = -10:0.01:10; 658s p1 = evcdf (x, 0.5, 2); 658s p2 = evcdf (x, 1.0, 2); 658s p3 = evcdf (x, 1.5, 3); 658s p4 = evcdf (x, 3.0, 4); 658s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 658s grid on 658s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 658s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 658s title ("Extreme value CDF") 658s xlabel ("values in x") 658s ylabel ("probability") 658s ***** shared x, y 658s x = [-Inf, 1, 2, Inf]; 658s y = [0, 0.6321, 0.9340, 1]; 658s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 658s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 658s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 658s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 658s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 658s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 658s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 658s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 658s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 658s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 658s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 658s ***** error evcdf () 658s ***** error evcdf (1,2,3,4,5,6,7) 658s ***** error evcdf (1, 2, 3, 4, "uper") 658s ***** error ... 658s evcdf (ones (3), ones (2), ones (2)) 658s ***** error evcdf (2, 3, 4, [1, 2]) 658s ***** error ... 658s [p, plo, pup] = evcdf (1, 2, 3) 658s ***** error [p, plo, pup] = ... 658s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 658s ***** error [p, plo, pup] = ... 658s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 658s ***** error [p, plo, pup] = ... 658s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 658s ***** error evcdf (i, 2, 2) 658s ***** error evcdf (2, i, 2) 658s ***** error evcdf (2, 2, i) 658s ***** error ... 658s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 658s 24 tests, 24 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/mvtcdfqmc.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvtcdfqmc.m 658s ***** error mvtcdfqmc (1, 2, 3); 658s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 658s 2 tests, 2 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/poissrnd.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/poissrnd.m 658s ***** assert (size (poissrnd (2)), [1, 1]) 658s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 658s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 658s ***** assert (size (poissrnd (1, 3)), [3, 3]) 658s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 658s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 658s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 658s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 658s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 658s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 658s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 658s ***** assert (poissrnd (0, 1, 1), 0) 658s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 658s ***** assert (class (poissrnd (2)), "double") 658s ***** assert (class (poissrnd (single (2))), "single") 658s ***** assert (class (poissrnd (single ([2 2]))), "single") 658s ***** error poissrnd () 658s ***** error poissrnd (i) 658s ***** error ... 658s poissrnd (1, -1) 658s ***** error ... 658s poissrnd (1, 1.2) 658s ***** error ... 658s poissrnd (1, ones (2)) 658s ***** error ... 658s poissrnd (1, [2 -1 2]) 658s ***** error ... 658s poissrnd (1, [2 0 2.5]) 658s ***** error ... 658s poissrnd (ones (2), ones (2)) 658s ***** error ... 658s poissrnd (1, 2, -1, 5) 658s ***** error ... 658s poissrnd (1, 2, 1.5, 5) 658s ***** error poissrnd (ones (2,2), 3) 658s ***** error poissrnd (ones (2,2), [3, 2]) 658s ***** error poissrnd (ones (2,2), 2, 3) 658s 29 tests, 29 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/logninv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logninv.m 658s ***** demo 658s ## Plot various iCDFs from the log-normal distribution 658s p = 0.001:0.001:0.999; 658s x1 = logninv (p, 0, 1); 658s x2 = logninv (p, 0, 0.5); 658s x3 = logninv (p, 0, 0.25); 658s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 658s grid on 658s ylim ([0, 3]) 658s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 658s "location", "northwest") 658s title ("Log-normal iCDF") 658s xlabel ("probability") 658s ylabel ("values in x") 658s ***** shared p 658s p = [-1 0 0.5 1 2]; 658s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN]) 658s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN]) 658s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN]) 658s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 658s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 658s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 658s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN]) 658s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 658s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 658s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 658s ***** error logninv () 658s ***** error logninv (1,2,3,4) 658s ***** error logninv (ones (3), ones (2), ones (2)) 658s ***** error logninv (ones (2), ones (3), ones (2)) 658s ***** error logninv (ones (2), ones (2), ones (3)) 658s ***** error logninv (i, 2, 2) 658s ***** error logninv (2, i, 2) 658s ***** error logninv (2, 2, i) 658s 18 tests, 18 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/cauchyinv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/cauchyinv.m 658s ***** demo 658s ## Plot various iCDFs from the Cauchy distribution 658s p = 0.001:0.001:0.999; 658s x1 = cauchyinv (p, 0, 0.5); 658s x2 = cauchyinv (p, 0, 1); 658s x3 = cauchyinv (p, 0, 2); 658s x4 = cauchyinv (p, -2, 1); 658s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 658s grid on 658s ylim ([-5, 5]) 658s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 658s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 658s title ("Cauchy iCDF") 658s xlabel ("probability") 658s ylabel ("values in x") 658s ***** shared p 658s p = [-1 0 0.5 1 2]; 658s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 658s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 658s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 658s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 658s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 658s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 658s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 658s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 658s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 658s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 658s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 658s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 658s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 658s ***** error cauchyinv () 658s ***** error cauchyinv (1) 658s ***** error ... 658s cauchyinv (1, 2) 658s ***** error cauchyinv (1, 2, 3, 4) 658s ***** error ... 658s cauchyinv (ones (3), ones (2), ones(2)) 658s ***** error ... 658s cauchyinv (ones (2), ones (3), ones(2)) 658s ***** error ... 658s cauchyinv (ones (2), ones (2), ones(3)) 658s ***** error cauchyinv (i, 4, 3) 658s ***** error cauchyinv (1, i, 3) 658s ***** error cauchyinv (1, 4, i) 658s 20 tests, 20 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/gamrnd.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gamrnd.m 658s ***** assert (size (gamrnd (1, 1)), [1 1]) 658s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 658s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 658s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 658s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 658s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 658s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 658s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 658s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 658s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 658s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 658s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 658s ***** assert (class (gamrnd (1, 1)), "double") 658s ***** assert (class (gamrnd (1, single (1))), "single") 658s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 658s ***** assert (class (gamrnd (single (1), 1)), "single") 658s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 658s ***** error gamrnd () 658s ***** error gamrnd (1) 658s ***** error ... 658s gamrnd (ones (3), ones (2)) 658s ***** error ... 658s gamrnd (ones (2), ones (3)) 658s ***** error gamrnd (i, 2, 3) 658s ***** error gamrnd (1, i, 3) 658s ***** error ... 658s gamrnd (1, 2, -1) 658s ***** error ... 658s gamrnd (1, 2, 1.2) 658s ***** error ... 658s gamrnd (1, 2, ones (2)) 658s ***** error ... 658s gamrnd (1, 2, [2 -1 2]) 658s ***** error ... 658s gamrnd (1, 2, [2 0 2.5]) 658s ***** error ... 658s gamrnd (1, 2, 2, -1, 5) 658s ***** error ... 658s gamrnd (1, 2, 2, 1.5, 5) 658s ***** error ... 658s gamrnd (2, ones (2), 3) 658s ***** error ... 658s gamrnd (2, ones (2), [3, 2]) 658s ***** error ... 658s gamrnd (2, ones (2), 3, 2) 658s 33 tests, 33 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/betacdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/betacdf.m 658s ***** demo 658s ## Plot various CDFs from the Beta distribution 658s x = 0:0.005:1; 658s p1 = betacdf (x, 0.5, 0.5); 658s p2 = betacdf (x, 5, 1); 658s p3 = betacdf (x, 1, 3); 658s p4 = betacdf (x, 2, 2); 658s p5 = betacdf (x, 2, 5); 658s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 658s grid on 658s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 658s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 658s title ("Beta CDF") 658s xlabel ("values in x") 658s ylabel ("probability") 658s ***** shared x, y, x1, x2 658s x = [-1 0 0.5 1 2]; 658s y = [0 0 0.75 1 1]; 658s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 658s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 658s ***** assert (betacdf (x, ones (1, 5), 2), y) 658s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 658s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 658s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 658s x1 = [0.1:0.2:0.9]; 658s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 658s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 658s 1e-14); 658s x2 = [1, 2, 3]; 658s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 658s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 658s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 658s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 658s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 658s ***** error betacdf () 658s ***** error betacdf (1) 658s ***** error betacdf (1, 2) 658s ***** error betacdf (1, 2, 3, 4, 5) 658s ***** error betacdf (1, 2, 3, "tail") 658s ***** error betacdf (1, 2, 3, 4) 658s ***** error ... 658s betacdf (ones (3), ones (2), ones (2)) 658s ***** error ... 658s betacdf (ones (2), ones (3), ones (2)) 658s ***** error ... 658s betacdf (ones (2), ones (2), ones (3)) 658s ***** error betacdf (i, 2, 2) 658s ***** error betacdf (2, i, 2) 658s ***** error betacdf (2, 2, i) 658s 25 tests, 25 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/norminv.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/norminv.m 658s ***** demo 658s ## Plot various iCDFs from the normal distribution 658s p = 0.001:0.001:0.999; 658s x1 = norminv (p, 0, 0.5); 658s x2 = norminv (p, 0, 1); 658s x3 = norminv (p, 0, 2); 658s x4 = norminv (p, -2, 0.8); 658s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 658s grid on 658s ylim ([-5, 5]) 658s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 658s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 658s title ("Normal iCDF") 658s xlabel ("probability") 658s ylabel ("values in x") 658s ***** shared p 658s p = [-1 0 0.5 1 2]; 658s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 658s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 658s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 658s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 658s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 658s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 658s ***** assert (norminv (p), probit (p)) 658s ***** assert (norminv (0.31254), probit (0.31254)) 658s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 658s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 658s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 658s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 658s ***** error norminv () 658s ***** error ... 658s norminv (ones (3), ones (2), ones (2)) 658s ***** error ... 658s norminv (ones (2), ones (3), ones (2)) 658s ***** error ... 658s norminv (ones (2), ones (2), ones (3)) 658s ***** error norminv (i, 2, 2) 658s ***** error norminv (2, i, 2) 658s ***** error norminv (2, 2, i) 658s 19 tests, 19 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/mvnrnd.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvnrnd.m 658s ***** error mvnrnd () 658s ***** error mvnrnd ([2, 3, 4]) 658s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 658s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 658s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 658s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 658s 6 tests, 6 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/trnd.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/trnd.m 658s ***** assert (size (trnd (2)), [1, 1]) 658s ***** assert (size (trnd (ones (2,1))), [2, 1]) 658s ***** assert (size (trnd (ones (2,2))), [2, 2]) 658s ***** assert (size (trnd (1, 3)), [3, 3]) 658s ***** assert (size (trnd (1, [4 1])), [4, 1]) 658s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 658s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 658s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 658s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 658s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 658s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 658s ***** assert (trnd (0, 1, 1), NaN) 658s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 658s ***** assert (class (trnd (2)), "double") 658s ***** assert (class (trnd (single (2))), "single") 658s ***** assert (class (trnd (single ([2 2]))), "single") 658s ***** error trnd () 658s ***** error trnd (i) 658s ***** error ... 658s trnd (1, -1) 658s ***** error ... 658s trnd (1, 1.2) 658s ***** error ... 658s trnd (1, ones (2)) 658s ***** error ... 658s trnd (1, [2 -1 2]) 658s ***** error ... 658s trnd (1, [2 0 2.5]) 658s ***** error ... 658s trnd (ones (2), ones (2)) 658s ***** error ... 658s trnd (1, 2, -1, 5) 658s ***** error ... 658s trnd (1, 2, 1.5, 5) 658s ***** error trnd (ones (2,2), 3) 658s ***** error trnd (ones (2,2), [3, 2]) 658s ***** error trnd (ones (2,2), 2, 3) 658s 29 tests, 29 passed, 0 known failure, 0 skipped 658s [inst/dist_fun/hygecdf.m] 658s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hygecdf.m 658s ***** demo 658s ## Plot various CDFs from the hypergeometric distribution 658s x = 0:60; 658s p1 = hygecdf (x, 500, 50, 100); 658s p2 = hygecdf (x, 500, 60, 200); 658s p3 = hygecdf (x, 500, 70, 300); 658s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 658s grid on 658s xlim ([0, 60]) 658s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 658s "m = 500, k = 70, n = 300"}, "location", "southeast") 658s title ("Hypergeometric CDF") 658s xlabel ("values in x (number of successes)") 658s ylabel ("probability") 658s ***** shared x, y 658s x = [-1 0 1 2 3]; 658s y = [0 1/6 5/6 1 1]; 658s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 658s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 658s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 658s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 658s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 658s [y(5) NaN NaN NaN y(1)], 5*eps) 658s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 658s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 658s [y(5) NaN NaN NaN y(1)], 5*eps) 658s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 658s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 658s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 658s [y(5) NaN NaN NaN y(1)], 5*eps) 658s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 658s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 658s ***** test 658s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 658s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 658s ***** test 658s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 658s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 658s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 658s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 658s eps ("single")) 658s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 658s eps ("single")) 658s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 658s eps ("single")) 659s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 659s eps ("single")) 659s ***** error hygecdf () 659s ***** error hygecdf (1) 659s ***** error hygecdf (1,2) 659s ***** error hygecdf (1,2,3) 659s ***** error hygecdf (1,2,3,4,5) 659s ***** error hygecdf (1,2,3,4,"uper") 659s ***** error ... 659s hygecdf (ones (2), ones (3), 1, 1) 659s ***** error ... 659s hygecdf (1, ones (2), ones (3), 1) 659s ***** error ... 659s hygecdf (1, 1, ones (2), ones (3)) 659s ***** error hygecdf (i, 2, 2, 2) 659s ***** error hygecdf (2, i, 2, 2) 659s ***** error hygecdf (2, 2, i, 2) 659s ***** error hygecdf (2, 2, 2, i) 659s 32 tests, 32 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/nctcdf.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nctcdf.m 659s ***** demo 659s ## Plot various CDFs from the noncentral Τ distribution 659s x = -5:0.01:5; 659s p1 = nctcdf (x, 1, 0); 659s p2 = nctcdf (x, 4, 0); 659s p3 = nctcdf (x, 1, 2); 659s p4 = nctcdf (x, 4, 2); 659s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 659s grid on 659s xlim ([-5, 5]) 659s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 659s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 659s title ("Noncentral Τ CDF") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** demo 659s ## Compare the noncentral T CDF with MU = 1 to the T CDF 659s ## with the same number of degrees of freedom (10). 659s 659s x = -5:0.1:5; 659s p1 = nctcdf (x, 10, 1); 659s p2 = tcdf (x, 10); 659s plot (x, p1, "-", x, p2, "-") 659s grid on 659s xlim ([-5, 5]) 659s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 659s title ("Noncentral T vs T CDFs") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** test 659s x = -2:0.1:2; 659s p = nctcdf (x, 10, 1); 659s assert (p(1), 0.003302485766631558, 1e-14); 659s assert (p(2), 0.004084668193532631, 1e-14); 659s assert (p(3), 0.005052800319478737, 1e-14); 659s assert (p(41), 0.8076115625303751, 1e-14); 659s ***** test 659s p = nctcdf (12, 10, 3); 659s assert (p, 0.9997719343243797, 1e-14); 659s ***** test 659s p = nctcdf (2, 3, 2); 659s assert (p, 0.4430757822176028, 1e-14); 659s ***** test 659s p = nctcdf (2, 3, 2, "upper"); 659s assert (p, 0.5569242177823971, 1e-14); 659s ***** test 659s p = nctcdf ([3, 6], 3, 2, "upper"); 659s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 659s ***** error nctcdf () 659s ***** error nctcdf (1) 659s ***** error nctcdf (1, 2) 659s ***** error nctcdf (1, 2, 3, "tail") 659s ***** error nctcdf (1, 2, 3, 4) 659s ***** error ... 659s nctcdf (ones (3), ones (2), ones (2)) 659s ***** error ... 659s nctcdf (ones (2), ones (3), ones (2)) 659s ***** error ... 659s nctcdf (ones (2), ones (2), ones (3)) 659s ***** error nctcdf (i, 2, 2) 659s ***** error nctcdf (2, i, 2) 659s ***** error nctcdf (2, 2, i) 659s 16 tests, 16 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/nakainv.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nakainv.m 659s ***** demo 659s ## Plot various iCDFs from the Nakagami distribution 659s p = 0.001:0.001:0.999; 659s x1 = nakainv (p, 0.5, 1); 659s x2 = nakainv (p, 1, 1); 659s x3 = nakainv (p, 1, 2); 659s x4 = nakainv (p, 1, 3); 659s x5 = nakainv (p, 2, 1); 659s x6 = nakainv (p, 2, 2); 659s x7 = nakainv (p, 5, 1); 659s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 659s p, x5, "-k", p, x6, "-b", p, x7, "-c") 659s grid on 659s ylim ([0, 3]) 659s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 659s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 659s "μ = 5, ω = 1"}, "location", "northwest") 659s title ("Nakagami iCDF") 659s xlabel ("probability") 659s ylabel ("values in x") 659s ***** shared p, y 659s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 659s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 659s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 659s ***** assert (nakainv (p, 1, 1), y, eps) 659s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 659s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 659s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 659s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 659s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 659s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 659s ***** error nakainv () 659s ***** error nakainv (1) 659s ***** error nakainv (1, 2) 659s ***** error ... 659s nakainv (ones (3), ones (2), ones(2)) 659s ***** error ... 659s nakainv (ones (2), ones (3), ones(2)) 659s ***** error ... 659s nakainv (ones (2), ones (2), ones(3)) 659s ***** error nakainv (i, 4, 3) 659s ***** error nakainv (1, i, 3) 659s ***** error nakainv (1, 4, i) 659s 17 tests, 17 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/gpcdf.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gpcdf.m 659s ***** demo 659s ## Plot various CDFs from the generalized Pareto distribution 659s x = 0:0.001:5; 659s p1 = gpcdf (x, 1, 1, 0); 659s p2 = gpcdf (x, 5, 1, 0); 659s p3 = gpcdf (x, 20, 1, 0); 659s p4 = gpcdf (x, 1, 2, 0); 659s p5 = gpcdf (x, 5, 2, 0); 659s p6 = gpcdf (x, 20, 2, 0); 659s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 659s x, p4, "-c", x, p5, "-m", x, p6, "-k") 659s grid on 659s xlim ([0, 5]) 659s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 659s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 659s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 659s "location", "northwest") 659s title ("Generalized Pareto CDF") 659s xlabel ("values in x") 659s ylabel ("probability") 659s ***** shared x, y1, y1u, y2, y2u, y3, y3u 659s x = [-Inf, -1, 0, 1/2, 1, Inf]; 659s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 659s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 659s y2 = [0, 0, 0, 1/3, 1/2, 1]; 659s y2u = [1, 1, 1, 2/3, 1/2, 0]; 659s y3 = [0, 0, 0, 1/2, 1, 1]; 659s y3u = [1, 1, 1, 1/2, 0, 0]; 659s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 659s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 659s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 659s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 659s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 659s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 659s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 659s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 659s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 659s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 659s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 659s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 659s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 659s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 659s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 659s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 659s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 659s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 659s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 659s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 659s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 659s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 659s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 659s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 659s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 659s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 659s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 659s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 659s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 659s [y2u(1:3), NaN, y2u(5:6)], eps) 659s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 659s [y2u(1:3), NaN, y2u(5:6)], eps) 659s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 659s [y2u(1:3), NaN, y2u(5:6)], eps) 659s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 659s [y2u(1:3), NaN, y2u(5:6)], eps) 659s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 659s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 659s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 659s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 659s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 659s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 659s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 659s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 659s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 659s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 659s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 659s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 659s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 659s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 659s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 659s [y3u(1:3), NaN, y3u(5:6)], eps) 659s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 659s [y3u(1:3), NaN, y3u(5:6)], eps) 659s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 659s [y3u(1:3), NaN, y3u(5:6)], eps) 659s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 659s [y3u(1:3), NaN, y3u(5:6)], eps) 659s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 659s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 659s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 659s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 659s ***** error gpcdf () 659s ***** error gpcdf (1) 659s ***** error gpcdf (1, 2) 659s ***** error gpcdf (1, 2, 3) 659s ***** error gpcdf (1, 2, 3, 4, "tail") 659s ***** error gpcdf (1, 2, 3, 4, 5) 659s ***** error ... 659s gpcdf (ones (3), ones (2), ones(2), ones(2)) 659s ***** error ... 659s gpcdf (ones (2), ones (3), ones(2), ones(2)) 659s ***** error ... 659s gpcdf (ones (2), ones (2), ones(3), ones(2)) 659s ***** error ... 659s gpcdf (ones (2), ones (2), ones(2), ones(3)) 659s ***** error gpcdf (i, 2, 3, 4) 659s ***** error gpcdf (1, i, 3, 4) 659s ***** error gpcdf (1, 2, i, 4) 659s ***** error gpcdf (1, 2, 3, i) 659s 76 tests, 76 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/logipdf.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logipdf.m 659s ***** demo 659s ## Plot various PDFs from the logistic distribution 659s x = -5:0.01:20; 659s y1 = logipdf (x, 5, 2); 659s y2 = logipdf (x, 9, 3); 659s y3 = logipdf (x, 9, 4); 659s y4 = logipdf (x, 6, 2); 659s y5 = logipdf (x, 2, 1); 659s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 659s grid on 659s ylim ([0, 0.3]) 659s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 659s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 659s title ("Logistic PDF") 659s xlabel ("values in x") 659s ylabel ("density") 659s ***** shared x, y 659s x = [-Inf -log(4) 0 log(4) Inf]; 659s y = [0, 0.16, 1/4, 0.16, 0]; 659s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 659s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 659s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 659s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 659s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 659s ***** error logipdf () 659s ***** error logipdf (1) 659s ***** error ... 659s logipdf (1, 2) 659s ***** error ... 659s logipdf (1, ones (2), ones (3)) 659s ***** error ... 659s logipdf (ones (2), 1, ones (3)) 659s ***** error ... 659s logipdf (ones (2), ones (3), 1) 659s ***** error logipdf (i, 2, 3) 659s ***** error logipdf (1, i, 3) 659s ***** error logipdf (1, 2, i) 659s 14 tests, 14 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/geornd.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/geornd.m 659s ***** assert (size (geornd (0.5)), [1, 1]) 659s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 659s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 659s ***** assert (size (geornd (0.5, 3)), [3, 3]) 659s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 659s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 659s ***** assert (class (geornd (0.5)), "double") 659s ***** assert (class (geornd (single (0.5))), "single") 659s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 659s ***** assert (class (geornd (single (0))), "single") 659s ***** assert (class (geornd (single (1))), "single") 659s ***** error geornd () 659s ***** error geornd (i) 659s ***** error ... 659s geornd (1, -1) 659s ***** error ... 659s geornd (1, 1.2) 659s ***** error ... 659s geornd (1, ones (2)) 659s ***** error ... 659s geornd (1, [2 -1 2]) 659s ***** error ... 659s geornd (1, [2 0 2.5]) 659s ***** error ... 659s geornd (ones (2), ones (2)) 659s ***** error ... 659s geornd (1, 2, -1, 5) 659s ***** error ... 659s geornd (1, 2, 1.5, 5) 659s ***** error geornd (ones (2,2), 3) 659s ***** error geornd (ones (2,2), [3, 2]) 659s ***** error geornd (ones (2,2), 2, 3) 659s 24 tests, 24 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/ricernd.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ricernd.m 659s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 659s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 659s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 659s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 659s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 659s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 659s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 659s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 659s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 659s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 659s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 659s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 659s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 659s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 659s ***** assert (class (ricernd (1, 1)), "double") 659s ***** assert (class (ricernd (1, single (0))), "single") 659s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 659s ***** assert (class (ricernd (1, single (1), 2)), "single") 659s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 659s ***** assert (class (ricernd (single (1), 1, 2)), "single") 659s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 659s ***** error ricernd () 659s ***** error ricernd (1) 659s ***** error ... 659s ricernd (ones (3), ones (2)) 659s ***** error ... 659s ricernd (ones (2), ones (3)) 659s ***** error ricernd (i, 2) 659s ***** error ricernd (1, i) 659s ***** error ... 659s ricernd (1, 1/2, -1) 659s ***** error ... 659s ricernd (1, 1/2, 1.2) 659s ***** error ... 659s ricernd (1, 1/2, ones (2)) 659s ***** error ... 659s ricernd (1, 1/2, [2 -1 2]) 659s ***** error ... 659s ricernd (1, 1/2, [2 0 2.5]) 659s ***** error ... 659s ricernd (1, 1/2, 2, -1, 5) 659s ***** error ... 659s ricernd (1, 1/2, 2, 1.5, 5) 659s ***** error ... 659s ricernd (2, 1/2 * ones (2), 3) 659s ***** error ... 659s ricernd (2, 1/2 * ones (2), [3, 2]) 659s ***** error ... 659s ricernd (2, 1/2 * ones (2), 3, 2) 659s ***** error ... 659s ricernd (2 * ones (2), 1/2, 3) 659s ***** error ... 659s ricernd (2 * ones (2), 1/2, [3, 2]) 659s ***** error ... 659s ricernd (2 * ones (2), 1/2, 3, 2) 659s 40 tests, 40 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/unifinv.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unifinv.m 659s ***** demo 659s ## Plot various iCDFs from the continuous uniform distribution 659s p = 0.001:0.001:0.999; 659s x1 = unifinv (p, 2, 5); 659s x2 = unifinv (p, 3, 9); 659s plot (p, x1, "-b", p, x2, "-g") 659s grid on 659s xlim ([0, 1]) 659s ylim ([0, 10]) 659s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 659s title ("Continuous uniform iCDF") 659s xlabel ("probability") 659s ylabel ("values in x") 659s ***** shared p 659s p = [-1 0 0.5 1 2]; 659s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 659s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 659s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 659s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 659s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 659s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 659s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 659s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 659s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 659s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 659s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 659s ***** error unifinv () 659s ***** error unifinv (1, 2) 659s ***** error ... 659s unifinv (ones (3), ones (2), ones (2)) 659s ***** error ... 659s unifinv (ones (2), ones (3), ones (2)) 659s ***** error ... 659s unifinv (ones (2), ones (2), ones (3)) 659s ***** error unifinv (i, 2, 2) 659s ***** error unifinv (2, i, 2) 659s ***** error unifinv (2, 2, i) 659s 19 tests, 19 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/mvncdf.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvncdf.m 659s ***** demo 659s mu = [1, -1]; 659s Sigma = [0.9, 0.4; 0.4, 0.3]; 659s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 659s X = [X1(:), X2(:)]; 659s p = mvncdf (X, mu, Sigma); 659s Z = reshape (p, 25, 25); 659s surf (X1, X2, Z); 659s title ("Bivariate Normal Distribution"); 659s ylabel "X1" 659s xlabel "X2" 659s ***** demo 659s mu = [0, 0]; 659s Sigma = [0.25, 0.3; 0.3, 1]; 659s p = mvncdf ([0 0], [1 1], mu, Sigma); 659s x1 = -3:.2:3; 659s x2 = -3:.2:3; 659s [X1, X2] = meshgrid (x1, x2); 659s X = [X1(:), X2(:)]; 659s p = mvnpdf (X, mu, Sigma); 659s p = reshape (p, length (x2), length (x1)); 659s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 659s xlabel ("x"); 659s ylabel ("p"); 659s title ("Probability over Rectangular Region"); 659s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 659s ***** test 659s fD = (-2:2)'; 659s X = repmat (fD, 1, 4); 659s p = mvncdf (X); 659s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 659s ***** test 659s mu = [1, -1]; 659s Sigma = [0.9, 0.4; 0.4, 0.3]; 659s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 659s X = [X1(:), X2(:)]; 659s p = mvncdf (X, mu, Sigma); 659s p_out = [0.00011878988774500, 0.00034404112322371, ... 659s 0.00087682502191813, 0.00195221905058185, ... 659s 0.00378235566873474, 0.00638175749734415, ... 659s 0.00943764224329656, 0.01239164888125426, ... 659s 0.01472750274376648, 0.01623228313374828]'; 659s assert (p([1:10]), p_out, 1e-16); 659s ***** test 659s mu = [1, -1]; 659s Sigma = [0.9, 0.4; 0.4, 0.3]; 659s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 659s X = [X1(:), X2(:)]; 659s p = mvncdf (X, mu, Sigma); 659s p_out = [0.8180695783608276, 0.8854485749482751, ... 659s 0.9308108777385832, 0.9579855743025508, ... 659s 0.9722897881414742, 0.9788150170059926, ... 659s 0.9813597788804785, 0.9821977956568989, ... 659s 0.9824283794464095, 0.9824809345614861]'; 659s assert (p([616:625]), p_out, 3e-16); 659s ***** test 659s mu = [0, 0]; 659s Sigma = [0.25, 0.3; 0.3, 1]; 659s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 659s assert (p, 0.2097424404755626, 1e-16); 659s assert (err, 1e-08); 659s ***** test 659s x = [1 2]; 659s mu = [0.5 1.5]; 659s sigma = [1.0, 0.5; 0.5, 1.0]; 659s p = mvncdf (x, mu, sigma); 659s assert (p, 0.546244443857090, 1e-15); 659s ***** test 659s x = [1 2]; 659s mu = [0.5 1.5]; 659s sigma = [1.0, 0.5; 0.5, 1.0]; 659s a = [-inf 0]; 659s p = mvncdf (a, x, mu, sigma); 659s assert (p, 0.482672935215631, 1e-15); 659s ***** error p = mvncdf (randn (25,26), [], eye (26)); 659s ***** error p = mvncdf (randn (25,8), [], eye (9)); 659s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 659s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 659s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 659s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 659s 12 tests, 12 passed, 0 known failure, 0 skipped 659s [inst/dist_fun/mvtcdf.m] 659s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/mvtcdf.m 659s ***** demo 659s ## Compute the cdf of a multivariate Student's t distribution with 659s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 659s 659s rho = [1, 0.4; 0.4, 1]; 659s df = 2; 659s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 659s X = [X1(:), X2(:)]; 659s p = mvtcdf (X, rho, df); 659s surf (X1, X2, reshape (p, 25, 25)); 659s title ("Bivariate Student's t cummulative distribution function"); 659s ***** test 659s x = [1, 2]; 659s rho = [1, 0.5; 0.5, 1]; 659s df = 4; 659s a = [-1, 0]; 659s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 659s ***** test 659s x = [1, 2;2, 4;1, 5]; 659s rho = [1, 0.5; 0.5, 1]; 659s df = 4; 659s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 659s assert (mvtcdf(x, rho, df), p, 1e-14); 659s ***** test 659s x = [1, 2, 2, 4, 1, 5]; 659s rho = eye (6); 659s rho(rho == 0) = 0.5; 659s df = 4; 659s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 666s ***** error mvtcdf (1) 666s ***** error mvtcdf (1, 2) 666s ***** error ... 666s mvtcdf (1, [2, 3; 3, 2], 1) 666s ***** error ... 666s mvtcdf ([2, 3, 4], ones (2), 1) 666s ***** error ... 666s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 666s ***** error ... 666s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 666s ***** error ... 666s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 666s 10 tests, 10 passed, 0 known failure, 0 skipped 666s [inst/dist_fun/expinv.m] 666s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/expinv.m 666s ***** demo 666s ## Plot various iCDFs from the exponential distribution 666s p = 0.001:0.001:0.999; 666s x1 = expinv (p, 2/3); 666s x2 = expinv (p, 1.0); 666s x3 = expinv (p, 2.0); 666s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 666s grid on 666s ylim ([0, 5]) 666s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 666s title ("Exponential iCDF") 666s xlabel ("probability") 666s ylabel ("values in x") 666s ***** shared p 666s p = [-1 0 0.3934693402873666 1 2]; 666s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 666s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 666s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 666s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 666s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 666s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 666s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 666s ***** error expinv () 666s ***** error expinv (1, 2 ,3 ,4 ,5) 666s ***** error ... 666s expinv (ones (3), ones (2)) 666s ***** error ... 666s expinv (2, 3, [1, 2]) 666s ***** error ... 666s [x, xlo, xup] = expinv (1, 2) 666s ***** error [x, xlo, xup] = ... 666s expinv (1, 2, 3, 0) 666s ***** error [x, xlo, xup] = ... 666s expinv (1, 2, 3, 1.22) 666s ***** error [x, xlo, xup] = ... 666s expinv (1, 2, 3, [0.05, 0.1]) 666s ***** error expinv (i, 2) 666s ***** error expinv (2, i) 666s ***** error ... 666s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 666s 18 tests, 18 passed, 0 known failure, 0 skipped 666s [inst/dist_fun/unifcdf.m] 666s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unifcdf.m 666s ***** demo 666s ## Plot various CDFs from the continuous uniform distribution 666s x = 0:0.1:10; 666s p1 = unifcdf (x, 2, 5); 666s p2 = unifcdf (x, 3, 9); 666s plot (x, p1, "-b", x, p2, "-g") 666s grid on 666s xlim ([0, 10]) 666s ylim ([0, 1]) 666s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 666s title ("Continuous uniform CDF") 666s xlabel ("values in x") 666s ylabel ("probability") 666s ***** shared x, y 666s x = [-1 0 0.5 1 2] + 1; 666s y = [0 0 0.5 1 1]; 666s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 666s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 666s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 666s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 666s ***** assert (unifcdf (x, ones (1,5), 2), y) 666s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 666s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 666s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 666s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 666s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 666s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 666s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 666s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 666s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 666s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 666s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 666s ***** error unifcdf () 666s ***** error unifcdf (1) 666s ***** error unifcdf (1, 2) 667s ***** error unifcdf (1, 2, 3, 4) 667s ***** error unifcdf (1, 2, 3, "tail") 667s ***** error ... 667s unifcdf (ones (3), ones (2), ones (2)) 667s ***** error ... 667s unifcdf (ones (2), ones (3), ones (2)) 667s ***** error ... 667s unifcdf (ones (2), ones (2), ones (3)) 667s ***** error unifcdf (i, 2, 2) 667s ***** error unifcdf (2, i, 2) 667s ***** error unifcdf (2, 2, i) 667s 27 tests, 27 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/gevrnd.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gevrnd.m 667s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 667s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 667s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 667s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 667s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 667s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 667s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 667s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 667s ***** assert (class (gevrnd (1,1,1)), "double") 667s ***** assert (class (gevrnd (single (1),1,1)), "single") 667s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 667s ***** assert (class (gevrnd (1,single (1),1)), "single") 667s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 667s ***** assert (class (gevrnd (1,1,single (1))), "single") 667s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 667s ***** error gevrnd () 667s ***** error gevrnd (1) 667s ***** error gevrnd (1, 2) 667s ***** error ... 667s gevrnd (ones (3), ones (2), ones (2)) 667s ***** error ... 667s gevrnd (ones (2), ones (3), ones (2)) 667s ***** error ... 667s gevrnd (ones (2), ones (2), ones (3)) 667s ***** error gevrnd (i, 2, 3) 667s ***** error gevrnd (1, i, 3) 667s ***** error gevrnd (1, 2, i) 667s ***** error ... 667s gevrnd (1, 2, 3, -1) 667s ***** error ... 667s gevrnd (1, 2, 3, 1.2) 667s ***** error ... 667s gevrnd (1, 2, 3, ones (2)) 667s ***** error ... 667s gevrnd (1, 2, 3, [2 -1 2]) 667s ***** error ... 667s gevrnd (1, 2, 3, [2 0 2.5]) 667s ***** error ... 667s gevrnd (1, 2, 3, 2, -1, 5) 667s ***** error ... 667s gevrnd (1, 2, 3, 2, 1.5, 5) 667s ***** error ... 667s gevrnd (2, ones (2), 2, 3) 667s ***** error ... 667s gevrnd (2, ones (2), 2, [3, 2]) 667s ***** error ... 667s gevrnd (2, ones (2), 2, 3, 2) 667s 34 tests, 34 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/lognrnd.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/lognrnd.m 667s ***** assert (size (lognrnd (1, 1)), [1 1]) 667s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 667s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 667s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 667s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 667s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 667s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 667s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 667s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 667s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 667s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 667s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 667s ***** assert (class (lognrnd (1, 1)), "double") 667s ***** assert (class (lognrnd (1, single (1))), "single") 667s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 667s ***** assert (class (lognrnd (single (1), 1)), "single") 667s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 667s ***** error lognrnd () 667s ***** error lognrnd (1) 667s ***** error ... 667s lognrnd (ones (3), ones (2)) 667s ***** error ... 667s lognrnd (ones (2), ones (3)) 667s ***** error lognrnd (i, 2, 3) 667s ***** error lognrnd (1, i, 3) 667s ***** error ... 667s lognrnd (1, 2, -1) 667s ***** error ... 667s lognrnd (1, 2, 1.2) 667s ***** error ... 667s lognrnd (1, 2, ones (2)) 667s ***** error ... 667s lognrnd (1, 2, [2 -1 2]) 667s ***** error ... 667s lognrnd (1, 2, [2 0 2.5]) 667s ***** error ... 667s lognrnd (1, 2, 2, -1, 5) 667s ***** error ... 667s lognrnd (1, 2, 2, 1.5, 5) 667s ***** error ... 667s lognrnd (2, ones (2), 3) 667s ***** error ... 667s lognrnd (2, ones (2), [3, 2]) 667s ***** error ... 667s lognrnd (2, ones (2), 3, 2) 667s 33 tests, 33 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/ncx2pdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/ncx2pdf.m 667s ***** demo 667s ## Plot various PDFs from the noncentral chi-squared distribution 667s x = 0:0.1:10; 667s y1 = ncx2pdf (x, 2, 1); 667s y2 = ncx2pdf (x, 2, 2); 667s y3 = ncx2pdf (x, 2, 3); 667s y4 = ncx2pdf (x, 4, 1); 667s y5 = ncx2pdf (x, 4, 2); 667s y6 = ncx2pdf (x, 4, 3); 667s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 667s x, y4, "-m", x, y5, "-c", x, y6, "-y") 667s grid on 667s xlim ([0, 10]) 667s ylim ([0, 0.32]) 667s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 667s "df = 2, λ = 3", "df = 4, λ = 1", ... 667s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 667s title ("Noncentral chi-squared PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** demo 667s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 667s ## chi-squared PDF with the same number of degrees of freedom (4). 667s 667s x = 0:0.1:10; 667s y1 = ncx2pdf (x, 4, 2); 667s y2 = chi2pdf (x, 4); 667s plot (x, y1, "-", x, y2, "-"); 667s grid on 667s xlim ([0, 10]) 667s ylim ([0, 0.32]) 667s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 667s title ("Noncentral chi-squared vs chi-squared PDFs") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** shared x1, df, d1 667s x1 = [-Inf, 2, NaN, 4, Inf]; 667s df = [2, 0, -1, 1, 4]; 667s d1 = [1, NaN, 3, -1, 2]; 667s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 667s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 667s 0.06160064323277038, 0], 1e-14); 667s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 667s 0.09631299762429098, 0], 1e-14); 667s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 667s 0.08430464047296625, 0], 1e-14); 667s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 667s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 667s NaN, 0.1076346446244688], 1e-14); 667s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 667s NaN, 0.1192317192431485], 1e-14); 667s ***** error ncx2pdf () 667s ***** error ncx2pdf (1) 667s ***** error ncx2pdf (1, 2) 667s ***** error ... 667s ncx2pdf (ones (3), ones (2), ones (2)) 667s ***** error ... 667s ncx2pdf (ones (2), ones (3), ones (2)) 667s ***** error ... 667s ncx2pdf (ones (2), ones (2), ones (3)) 667s ***** error ncx2pdf (i, 2, 2) 667s ***** error ncx2pdf (2, i, 2) 667s ***** error ncx2pdf (2, 2, i) 667s 16 tests, 16 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/loglpdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/loglpdf.m 667s ***** demo 667s ## Plot various PDFs from the log-logistic distribution 667s x = 0.001:0.001:2; 667s y1 = loglpdf (x, log (1), 1/0.5); 667s y2 = loglpdf (x, log (1), 1); 667s y3 = loglpdf (x, log (1), 1/2); 667s y4 = loglpdf (x, log (1), 1/4); 667s y5 = loglpdf (x, log (1), 1/8); 667s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 667s grid on 667s ylim ([0,3]) 667s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 667s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 667s title ("Log-logistic PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 667s ***** shared out1, out2 667s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 667s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 667s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 667s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 667s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 667s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 667s ***** assert (class (loglpdf (1, single (2), 3)), "single") 667s ***** assert (class (loglpdf (1, 2, single (3))), "single") 667s ***** error loglpdf (1) 667s ***** error loglpdf (1, 2) 667s ***** error ... 667s loglpdf (1, ones (2), ones (3)) 667s ***** error ... 667s loglpdf (ones (2), 1, ones (3)) 667s ***** error ... 667s loglpdf (ones (2), ones (3), 1) 667s ***** error loglpdf (i, 2, 3) 667s ***** error loglpdf (1, i, 3) 667s ***** error loglpdf (1, 2, i) 667s 14 tests, 14 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/logicdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/logicdf.m 667s ***** demo 667s ## Plot various CDFs from the logistic distribution 667s x = -5:0.01:20; 667s p1 = logicdf (x, 5, 2); 667s p2 = logicdf (x, 9, 3); 667s p3 = logicdf (x, 9, 4); 667s p4 = logicdf (x, 6, 2); 667s p5 = logicdf (x, 2, 1); 667s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 667s grid on 667s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 667s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 667s title ("Logistic CDF") 667s xlabel ("values in x") 667s ylabel ("probability") 667s ***** shared x, y 667s x = [-Inf -log(3) 0 log(3) Inf]; 667s y = [0, 1/4, 1/2, 3/4, 1]; 667s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 667s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 667s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 667s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 667s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 667s ***** error logicdf () 667s ***** error logicdf (1) 667s ***** error ... 667s logicdf (1, 2) 667s ***** error logicdf (1, 2, 3, "tail") 667s ***** error logicdf (1, 2, 3, 4) 667s ***** error ... 667s logicdf (1, ones (2), ones (3)) 667s ***** error ... 667s logicdf (ones (2), 1, ones (3)) 667s ***** error ... 667s logicdf (ones (2), ones (3), 1) 667s ***** error logicdf (i, 2, 3) 667s ***** error logicdf (1, i, 3) 667s ***** error logicdf (1, 2, i) 667s 16 tests, 16 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/hygeinv.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hygeinv.m 667s ***** demo 667s ## Plot various iCDFs from the hypergeometric distribution 667s p = 0.001:0.001:0.999; 667s x1 = hygeinv (p, 500, 50, 100); 667s x2 = hygeinv (p, 500, 60, 200); 667s x3 = hygeinv (p, 500, 70, 300); 667s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 667s grid on 667s ylim ([0, 60]) 667s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 667s "m = 500, k = 70, n = 300"}, "location", "northwest") 667s title ("Hypergeometric iCDF") 667s xlabel ("probability") 667s ylabel ("values in p (number of successes)") 667s ***** shared p 667s p = [-1 0 0.5 1 2]; 667s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 667s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 667s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 667s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 667s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 667s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 667s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 667s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 667s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 667s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 667s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 667s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 667s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 667s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 667s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 667s ***** error hygeinv () 667s ***** error hygeinv (1) 667s ***** error hygeinv (1,2) 667s ***** error hygeinv (1,2,3) 667s ***** error ... 667s hygeinv (ones (2), ones (3), 1, 1) 667s ***** error ... 667s hygeinv (1, ones (2), ones (3), 1) 667s ***** error ... 667s hygeinv (1, 1, ones (2), ones (3)) 667s ***** error hygeinv (i, 2, 2, 2) 667s ***** error hygeinv (2, i, 2, 2) 667s ***** error hygeinv (2, 2, i, 2) 667s ***** error hygeinv (2, 2, 2, i) 667s 26 tests, 26 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/gppdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gppdf.m 667s ***** demo 667s ## Plot various PDFs from the generalized Pareto distribution 667s x = 0:0.001:5; 667s y1 = gppdf (x, 1, 1, 0); 667s y2 = gppdf (x, 5, 1, 0); 667s y3 = gppdf (x, 20, 1, 0); 667s y4 = gppdf (x, 1, 2, 0); 667s y5 = gppdf (x, 5, 2, 0); 667s y6 = gppdf (x, 20, 2, 0); 667s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 667s x, y4, "-c", x, y5, "-m", x, y6, "-k") 667s grid on 667s xlim ([0, 5]) 667s ylim ([0, 1]) 667s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 667s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 667s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 667s "location", "northeast") 667s title ("Generalized Pareto PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** shared x, y1, y2, y3 667s x = [-Inf, -1, 0, 1/2, 1, Inf]; 667s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 667s y2 = [0, 0, 1, 4/9, 1/4, 0]; 667s y3 = [0, 0, 1, 1, 1, 0]; 667s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 667s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 667s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 667s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 667s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 667s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 667s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 667s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 667s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 667s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 667s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 667s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 667s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 667s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 667s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 667s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 667s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 667s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 667s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 667s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 667s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 667s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 667s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 667s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 667s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 667s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 667s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 667s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 667s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 667s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 667s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 667s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 667s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 667s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 667s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 667s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 667s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 667s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 667s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 667s ***** error gpcdf () 667s ***** error gpcdf (1) 667s ***** error gpcdf (1, 2) 667s ***** error gpcdf (1, 2, 3) 667s ***** error ... 667s gpcdf (ones (3), ones (2), ones(2), ones(2)) 667s ***** error ... 667s gpcdf (ones (2), ones (3), ones(2), ones(2)) 667s ***** error ... 667s gpcdf (ones (2), ones (2), ones(3), ones(2)) 667s ***** error ... 667s gpcdf (ones (2), ones (2), ones(2), ones(3)) 667s ***** error gpcdf (i, 2, 3, 4) 667s ***** error gpcdf (1, i, 3, 4) 667s ***** error gpcdf (1, 2, i, 4) 667s ***** error gpcdf (1, 2, 3, i) 667s 51 tests, 51 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/plrnd.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/plrnd.m 667s ***** shared x, Fx 667s x = [0, 1, 3, 4, 7, 10]; 667s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 667s ***** assert (size (plrnd (x, Fx)), [1, 1]) 667s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 667s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 667s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 667s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 667s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 667s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 667s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 667s ***** assert (class (plrnd (x, Fx)), "double") 667s ***** assert (class (plrnd (x, single (Fx))), "single") 667s ***** assert (class (plrnd (single (x), Fx)), "single") 667s ***** error plrnd () 667s ***** error plrnd (1) 667s ***** error ... 667s plrnd ([0, 1, 2], [0, 1]) 667s ***** error ... 667s plrnd ([0], [1]) 667s ***** error ... 667s plrnd ([0, 1, 2], [0, 1, 1.5]) 667s ***** error ... 667s plrnd ([0, 1, 2], [0, i, 1]) 667s ***** error ... 667s plrnd ([0, i, 2], [0, 0.5, 1]) 667s ***** error ... 667s plrnd ([0, i, 2], [0, 0.5i, 1]) 667s ***** error ... 667s plrnd (x, Fx, -1) 667s ***** error ... 667s plrnd (x, Fx, 1.2) 667s ***** error ... 667s plrnd (x, Fx, ones (2)) 667s ***** error ... 667s plrnd (x, Fx, [2 -1 2]) 667s ***** error ... 667s plrnd (x, Fx, [2 0 2.5]) 667s ***** error ... 667s plrnd (x, Fx, 2, -1, 5) 667s ***** error ... 667s plrnd (x, Fx, 2, 1.5, 5) 667s 26 tests, 26 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/unifpdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unifpdf.m 667s ***** demo 667s ## Plot various PDFs from the continuous uniform distribution 667s x = 0:0.001:10; 667s y1 = unifpdf (x, 2, 5); 667s y2 = unifpdf (x, 3, 9); 667s plot (x, y1, "-b", x, y2, "-g") 667s grid on 667s xlim ([0, 10]) 667s ylim ([0, 0.4]) 667s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 667s title ("Continuous uniform PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** shared x, y 667s x = [-1 0 0.5 1 2] + 1; 667s y = [0 1 1 1 0]; 667s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 667s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 667s ***** assert (unifpdf (x, ones (1,5), 2), y) 667s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 667s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 667s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 667s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 667s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 667s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 667s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 667s ***** error unifpdf () 667s ***** error unifpdf (1) 667s ***** error unifpdf (1, 2) 667s ***** error ... 667s unifpdf (ones (3), ones (2), ones (2)) 667s ***** error ... 667s unifpdf (ones (2), ones (3), ones (2)) 667s ***** error ... 667s unifpdf (ones (2), ones (2), ones (3)) 667s ***** error unifpdf (i, 2, 2) 667s ***** error unifpdf (2, i, 2) 667s ***** error unifpdf (2, 2, i) 667s 19 tests, 19 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/tricdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/tricdf.m 667s ***** demo 667s ## Plot various CDFs from the triangular distribution 667s x = 0.001:0.001:10; 667s p1 = tricdf (x, 3, 4, 6); 667s p2 = tricdf (x, 1, 2, 5); 667s p3 = tricdf (x, 2, 3, 9); 667s p4 = tricdf (x, 2, 5, 9); 667s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 667s grid on 667s xlim ([0, 10]) 667s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 667s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 667s "location", "southeast") 667s title ("Triangular CDF") 667s xlabel ("values in x") 667s ylabel ("probability") 667s ***** shared x, y 667s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 667s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 667s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 667s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 667s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 667s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 667s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 667s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 667s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 667s [y(1:2), NaN, y(4:7)], eps) 667s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 667s [y(1:2), NaN, y(4:7)], eps) 667s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 667s [y(1:2), NaN, y(4:7)], eps) 667s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 667s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 667s single ([y, NaN]), eps("single")) 667s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 667s single ([y, NaN]), eps("single")) 667s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 667s single ([y, NaN]), eps("single")) 667s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 667s single ([y, NaN]), eps("single")) 667s ***** error tricdf () 667s ***** error tricdf (1) 667s ***** error tricdf (1, 2) 667s ***** error tricdf (1, 2, 3) 667s ***** error ... 667s tricdf (1, 2, 3, 4, 5, 6) 667s ***** error tricdf (1, 2, 3, 4, "tail") 667s ***** error tricdf (1, 2, 3, 4, 5) 667s ***** error ... 667s tricdf (ones (3), ones (2), ones(2), ones(2)) 667s ***** error ... 667s tricdf (ones (2), ones (3), ones(2), ones(2)) 667s ***** error ... 667s tricdf (ones (2), ones (2), ones(3), ones(2)) 667s ***** error ... 667s tricdf (ones (2), ones (2), ones(2), ones(3)) 667s ***** error tricdf (i, 2, 3, 4) 667s ***** error tricdf (1, i, 3, 4) 667s ***** error tricdf (1, 2, i, 4) 667s ***** error tricdf (1, 2, 3, i) 667s 29 tests, 29 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/hygepdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/hygepdf.m 667s ***** demo 667s ## Plot various PDFs from the hypergeometric distribution 667s x = 0:60; 667s y1 = hygepdf (x, 500, 50, 100); 667s y2 = hygepdf (x, 500, 60, 200); 667s y3 = hygepdf (x, 500, 70, 300); 667s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 667s grid on 667s xlim ([0, 60]) 667s ylim ([0, 0.18]) 667s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 667s "m = 500, k = 70, μ = 300"}, "location", "northeast") 667s title ("Hypergeometric PDF") 667s xlabel ("values in x (number of successes)") 667s ylabel ("density") 667s ***** shared x, y 667s x = [-1 0 1 2 3]; 667s y = [0 1/6 4/6 1/6 0]; 667s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 667s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 667s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 667s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 667s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 667s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 667s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 667s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 667s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 667s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 667s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 667s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 667s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 667s ***** test 667s z = zeros(3,5); 667s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 667s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 667s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 667s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 667s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 667s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 667s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 667s ***** error hygepdf () 667s ***** error hygepdf (1) 667s ***** error hygepdf (1,2) 667s ***** error hygepdf (1,2,3) 667s ***** error ... 667s hygepdf (1, ones (3), ones (2), ones (2)) 667s ***** error ... 667s hygepdf (1, ones (2), ones (3), ones (2)) 667s ***** error ... 667s hygepdf (1, ones (2), ones (2), ones (3)) 667s ***** error hygepdf (i, 2, 2, 2) 667s ***** error hygepdf (2, i, 2, 2) 667s ***** error hygepdf (2, 2, i, 2) 667s ***** error hygepdf (2, 2, 2, i) 667s 25 tests, 25 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/raylrnd.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/raylrnd.m 667s ***** assert (size (raylrnd (2)), [1, 1]) 667s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 667s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 667s ***** assert (size (raylrnd (1, 3)), [3, 3]) 667s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 667s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 667s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 667s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 667s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 667s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 667s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 667s ***** assert (raylrnd (0, 1, 1), NaN) 667s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 667s ***** assert (class (raylrnd (2)), "double") 667s ***** assert (class (raylrnd (single (2))), "single") 667s ***** assert (class (raylrnd (single ([2 2]))), "single") 667s ***** error raylrnd () 667s ***** error raylrnd (i) 667s ***** error ... 667s raylrnd (1, -1) 667s ***** error ... 667s raylrnd (1, 1.2) 667s ***** error ... 667s raylrnd (1, ones (2)) 667s ***** error ... 667s raylrnd (1, [2 -1 2]) 667s ***** error ... 667s raylrnd (1, [2 0 2.5]) 667s ***** error ... 667s raylrnd (ones (2), ones (2)) 667s ***** error ... 667s raylrnd (1, 2, -1, 5) 667s ***** error ... 667s raylrnd (1, 2, 1.5, 5) 667s ***** error raylrnd (ones (2,2), 3) 667s ***** error raylrnd (ones (2,2), [3, 2]) 667s ***** error raylrnd (ones (2,2), 2, 3) 667s 29 tests, 29 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/copulapdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/copulapdf.m 667s ***** test 667s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 667s theta = [1; 2]; 667s y = copulapdf ("Clayton", x, theta); 667s expected_p = [0.9872; 0.7295]; 667s assert (y, expected_p, 0.001); 667s ***** test 667s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 667s y = copulapdf ("Gumbel", x, 2); 667s expected_p = [0.9468; 0.9468]; 667s assert (y, expected_p, 0.001); 667s ***** test 667s x = [0.2, 0.6; 0.2, 0.6]; 667s theta = [1; 2]; 667s y = copulapdf ("Frank", x, theta); 667s expected_p = [0.9378; 0.8678]; 667s assert (y, expected_p, 0.001); 667s ***** test 667s x = [0.2, 0.6; 0.2, 0.6]; 667s theta = [0.3; 0.7]; 667s y = copulapdf ("AMH", x, theta); 667s expected_p = [0.9540; 0.8577]; 667s assert (y, expected_p, 0.001); 667s 4 tests, 4 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/poisspdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/poisspdf.m 667s ***** demo 667s ## Plot various PDFs from the Poisson distribution 667s x = 0:20; 667s y1 = poisspdf (x, 1); 667s y2 = poisspdf (x, 4); 667s y3 = poisspdf (x, 10); 667s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 667s grid on 667s ylim ([0, 0.4]) 667s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 667s title ("Poisson PDF") 667s xlabel ("values in x (number of occurences)") 667s ylabel ("density") 667s ***** shared x, y 667s x = [-1 0 1 2 Inf]; 667s y = [0, exp(-1)*[1 1 0.5], 0]; 667s ***** assert (poisspdf (x, ones (1,5)), y, eps) 667s ***** assert (poisspdf (x, 1), y, eps) 667s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 667s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 667s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 667s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 667s ***** error poisspdf () 667s ***** error poisspdf (1) 667s ***** error ... 667s poisspdf (ones (3), ones (2)) 667s ***** error ... 667s poisspdf (ones (2), ones (3)) 667s ***** error poisspdf (i, 2) 667s ***** error poisspdf (2, i) 667s 12 tests, 12 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/normpdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/normpdf.m 667s ***** demo 667s ## Plot various PDFs from the normal distribution 667s x = -5:0.01:5; 667s y1 = normpdf (x, 0, 0.5); 667s y2 = normpdf (x, 0, 1); 667s y3 = normpdf (x, 0, 2); 667s y4 = normpdf (x, -2, 0.8); 667s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 667s grid on 667s xlim ([-5, 5]) 667s ylim ([0, 0.9]) 667s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 667s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 667s title ("Normal PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** shared x, y 667s x = [-Inf, 1, 2, Inf]; 667s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 667s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 667s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 667s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 667s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 667s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 667s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 667s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 667s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 667s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 667s ***** error normpdf () 667s ***** error ... 667s normpdf (ones (3), ones (2), ones (2)) 667s ***** error ... 667s normpdf (ones (2), ones (3), ones (2)) 667s ***** error ... 667s normpdf (ones (2), ones (2), ones (3)) 667s ***** error normpdf (i, 2, 2) 667s ***** error normpdf (2, i, 2) 667s ***** error normpdf (2, 2, i) 667s 16 tests, 16 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/nakapdf.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nakapdf.m 667s ***** demo 667s ## Plot various PDFs from the Nakagami distribution 667s x = 0:0.01:3; 667s y1 = nakapdf (x, 0.5, 1); 667s y2 = nakapdf (x, 1, 1); 667s y3 = nakapdf (x, 1, 2); 667s y4 = nakapdf (x, 1, 3); 667s y5 = nakapdf (x, 2, 1); 667s y6 = nakapdf (x, 2, 2); 667s y7 = nakapdf (x, 5, 1); 667s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 667s x, y5, "-k", x, y6, "-b", x, y7, "-c") 667s grid on 667s xlim ([0, 3]) 667s ylim ([0, 2]) 667s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 667s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 667s "μ = 5, ω = 1"}, "location", "northeast") 667s title ("Nakagami PDF") 667s xlabel ("values in x") 667s ylabel ("density") 667s ***** shared x, y 667s x = [-1, 0, 1, 2, Inf]; 667s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 667s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 667s ***** assert (nakapdf (x, 1, 1), y, eps) 667s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 667s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 667s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 667s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 667s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 667s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 667s ***** error nakapdf () 667s ***** error nakapdf (1) 667s ***** error nakapdf (1, 2) 667s ***** error ... 667s nakapdf (ones (3), ones (2), ones(2)) 667s ***** error ... 667s nakapdf (ones (2), ones (3), ones(2)) 667s ***** error ... 667s nakapdf (ones (2), ones (2), ones(3)) 667s ***** error nakapdf (i, 4, 3) 667s ***** error nakapdf (1, i, 3) 667s ***** error nakapdf (1, 4, i) 667s 17 tests, 17 passed, 0 known failure, 0 skipped 667s [inst/dist_fun/nctinv.m] 667s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/nctinv.m 667s ***** demo 667s ## Plot various iCDFs from the noncentral T distribution 667s p = 0.001:0.001:0.999; 667s x1 = nctinv (p, 1, 0); 667s x2 = nctinv (p, 4, 0); 667s x3 = nctinv (p, 1, 2); 667s x4 = nctinv (p, 4, 2); 667s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 667s grid on 667s ylim ([-5, 5]) 667s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 667s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 667s title ("Noncentral T iCDF") 667s xlabel ("probability") 667s ylabel ("values in x") 667s ***** demo 667s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 667s ## with the same number of degrees of freedom (10). 667s 667s p = 0.001:0.001:0.999; 667s x1 = nctinv (p, 10, 1); 667s x2 = tinv (p, 10); 667s plot (p, x1, "-", p, x2, "-"); 667s grid on 667s ylim ([-5, 5]) 667s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 667s title ("Noncentral T vs T quantile functions") 667s xlabel ("probability") 667s ylabel ("values in x") 667s ***** test 667s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 667s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 667s ***** test 667s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 667s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 668s ***** test 668s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 668s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 668s ***** test 668s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 668s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 669s ***** test 669s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 669s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 669s ***** test 669s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 669s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 670s ***** test 670s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 671s ***** error nctinv () 671s ***** error nctinv (1) 671s ***** error nctinv (1, 2) 671s ***** error ... 671s nctinv (ones (3), ones (2), ones (2)) 671s ***** error ... 671s nctinv (ones (2), ones (3), ones (2)) 671s ***** error ... 671s nctinv (ones (2), ones (2), ones (3)) 671s ***** error nctinv (i, 2, 2) 671s ***** error nctinv (2, i, 2) 671s ***** error nctinv (2, 2, i) 671s 16 tests, 16 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/chi2pdf.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/chi2pdf.m 671s ***** demo 671s ## Plot various PDFs from the chi-squared distribution 671s x = 0:0.01:8; 671s y1 = chi2pdf (x, 1); 671s y2 = chi2pdf (x, 2); 671s y3 = chi2pdf (x, 3); 671s y4 = chi2pdf (x, 4); 671s y5 = chi2pdf (x, 6); 671s y6 = chi2pdf (x, 9); 671s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 671s x, y4, "-c", x, y5, "-m", x, y6, "-y") 671s grid on 671s xlim ([0, 8]) 671s ylim ([0, 0.5]) 671s legend ({"df = 1", "df = 2", "df = 3", ... 671s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 671s title ("Chi-squared PDF") 671s xlabel ("values in x") 671s ylabel ("density") 671s ***** shared x, y 671s x = [-1 0 0.5 1 Inf]; 671s y = [0, 1/2 * exp(-x(2:5)/2)]; 671s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 671s ***** assert (chi2pdf (x, 2), y) 671s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 671s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 671s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 671s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 671s ***** error chi2pdf () 671s ***** error chi2pdf (1) 671s ***** error chi2pdf (1,2,3) 671s ***** error ... 671s chi2pdf (ones (3), ones (2)) 671s ***** error ... 671s chi2pdf (ones (2), ones (3)) 671s ***** error chi2pdf (i, 2) 671s ***** error chi2pdf (2, i) 671s 13 tests, 13 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/bvtcdf.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/bvtcdf.m 671s ***** test 671s x = [1, 2]; 671s rho = [1, 0.5; 0.5, 1]; 671s df = 4; 671s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 671s ***** test 671s x = [3, 2;2, 4;1, 5]; 671s rho = [1, 0.5; 0.5, 1]; 671s df = 4; 671s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 671s 2 tests, 2 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/unidinv.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/unidinv.m 671s ***** demo 671s ## Plot various iCDFs from the discrete uniform distribution 671s p = 0.001:0.001:0.999; 671s x1 = unidinv (p, 5); 671s x2 = unidinv (p, 9); 671s plot (p, x1, "-b", p, x2, "-g") 671s grid on 671s xlim ([0, 1]) 671s ylim ([0, 10]) 671s legend ({"N = 5", "N = 9"}, "location", "northwest") 671s title ("Discrete uniform iCDF") 671s xlabel ("probability") 671s ylabel ("values in x") 671s ***** shared p 671s p = [-1 0 0.5 1 2]; 671s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 671s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 671s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 671s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 671s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 671s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 671s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 671s ***** error unidinv () 671s ***** error unidinv (1) 671s ***** error ... 671s unidinv (ones (3), ones (2)) 671s ***** error ... 671s unidinv (ones (2), ones (3)) 671s ***** error unidinv (i, 2) 671s ***** error unidinv (2, i) 671s 13 tests, 13 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/exppdf.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/exppdf.m 671s ***** demo 671s ## Plot various PDFs from the exponential distribution 671s x = 0:0.01:5; 671s y1 = exppdf (x, 2/3); 671s y2 = exppdf (x, 1.0); 671s y3 = exppdf (x, 2.0); 671s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 671s grid on 671s ylim ([0, 1.5]) 671s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 671s title ("Exponential PDF") 671s xlabel ("values in x") 671s ylabel ("density") 671s ***** shared x,y 671s x = [-1 0 0.5 1 Inf]; 671s y = gampdf (x, 1, 2); 671s ***** assert (exppdf (x, 2*ones (1,5)), y) 671s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 671s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 671s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 671s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 671s ***** error exppdf () 671s ***** error exppdf (1,2,3) 671s ***** error ... 671s exppdf (ones (3), ones (2)) 671s ***** error ... 671s exppdf (ones (2), ones (3)) 671s ***** error exppdf (i, 2) 671s ***** error exppdf (2, i) 671s 11 tests, 11 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/gamcdf.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/gamcdf.m 671s ***** demo 671s ## Plot various CDFs from the Gamma distribution 671s x = 0:0.01:20; 671s p1 = gamcdf (x, 1, 2); 671s p2 = gamcdf (x, 2, 2); 671s p3 = gamcdf (x, 3, 2); 671s p4 = gamcdf (x, 5, 1); 671s p5 = gamcdf (x, 9, 0.5); 671s p6 = gamcdf (x, 7.5, 1); 671s p7 = gamcdf (x, 0.5, 1); 671s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 671s x, p5, "-k", x, p6, "-b", x, p7, "-c") 671s grid on 671s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 671s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 671s "α = 0.5, β = 1"}, "location", "southeast") 671s title ("Gamma CDF") 671s xlabel ("values in x") 671s ylabel ("probability") 671s ***** shared x, y, u 671s x = [-1, 0, 0.5, 1, 2, Inf]; 671s y = [0, gammainc(x(2:end), 1)]; 671s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 671s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 671s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 671s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 671s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 671s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 671s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 671s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 671s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 671s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 671s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 671s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 671s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 671s ***** error gamcdf () 671s ***** error gamcdf (1) 671s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 671s ***** error gamcdf (1, 2, 3, "uper") 671s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 671s ***** error gamcdf (2, 3, 4, [1, 2]) 671s ***** error ... 671s [p, plo, pup] = gamcdf (1, 2, 3) 671s ***** error ... 671s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 671s ***** error [p, plo, pup] = ... 671s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 671s ***** error [p, plo, pup] = ... 671s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 671s ***** error [p, plo, pup] = ... 671s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 671s ***** error ... 671s gamcdf (ones (3), ones (2), ones (2)) 671s ***** error ... 671s gamcdf (ones (2), ones (3), ones (2)) 671s ***** error ... 671s gamcdf (ones (2), ones (2), ones (3)) 671s ***** error gamcdf (i, 2, 2) 671s ***** error gamcdf (2, i, 2) 671s ***** error gamcdf (2, 2, i) 671s ***** error ... 671s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 671s 30 tests, 30 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/normrnd.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/normrnd.m 671s ***** assert (size (normrnd (1, 1)), [1 1]) 671s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 671s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 671s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 671s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 671s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 671s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 671s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 671s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 671s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 671s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 671s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 671s ***** assert (class (normrnd (1, 1)), "double") 671s ***** assert (class (normrnd (1, single (1))), "single") 671s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 671s ***** assert (class (normrnd (single (1), 1)), "single") 671s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 671s ***** error normrnd () 671s ***** error normrnd (1) 671s ***** error ... 671s normrnd (ones (3), ones (2)) 671s ***** error ... 671s normrnd (ones (2), ones (3)) 671s ***** error normrnd (i, 2, 3) 671s ***** error normrnd (1, i, 3) 671s ***** error ... 671s normrnd (1, 2, -1) 671s ***** error ... 671s normrnd (1, 2, 1.2) 671s ***** error ... 671s normrnd (1, 2, ones (2)) 671s ***** error ... 671s normrnd (1, 2, [2 -1 2]) 671s ***** error ... 671s normrnd (1, 2, [2 0 2.5]) 671s ***** error ... 671s normrnd (1, 2, 2, -1, 5) 671s ***** error ... 671s normrnd (1, 2, 2, 1.5, 5) 671s ***** error ... 671s normrnd (2, ones (2), 3) 671s ***** error ... 671s normrnd (2, ones (2), [3, 2]) 671s ***** error ... 671s normrnd (2, ones (2), 3, 2) 671s 33 tests, 33 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/burrrnd.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/burrrnd.m 671s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 671s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 671s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 671s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 671s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 671s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 671s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 671s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 671s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 671s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 671s ***** assert (class (burrrnd (1,1,1)), "double") 671s ***** assert (class (burrrnd (single (1),1,1)), "single") 671s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 671s ***** assert (class (burrrnd (1,single (1),1)), "single") 671s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 671s ***** assert (class (burrrnd (1,1,single (1))), "single") 671s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 671s ***** error burrrnd () 671s ***** error burrrnd (1) 671s ***** error burrrnd (1, 2) 671s ***** error ... 671s burrrnd (ones (3), ones (2), ones (2)) 671s ***** error ... 671s burrrnd (ones (2), ones (3), ones (2)) 671s ***** error ... 671s burrrnd (ones (2), ones (2), ones (3)) 671s ***** error burrrnd (i, 2, 3) 671s ***** error burrrnd (1, i, 3) 671s ***** error burrrnd (1, 2, i) 671s ***** error ... 671s burrrnd (1, 2, 3, -1) 671s ***** error ... 671s burrrnd (1, 2, 3, 1.2) 671s ***** error ... 671s burrrnd (1, 2, 3, ones (2)) 671s ***** error ... 671s burrrnd (1, 2, 3, [2 -1 2]) 671s ***** error ... 671s burrrnd (1, 2, 3, [2 0 2.5]) 671s ***** error ... 671s burrrnd (1, 2, 3, 2, -1, 5) 671s ***** error ... 671s burrrnd (1, 2, 3, 2, 1.5, 5) 671s ***** error ... 671s burrrnd (2, ones (2), 2, 3) 671s ***** error ... 671s burrrnd (2, ones (2), 2, [3, 2]) 671s ***** error ... 671s burrrnd (2, ones (2), 2, 3, 2) 671s 36 tests, 36 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/binornd.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/binornd.m 671s ***** assert (size (binornd (2, 1/2)), [1 1]) 671s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 671s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 671s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 671s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 671s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 671s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 671s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 671s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 671s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 671s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 671s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 671s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 671s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 671s ***** assert (class (binornd (1, 1)), "double") 671s ***** assert (class (binornd (1, single (0))), "single") 671s ***** assert (class (binornd (1, single ([0, 0]))), "single") 671s ***** assert (class (binornd (1, single (1), 2)), "single") 671s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 671s ***** assert (class (binornd (single (1), 1, 2)), "single") 671s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 671s ***** error binornd () 671s ***** error binornd (1) 671s ***** error ... 671s binornd (ones (3), ones (2)) 671s ***** error ... 671s binornd (ones (2), ones (3)) 671s ***** error binornd (i, 2) 671s ***** error binornd (1, i) 671s ***** error ... 671s binornd (1, 1/2, -1) 671s ***** error ... 671s binornd (1, 1/2, 1.2) 671s ***** error ... 671s binornd (1, 1/2, ones (2)) 671s ***** error ... 671s binornd (1, 1/2, [2 -1 2]) 671s ***** error ... 671s binornd (1, 1/2, [2 0 2.5]) 671s ***** error ... 671s binornd (1, 1/2, 2, -1, 5) 671s ***** error ... 671s binornd (1, 1/2, 2, 1.5, 5) 671s ***** error ... 671s binornd (2, 1/2 * ones (2), 3) 671s ***** error ... 671s binornd (2, 1/2 * ones (2), [3, 2]) 671s ***** error ... 671s binornd (2, 1/2 * ones (2), 3, 2) 671s ***** error ... 671s binornd (2 * ones (2), 1/2, 3) 671s ***** error ... 671s binornd (2 * ones (2), 1/2, [3, 2]) 671s ***** error ... 671s binornd (2 * ones (2), 1/2, 3, 2) 671s 40 tests, 40 passed, 0 known failure, 0 skipped 671s [inst/dist_fun/burrpdf.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/dist_fun/burrpdf.m 671s ***** demo 671s ## Plot various PDFs from the Burr type XII distribution 671s x = 0.001:0.001:3; 671s y1 = burrpdf (x, 1, 1, 1); 671s y2 = burrpdf (x, 1, 1, 2); 671s y3 = burrpdf (x, 1, 1, 3); 671s y4 = burrpdf (x, 1, 2, 1); 671s y5 = burrpdf (x, 1, 3, 1); 671s y6 = burrpdf (x, 1, 0.5, 2); 671s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 671s x, y4, "-c", x, y5, "-m", x, y6, "-k") 671s grid on 671s ylim ([0, 2]) 671s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 671s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 671s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 671s "location", "northeast") 671s title ("Burr type XII PDF") 671s xlabel ("values in x") 671s ylabel ("density") 671s ***** shared x, y 671s x = [-1, 0, 1, 2, Inf]; 671s y = [0, 1, 1/4, 1/9, 0]; 671s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 671s ***** assert (burrpdf (x, 1, 1, 1), y) 671s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 671s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 671s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 671s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 671s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 671s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 671s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 671s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 671s ***** error burrpdf () 671s ***** error burrpdf (1) 671s ***** error burrpdf (1, 2) 671s ***** error burrpdf (1, 2, 3) 671s ***** error ... 671s burrpdf (1, 2, 3, 4, 5) 671s ***** error ... 671s burrpdf (ones (3), ones (2), ones(2), ones(2)) 671s ***** error ... 671s burrpdf (ones (2), ones (3), ones(2), ones(2)) 671s ***** error ... 671s burrpdf (ones (2), ones (2), ones(3), ones(2)) 671s ***** error ... 671s burrpdf (ones (2), ones (2), ones(2), ones(3)) 671s ***** error burrpdf (i, 2, 3, 4) 671s ***** error burrpdf (1, i, 3, 4) 671s ***** error burrpdf (1, 2, i, 4) 671s ***** error burrpdf (1, 2, 3, i) 671s 23 tests, 23 passed, 0 known failure, 0 skipped 671s [inst/anova2.m] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/inst/anova2.m 671s ***** demo 671s 671s # Factorial (Crossed) Two-way ANOVA with Interaction 671s 671s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 671s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 671s 671s [p, atab, stats] = anova2(popcorn, 3, "on"); 671s ***** demo 671s 671s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 671s 671s data = [54, 43, 78, 111; 671s 23, 34, 37, 41; 671s 45, 65, 99, 78; 671s 31, 33, 36, 35; 671s 15, 25, 30, 26]; 671s 671s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 671s ***** demo 671s 671s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 671s 671s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 671s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 671s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 671s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 671s 671s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 671s ***** test 671s ## Test for anova2 ("interaction") 671s ## comparison with results from Matlab for column effect 671s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 671s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 671s [p, atab, stats] = anova2 (popcorn, 3, "off"); 671s assert (p(1), 7.678957383294716e-07, 1e-14); 671s assert (p(2), 0.0001003738963050171, 1e-14); 671s assert (p(3), 0.7462153966366274, 1e-14); 671s assert (atab{2,5}, 56.700, 1e-14); 671s assert (atab{2,3}, 2, 0); 671s assert (atab{4,2}, 0.08333333333333348, 1e-14); 671s assert (atab{5,4}, 0.1388888888888889, 1e-14); 671s assert (atab{5,2}, 1.666666666666667, 1e-14); 671s assert (atab{6,2}, 22); 671s assert (stats.source, "anova2"); 671s assert (stats.colmeans, [6.25, 4.75, 4]); 671s assert (stats.inter, 1, 0); 671s assert (stats.pval, 0.7462153966366274, 1e-14); 671s assert (stats.df, 12); 671s ***** test 671s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 671s data = [54, 43, 78, 111; 671s 23, 34, 37, 41; 671s 45, 65, 99, 78; 671s 31, 33, 36, 35; 671s 15, 25, 30, 26]; 671s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 671s assert (atab{2,2}, 2174.95, 1e-10); 671s assert (atab{3,2}, 8371.7, 1e-10); 671s assert (atab{4,2}, 2404.3, 1e-10); 671s assert (atab{5,2}, 12950.95, 1e-10); 671s assert (atab{2,4}, 724.983333333333, 1e-10); 671s assert (atab{3,4}, 2092.925, 1e-10); 671s assert (atab{4,4}, 200.358333333333, 1e-10); 671s assert (atab{2,5}, 3.61843363972882, 1e-10); 671s assert (atab{3,5}, 10.445909412303, 1e-10); 671s assert (atab{2,6}, 0.087266112738617, 1e-10); 671s assert (atab{3,6}, 0.000698397753556, 1e-10); 671s ***** test 671s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 671s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 671s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 671s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 671s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 671s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 671s assert (atab{2,2}, 745.360306290833, 1e-10); 671s assert (atab{3,2}, 278.01854140125, 1e-10); 671s assert (atab{4,2}, 180.180377467501, 1e-10); 671s assert (atab{5,2}, 1203.55922515958, 1e-10); 671s assert (atab{2,4}, 372.680153145417, 1e-10); 671s assert (atab{3,4}, 92.67284713375, 1e-10); 671s assert (atab{4,4}, 10.0100209704167, 1e-10); 671s assert (atab{2,5}, 4.02146005730833, 1e-10); 671s assert (atab{3,5}, 9.25800729165627, 1e-10); 671s assert (atab{2,6}, 0.141597630656771, 1e-10); 671s assert (atab{3,6}, 0.000636643812875719, 1e-10); 671s 3 tests, 3 passed, 0 known failure, 0 skipped 671s Checking C++ files ... 671s [src/libsvmwrite.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/libsvmwrite.cc 671s ***** shared L, D 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s ***** error libsvmwrite ("", L, D); 671s ***** error ... 671s libsvmwrite (tempname (), [L;L], D); 671s ***** error ... 671s OUT = libsvmwrite (tempname (), L, D); 671s ***** error ... 671s libsvmwrite (tempname (), single (L), D); 671s ***** error libsvmwrite (13412, L, D); 671s ***** error ... 671s libsvmwrite (tempname (), L, full (D)); 671s ***** error ... 671s libsvmwrite (tempname (), L, D, D); 671s 7 tests, 7 passed, 0 known failure, 0 skipped 671s [src/svmtrain.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/svmtrain.cc 671s ***** test 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s model = svmtrain(L, D, '-c 1 -g 0.07'); 671s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 671s assert (isstruct (model), true); 671s assert (isfield (model, "Parameters"), true); 671s assert (model.totalSV, 130); 671s assert (model.nr_class, 2); 671s assert (size (model.Label), [2, 1]); 671s ***** shared L, D 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s ***** error [L, D] = svmtrain (L, D); 671s ***** error ... 671s model = svmtrain (single (L), D); 671s ***** error ... 671s model = svmtrain (L, D, "", ""); 671s 4 tests, 4 passed, 0 known failure, 0 skipped 671s [src/svmpredict.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/svmpredict.cc 671s ***** test 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s model = svmtrain (L, D, '-c 1 -g 0.07'); 671s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 671s assert (size (predict_label), size (dec_values)); 671s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 671s assert (dec_values(1), 1.225836001973273, 1e-14); 671s assert (dec_values(2), -0.3212992933043805, 1e-14); 671s assert (predict_label(1), 1); 671s ***** shared L, D, model 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s model = svmtrain (L, D, '-c 1 -g 0.07'); 671s ***** error ... 671s [p, a] = svmpredict (L, D, model); 671s ***** error p = svmpredict (L, D); 671s ***** error ... 671s p = svmpredict (single (L), D, model); 671s ***** error p = svmpredict (L, D, 123); 671s 5 tests, 5 passed, 0 known failure, 0 skipped 671s [src/editDistance.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/editDistance.cc 671s ***** error d = editDistance (1, 2, 3, 4); 671s ***** error ... 671s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 671s ***** error ... 671s [C, IA] = editDistance ({"AS","SD","AD"}); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, [1, 2]); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, -2); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, 1.25); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 671s ***** error ... 671s d = editDistance ("string1", "string2", [1, 2]); 671s ***** error ... 671s d = editDistance ("string1", "string2", -2); 671s ***** error ... 671s d = editDistance ("string1", "string2", 1.25); 671s ***** error ... 671s d = editDistance ({{"string1", "string2"}, 2}); 671s ***** error ... 671s d = editDistance ({{"string1", "string2"}, 2}, 2); 671s ***** error ... 671s d = editDistance ([1, 2, 3]); 671s ***** error ... 671s d = editDistance (["AS","SD","AD","AS"]); 671s ***** error ... 671s d = editDistance (["AS","SD","AD"], 2); 671s ***** error ... 671s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 671s ***** error ... 671s d = editDistance ([1,2,3], {"AS","AS","AD"}); 671s ***** error ... 671s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 671s ***** error ... 671s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 671s ***** test 671s d = editDistance ({"AS","SD","AD"}); 671s assert (d, [2; 1; 1]); 671s assert (class (d), "double"); 671s ***** test 671s C = editDistance ({"AS","SD","AD"}, 1); 671s assert (iscellstr (C), true); 671s assert (C, {"AS";"SD"}); 671s ***** test 671s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 671s assert (class (IA), "double"); 671s assert (IA, [1;2]); 671s ***** test 671s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 671s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 671s assert (class (IA), "double"); 671s assert (A(IA), C); 671s ***** test 671s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 671s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 671s assert (class (IA), "cell"); 671s assert (C, {"ASS"; "FDE"; "OPA"}); 671s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 671s assert (A(IA{2}), {"FDE"; "EDS"}); 671s assert (A(IA{3}), {"OPA"}); 671s ***** test 671s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 671s [C, IA, IC] = editDistance (A, 2); 671s assert (class (IA), "double"); 671s assert (A(IA), C); 671s assert (IC, [1; 1; 3; 1; 5]); 671s ***** test 671s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 671s assert (d, [0; 1; 2]); 671s assert (class (d), "double"); 671s ***** test 671s d = editDistance ({"AS","SD","AD"}, {"AS"}); 671s assert (d, [0; 2; 1]); 671s assert (class (d), "double"); 671s ***** test 671s d = editDistance ({"AS"}, {"AS","SD","AD"}); 671s assert (d, [0; 2; 1]); 671s assert (class (d), "double"); 671s ***** test 671s b = editDistance ("Octave", "octave"); 671s assert (b, 1); 671s assert (class (b), "double"); 671s 33 tests, 33 passed, 0 known failure, 0 skipped 671s [src/fcnntrain.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/fcnntrain.cc 671s ***** shared X, Y, MODEL 671s load fisheriris 671s X = meas; 671s Y = grp2idx (species); 671s ***** error ... 671s model = fcnntrain (X, Y); 671s ***** error ... 671s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 671s ***** error ... 671s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 671s 33 tests, 33 passed, 0 known failure, 0 skipped 671s [src/fcnnpredict.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/fcnnpredict.cc 671s ***** shared X, Y, MODEL 671s load fisheriris 671s X = meas; 671s Y = grp2idx (species); 671s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 671s ***** test 671s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 671s assert (numel (Y_pred), numel (Y)); 671s assert (isequal (size (Y_pred), size (Y)), true); 671s assert (columns (Y_scores), numel (unique (Y))); 671s assert (rows (Y_scores), numel (Y)); 671s ***** error ... 671s fcnnpredict (MODEL); 671s ***** error ... 671s [Q, W, E] = fcnnpredict (MODEL, X); 671s ***** error ... 671s fcnnpredict (1, X); 671s ***** error ... 671s fcnnpredict (struct ("L", {1, 2, 3}), X); 671s ***** error ... 671s fcnnpredict (struct ("L", 1), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", 1), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {1}), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 671s "Activations", [2]), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 671s "Activations", [2; 2]), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 671s "Activations", {{2, 2}}), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 671s "Activations", {{"sigmoid", "softmax"}}), X); 671s ***** error ... 671s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 671s "Activations", "sigmoid"), X); 671s ***** error ... 671s fcnnpredict (MODEL, complex (X)); 671s ***** error ... 671s fcnnpredict (MODEL, {1, 2, 3, 4}); 671s ***** error ... 671s fcnnpredict (MODEL, "asd"); 671s ***** error ... 671s fcnnpredict (MODEL, []); 671s ***** error ... 671s fcnnpredict (MODEL, X(:,[1:3])); 671s 20 tests, 20 passed, 0 known failure, 0 skipped 671s [src/libsvmread.cc] 671s >>>>> /tmp/autopkgtest.V4q3WS/build.s0V/src/src/libsvmread.cc 671s ***** error [L, D] = libsvmread (24); 671s ***** error ... 671s D = libsvmread ("filename"); 671s ***** test 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s assert (size (L), [270, 1]); 671s assert (size (D), [270, 13]); 671s ***** test 671s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 671s assert (issparse (L), false); 671s assert (issparse (D), true); 671s 4 tests, 4 passed, 0 known failure, 0 skipped 672s Done running the unit tests. 672s Summary: 11162 tests, 11159 passed, 1 known failures, 2 skipped 672s autopkgtest [10:46:39]: test command1: -----------------------] 673s command1 PASS 673s autopkgtest [10:46:40]: test command1: - - - - - - - - - - results - - - - - - - - - - 673s autopkgtest [10:46:40]: @@@@@@@@@@@@@@@@@@@@ summary 673s command1 PASS 691s nova [W] Skipping flock for amd64 691s Creating nova instance adt-plucky-amd64-octave-statistics-20250315-103527-juju-7f2275-prod-proposed-migration-environment-20-90633440-8d87-4427-a6b8-514d5af20acd from image adt/ubuntu-plucky-amd64-server-20250304.img (UUID 9c7d4da5-d95f-4c85-ac1f-51eb37e75c4c)... 691s nova [W] Timed out waiting for e2bc00f8-f305-4317-aa90-bc243944e70b to get deleted.